Fix forward declaration
[kdeadmin.git] / kcron / src / kcmCron.h
blob46fae870798e39a90d7022b204274ab8a6373336
1 /***************************************************************************
2 * KT icons. *
3 * -------------------------------------------------------------------- *
4 * Copyright (C) 1999, Gary Meyer <gary@meyer.net> *
5 * -------------------------------------------------------------------- *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 ***************************************************************************/
12 #ifndef KCM_CRON_H
13 #define KCM_CRON_H
15 #include <QPixmap>
16 #include <QString>
17 #include <QWidget>
18 #include <QVariantList>
19 #include <QStringList>
21 #include <kcmodule.h>
22 #include <ksharedconfig.h>
24 class KActionCollection;
26 class CTHost;
28 class KCMCronPrivate;
30 class KCMCron : public KCModule {
31 Q_OBJECT
33 public:
34 //, const QVariantList& arguments
35 KCMCron(QWidget* parent, const QStringList& args);
37 ~KCMCron();
39 virtual void load();
40 virtual void save();
41 virtual void defaults();
43 /**
44 * Additional init
46 bool init();
48 /**
49 * Returns a reference to the CTHost.
51 CTHost* ctHost() const;
53 public slots:
56 /**
57 * Changes the status bar contents for the standard label permanently;
58 * used to indicate current actions.
60 void slotStatusMessage(const QString & text);
62 /**
63 * Changes the status message of the whole status bar for two seconds,
64 * then restores the last status. This is used to display status bar
65 * messages that give information about actions for toolbar icons and
66 * menu entries.
68 void slotStatusHelpMessage(const QString & text);
70 void displayActionInformation(QAction* action);
72 /** Enables/disables paste button
74 void togglePasteAction(bool enabled);
76 /** Enables/disables modification buttons
78 void toggleModificationActions(bool enabled);
80 /** Enables/disables "Run now"
82 void toggleRunNowActions(bool enabled);
84 void toggleNewEntryActions(bool enabled);
86 private:
88 /**
89 * TODO Replace this if possible
91 KActionCollection* actionCollection();
93 /**
94 * Initialize actions.
96 void setupActions();
98 void prepareTasksWidgetContextualMenu();
99 void prepareVariablesWidgetContextualMenu();
101 QAction* createSeparator();
103 KCMCronPrivate* const d;
106 #endif // KCM_CRON_H