summaryrefslogtreecommitdiffstats
path: root/ksmserver/shutdowndlg.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /ksmserver/shutdowndlg.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksmserver/shutdowndlg.h')
-rw-r--r--ksmserver/shutdowndlg.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/ksmserver/shutdowndlg.h b/ksmserver/shutdowndlg.h
new file mode 100644
index 000000000..9fcb77c51
--- /dev/null
+++ b/ksmserver/shutdowndlg.h
@@ -0,0 +1,88 @@
+/*****************************************************************
+ksmserver - the KDE session management server
+
+Copyright (C) 2000 Matthias Ettrich <[email protected]>
+******************************************************************/
+
+#ifndef SHUTDOWNDLG_H
+#define SHUTDOWNDLG_H
+
+#include <qpixmap.h>
+#include <qdialog.h>
+#include <kpushbutton.h>
+class QPushButton;
+class QVButtonGroup;
+class QPopupMenu;
+class QTimer;
+
+#include <kapplication.h>
+
+// The (singleton) widget that makes the desktop gray.
+class KSMShutdownFeedback : public QWidget
+{
+ Q_OBJECT
+
+public:
+ static void start() { s_pSelf = new KSMShutdownFeedback(); s_pSelf->show(); }
+ static void stop() { delete s_pSelf; s_pSelf = 0L; }
+ static KSMShutdownFeedback * self() { return s_pSelf; }
+
+protected:
+ ~KSMShutdownFeedback() {}
+
+private slots:
+ void slotPaintEffect();
+
+private:
+ static KSMShutdownFeedback * s_pSelf;
+ KSMShutdownFeedback();
+ int m_currentY;
+ QPixmap m_root;
+};
+
+
+// The confirmation dialog
+class KSMShutdownDlg : public QDialog
+{
+ Q_OBJECT
+
+public:
+ static bool confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, QString& bopt );
+
+public slots:
+ void slotLogout();
+ void slotHalt();
+ void slotReboot();
+ void slotReboot(int);
+
+protected:
+ ~KSMShutdownDlg() {};
+
+private:
+ KSMShutdownDlg( QWidget* parent, bool maysd, KApplication::ShutdownType sdtype );
+ KApplication::ShutdownType m_shutdownType;
+ QString m_bootOption;
+ QPopupMenu *targets;
+ QStringList rebootOptions;
+};
+
+class KSMDelayedPushButton : public KPushButton
+{
+ Q_OBJECT
+
+public:
+
+ KSMDelayedPushButton( const KGuiItem &item, QWidget *parent, const char *name = 0 );
+ void setPopup( QPopupMenu *pop);
+
+private slots:
+ void slotTimeout();
+ void slotPressed();
+ void slotReleased();
+
+private:
+ QPopupMenu *pop;
+ QTimer *popt;
+};
+
+#endif