cupsinfos.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef CUPSINFOS_H
00021 #define CUPSINFOS_H
00022
00023 #include <qstring.h>
00024 #include "kpreloadobject.h"
00025
00026 class CupsInfos : public KPReloadObject
00027 {
00028 public:
00029 static CupsInfos* self();
00030
00031 CupsInfos();
00032 ~CupsInfos();
00033
00034 const QString& host() const;
00035 QString hostaddr() const;
00036 int port() const;
00037 const QString& login() const;
00038 const QString& password() const;
00039 const QString& realLogin() const;
00040 bool savePassword() const;
00041
00042 void setHost(const QString& s);
00043 void setPort(int p);
00044 void setLogin(const QString& s);
00045 void setPassword(const QString& s);
00046 void setSavePassword( bool on );
00047
00048 const char* getPasswordCB();
00049
00050 void load();
00051 void save();
00052
00053 protected:
00054 void reload();
00055 void configChanged();
00056
00057 private:
00058 static CupsInfos *unique_;
00059
00060 QString host_;
00061 int port_;
00062 QString login_;
00063 QString password_;
00064 QString reallogin_;
00065 bool savepwd_;
00066
00067 int count_;
00068 };
00069
00070 inline const QString& CupsInfos::host() const
00071 { return host_; }
00072
00073 inline int CupsInfos::port() const
00074 { return port_; }
00075
00076 inline const QString& CupsInfos::login() const
00077 { return login_; }
00078
00079 inline const QString& CupsInfos::password() const
00080 { return password_; }
00081
00082 inline const QString& CupsInfos::realLogin() const
00083 { return reallogin_; }
00084
00085 inline bool CupsInfos::savePassword() const
00086 { return savepwd_; }
00087
00088 #endif
|