From 37333bf25ad9a4c538250f5af2f9f1d666362883 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksysv/TopWidget.h | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 ksysv/TopWidget.h (limited to 'ksysv/TopWidget.h') diff --git a/ksysv/TopWidget.h b/ksysv/TopWidget.h new file mode 100644 index 0000000..6415538 --- /dev/null +++ b/ksysv/TopWidget.h @@ -0,0 +1,153 @@ +/*************************************************************************** + begin : Sun Oct 3 1999 + copyright : (C) 1997-99 by Peter Putzer + email : putzer@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2. * + * * + ***************************************************************************/ + +#ifndef KSV_TOPWIDGET_H +#define KSV_TOPWIDGET_H + +#include + +class QCheckBox; + +class KAction; +class KToggleAction; +class KActionMenu; +class KMenuBar; +class KStatusBar; +class KToolBar; +class KActionCollection; + +class ActionList; +class KSVAction; +class ServiceDlg; +class KSVConfig; +class KSVItem; +class KSVContent; +class KSVPreferences; +class RunlevelAuthIcon; + +class KSVTopLevel : public KMainWindow +{ + Q_OBJECT + +public: + KSVTopLevel(); + virtual ~KSVTopLevel(); + +public slots: + void setCaption (bool changed); + +protected: + virtual bool queryExit(); + virtual void closeEvent( QCloseEvent* e ); + void initTools(); + void initActions (); + void initStatusBar(); + + KActionCollection* filteredActions (); + +private slots: + void slotClearChanges(); + void slotAcceptChanges(); + void pushUndoAction (KSVAction*); + void slotShowConfig(); + void slotReadConfig(); + void pasteAppend (); + void toggleLog(); + void saveOptions(); + void slotUpdateRunning (const QString&); + void editCut(); + void editCopy(); + void editPaste(); + void editUndo(); + void editRedo(); + void editService (); + void saveAs (); + void load (); + void print(); + void printLog(); + void setChanged( bool val = true ); + void setPaste( bool val = false ); + void properties(); + void scriptProperties(); + void setLog( bool val ); + void catchCannotGenerateNumber(); + + void configureKeys (); + void configureToolbars (); + + void enableUndo(); + void disableUndo(); + void enableRedo(); + void disableRedo(); + + void dispatchEditService (bool); + void dispatchStartService (bool); + void dispatchStopService (bool); + void dispatchRestartService (bool); + + void dispatchEdit (); + + /** + * initialize the view (plus some other things) + */ + void initView(); + + void slotSaveLog(); + void enableLogActions(); + + void toggleRunlevel (int index); + + void updateColors (); + void updateServicesPath (); + void updateRunlevelsPath (); + + void writingEnabled (bool); + void slotNewToolbarConfig(); + +private: + KSVConfig* mConfig; + KSVContent* mView; + + KSVPreferences* mPreferences; + + KAction *mEditUndo, *mEditRedo, *mEditCut, *mEditCopy, *mEditPaste, + *mPasteAppend, *mEditProperties; + + KAction *mFileRevert, *mFileLoad, *mFilePrint, *mFilePrintLog, + *mFileSave, *mFileSaveAs, *mFileSaveLog, *mFileQuit; + + KToggleAction *mToolsStartService, *mToolsStopService, + *mToolsRestartService, *mToolsEditService; + + KToggleAction *mOptionsToggleLog; + + KActionMenu* mOpenWith; + KAction* mOpenDefault; + + bool mChanged; + + ActionList* mUndoList; + ActionList* mRedoList; + + ServiceDlg* mStartDlg; + ServiceDlg* mStopDlg; + ServiceDlg* mRestartDlg; + ServiceDlg* mEditDlg; + + RunlevelAuthIcon* mAuth; + QCheckBox** mVisible; +}; + +#endif // KSV_TOPWIDGET_H + -- cgit v1.2.1