kmmainview.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KMMAINVIEW_H
00021 #define KMMAINVIEW_H
00022
00023 #if !defined( _KDEPRINT_COMPILE ) && defined( __GNUC__ )
00024 #warning internal header, do not use except if you are a KDEPrint developer
00025 #endif
00026
00027 #include <qwidget.h>
00028 #include <kdeprint/kpreloadobject.h>
00029 #include <kmainwindow.h>
00030
00031 class KMManager;
00032 class KMPrinterView;
00033 class KMPrinter;
00034 class KMPages;
00035 class KActionCollection;
00036 class QPopupMenu;
00037 class QTimer;
00038 class QSplitter;
00039 class KToolBar;
00040 class KAction;
00041 class PluginComboBox;
00042 class QBoxLayout;
00043 class MessageWindow;
00044 class QMenuBar;
00045
00053 class KDEPRINT_EXPORT KMMainView : public QWidget, public KPReloadObject
00054 {
00055 Q_OBJECT
00056 public:
00057 KMMainView(QWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0);
00058 ~KMMainView();
00059
00060 void setOrientation(int);
00061 int orientation() const;
00062 void setViewType(int);
00063 int viewType() const;
00064 void enableToolbar(bool on = true);
00065 KAction* action(const char *name);
00066 void showPrinterInfos(bool on);
00067 bool printerInfosShown() const;
00068
00069 public slots:
00070 void slotTimer();
00071 void slotShowPrinterInfos(bool);
00072 void slotChangePrinterState();
00073 void slotRemove();
00074 void slotConfigure();
00075 void slotAdd();
00076 void slotHardDefault();
00077 void slotSoftDefault();
00078 void slotTest();
00079 void slotServerRestart();
00080 void slotServerConfigure();
00081 void slotServerConfigureAccess();
00082 void slotManagerConfigure();
00083 void slotAddSpecial();
00084 void slotRefresh();
00085 void slotToolSelected(int);
00086 void slotToggleFilter(bool);
00087 void slotHelp();
00088
00089 protected slots:
00090 void slotPrinterSelected(const QString&);
00091 void slotRightButtonClicked(const QString&, const QPoint&);
00092 void slotToggleToolBar(bool);
00093 void slotToggleMenuBar(bool);
00094 void slotChangeView(int);
00095 void slotChangeDirection(int);
00096 void slotUpdatePossible( bool );
00097 void slotInit();
00098
00099 protected:
00100 void initActions();
00101 void showErrorMsg(const QString& msg, bool usemgr = true);
00102 void restoreSettings();
00103 void saveSettings();
00104 void loadParameters();
00105 void reload();
00106 void configChanged();
00107
00108 void loadPluginActions();
00109 void removePluginActions();
00110 void createMessageWindow( const QString&, int delay = 500 );
00111 void destroyMessageWindow();
00112 void reset( const QString& msg = QString::null, bool useDelay = true, bool holdTimer = true );
00113
00114 private:
00115 KMPrinterView *m_printerview;
00116 KMPages *m_printerpages;
00117 QPopupMenu *m_pop;
00118 KActionCollection *m_actions;
00119 KMPrinter *m_current;
00120 KToolBar *m_toolbar;
00121 PluginComboBox *m_plugin;
00122 int m_pactionsindex;
00123 QStringList m_toollist;
00124 bool m_first;
00125 QBoxLayout *m_boxlayout;
00126 class KMainWindowPrivate;
00127 KMainWindowPrivate *d;
00128 KToolBar *m_menubar;
00129 };
00130
00131 KDEPRINT_EXPORT int kdeprint_management_add_printer_wizard( QWidget* parent );
00132
00133 #endif
|