KDEPrint
cupsaddsmb2.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef CUPSADDSMB_H
00021 #define CUPSADDSMB_H
00022
00023 #include <QtCore/QObject>
00024 #include <QtCore/QStringList>
00025 #include <kprocess.h>
00026 #include <kdialog.h>
00027
00028 class QProgressBar;
00029 class SidePixmap;
00030 class QPushButton;
00031 class QLabel;
00032 class KLineEdit;
00033
00034 #ifdef __GNUC__
00035 #warning rename class or remove from global namespace
00036 #endif
00037 class CupsAddSmb : public KDialog
00038 {
00039 Q_OBJECT
00040
00041 public:
00042 enum State { None, Start, MkDir, Copy, AddDriver, AddPrinter };
00043 explicit CupsAddSmb(QWidget *parent = 0, const char *name = 0);
00044 ~CupsAddSmb();
00045
00046 static bool exportDest(const QString& dest, const QString& datadir);
00047
00048 protected Q_SLOTS:
00049 void slotReceived();
00050 void doNextAction();
00051 void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
00052 void slotActionClicked();
00053
00054 protected:
00055 void checkActionStatus();
00056 void nextAction();
00057 bool startProcess();
00058 bool doExport();
00059 bool doInstall();
00060 void showError(const QString& msg);
00061
00062 private:
00063 KProcess m_proc;
00064 QString m_procname;
00065 QStringList m_buffer;
00066 int m_state;
00067 QStringList m_actions;
00068 int m_actionindex;
00069 bool m_status;
00070 QProgressBar *m_bar;
00071 QString m_dest;
00072 SidePixmap *m_side;
00073 QPushButton *m_doit, *m_cancel;
00074 QLabel *m_text;
00075 QLabel *m_textinfo;
00076 KLineEdit *m_logined, *m_passwded, *m_servered;
00077 QString m_datadir;
00078 };
00079
00080 #endif