kmwsocketutil.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef KMWSOCKETUTIL_H
00021
#define KMWSOCKETUTIL_H
00022
00023
#include <qstring.h>
00024
#include <qptrlist.h>
00025
#include <kdialogbase.h>
00026
00027
struct SocketInfo
00028 {
00029
QString IP;
00030
QString Name;
00031
int Port;
00032 };
00033
00034
class QProgressBar;
00035
class QLineEdit;
00036
class QComboBox;
00037
class KMWSocketUtil;
00038
00039
class SocketConfig :
public KDialogBase
00040 {
00041
friend class KMWSocketUtil;
00042 Q_OBJECT
00043
public:
00044 SocketConfig(KMWSocketUtil *util,
QWidget *parent = 0,
const char *name = 0);
00045 ~SocketConfig();
00046
00047
protected slots:
00048
void slotOk();
00049
00050
private:
00051
QLineEdit *mask_, *tout_;
00052
QComboBox *port_;
00053 };
00054
00055
class KMWSocketUtil
00056 {
00057
friend class SocketConfig;
00058
00059
public:
00060 KMWSocketUtil();
00061
00062
bool checkPrinter(
const QString& host,
int port,
QString* hostname = 0);
00063
00064
const QPtrList<SocketInfo>* printerList() {
return &printerlist_; }
00065
bool scanNetwork(
QProgressBar *bar = 0);
00066
void configureScan(
QWidget *parent = 0);
00067
void setDefaultPort(
int p) { port_ = p; }
00068
00069
private:
00070
QPtrList<SocketInfo> printerlist_;
00071
QString root_;
00072
int port_;
00073
int timeout_;
00074 };
00075
00076
#endif
This file is part of the documentation for kdeprint Library Version 3.3.0.