summaryrefslogtreecommitdiff
path: root/noncore
authorandyq <andyq>2002-10-16 21:23:18 (UTC)
committer andyq <andyq>2002-10-16 21:23:18 (UTC)
commitb44c3eeb732a115e7c49e6ca9880e674f28da43e (patch) (side-by-side diff)
treeb14ac194bc06b180aed243de4240be3899394cd1 /noncore
parent236caec506d95d29b6bff48a00821512c91a217e (diff)
downloadopie-b44c3eeb732a115e7c49e6ca9880e674f28da43e.zip
opie-b44c3eeb732a115e7c49e6ca9880e674f28da43e.tar.gz
opie-b44c3eeb732a115e7c49e6ca9880e674f28da43e.tar.bz2
Initial version
Class which returns a string as a signal when the button is pressed the string is the button text (so you know which is pushed)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/letterpushbutton.cpp34
-rw-r--r--noncore/settings/aqpkg/letterpushbutton.h41
2 files changed, 75 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/letterpushbutton.cpp b/noncore/settings/aqpkg/letterpushbutton.cpp
new file mode 100644
index 0000000..afe25d8
--- a/dev/null
+++ b/noncore/settings/aqpkg/letterpushbutton.cpp
@@ -0,0 +1,34 @@
+/***************************************************************************
+ letterpushbutton.cpp - description
+ -------------------
+ begin : Wed Oct 16 2002
+ copyright : (C) 2002 by Andy Qua
+ email : andy.qua@blueyonder.co.uk
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "letterpushbutton.h"
+
+LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name=0 )
+ : QPushButton( text, parent, name )
+{
+ connect( this, SIGNAL(released()), this, SLOT(released_emmitor()) );
+}
+
+LetterPushButton :: ~LetterPushButton()
+{
+}
+
+void LetterPushButton :: released_emmitor()
+{
+ emit released( text() );
+}
+
diff --git a/noncore/settings/aqpkg/letterpushbutton.h b/noncore/settings/aqpkg/letterpushbutton.h
new file mode 100644
index 0000000..e45b89d
--- a/dev/null
+++ b/noncore/settings/aqpkg/letterpushbutton.h
@@ -0,0 +1,41 @@
+/***************************************************************************
+ letterpushbutton.h - description
+ -------------------
+ begin : Wed Oct 16 2002
+ copyright : (C) 2002 by Andy Qua
+ email : andy.qua@blueyonder.co.uk
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 LETTERPUSHBUTTON_H
+#define LETTERPUSHBUTTON_H
+
+#include <qpushbutton.h>
+
+/**
+ *@author Andy Qua
+ */
+
+class LetterPushButton : public QPushButton
+{
+ Q_OBJECT
+public:
+ LetterPushButton( const QString & text, QWidget * parent, const char * name=0 );
+ ~LetterPushButton();
+
+public slots:
+ void released_emmitor();
+
+signals:
+ void released( QString text );
+};
+
+#endif