summaryrefslogtreecommitdiffstats
path: root/src/knutmessage.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-19 18:17:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-19 18:17:02 +0000
commitf867212c1762e156553d039319b904a17f7b563d (patch)
tree461c1a743b3ff8291e03360742dbbfb4cc0087e4 /src/knutmessage.h
downloadknutclient-f867212c1762e156553d039319b904a17f7b563d.tar.gz
knutclient-f867212c1762e156553d039319b904a17f7b563d.zip
Added KDE3 version of knutclient
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knutclient@1092914 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knutmessage.h')
-rw-r--r--src/knutmessage.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/src/knutmessage.h b/src/knutmessage.h
new file mode 100644
index 0000000..6be9f5d
--- /dev/null
+++ b/src/knutmessage.h
@@ -0,0 +1,126 @@
+/***************************************************************************
+ knutmessage.h - description
+ -------------------
+ begin : So led 24 2004
+ copyright : (C) 2004 by Daniel Prynych
+ email : Daniel.Prynych@alo.cz
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KNUTMESSAGE_H
+#define KNUTMESSAGE_H
+
+#include <kdialogbase.h>
+
+//#include <qpixmap.h>
+//#include <qtimer.h>
+
+
+/**
+ *@author Daniel Prynych
+ */
+
+
+class QTimer;
+class QPixmap;
+
+/**
+ * Tato trida zobrazi okno zpravy v modeless rezimu.
+ * Okno pracuje nezavisle na ostatnich oknech a NEPOZASTAVUJE jejich cinnost.
+ *
+ * @author Daniel Prynych
+ * @short window message
+ * @version 0.1
+ */
+class KNutMessage : public KDialogBase {
+ Q_OBJECT
+public:
+
+enum typeOfMessage {
+ infoMess,
+ warningMess,
+ criticalMess
+ };
+
+
+/**
+ * Constructor - makes window of message.
+ * Konstruktor - vytvori okno zpravy.
+ * @param messageText is text of message
+ * @param type is type of message see on enum typeOfMessage
+ * @param timeValidity maximal time for showing window, if it is equal zere, time is unlimited.
+ *
+ * @param messageText je text zpravu.
+ * @param type je typ zpravy blize enum typeOfMessage
+ * @param timeValidity maximalni doba zobrazeni okna, je-li rovna nule je neomezena.
+ * @since 0.2
+ */
+ KNutMessage(const QString messageText, const typeOfMessage type=infoMess, const long int timeValidity=0, QWidget *parent=0, const char *name=0);
+
+/**
+ * Destruktor.
+ *
+ * @since 0.1.2
+ **/
+ ~KNutMessage();
+
+signals:
+/**
+ * Je emitovan kdyz dojde ke stisku tlacitka OK, nebo vyprsi doba platnosti (timeValidity).
+ * Is emited, when button OK is pressed or time of validity is stopped.
+ *
+ * @since 0.1
+ **/
+ void endMessage(void);
+
+/**
+ * Is emited when window of message is moved;
+ * Je emitovan kdyz dojde presunu okna.
+ *
+ * @since 0.1
+ **/
+
+ void messageMoved (int, int);
+
+private slots:
+
+/**
+ * @internal
+ * Je aktivivan, kdyz vyprsi doba platnosti (timeValidity).
+ *
+ * @since 0.1
+ **/
+ void timeout(void);
+
+/**
+ * @internal
+ * Is activated when button OK was pressed
+ * Je aktivovan kdyz se stiskne tlacitko OK
+ *
+ * @since 0.1
+ **/
+ virtual void slotOk (void);
+
+
+private:
+ // max rime for message window is 3600 sec or 60 min
+ static const int maxTime = 3600;
+
+ QPixmap m_ret;
+ QTimer* m_messageTimer;
+
+protected:
+ void moveEvent ( QMoveEvent * e);
+
+
+};
+
+#endif