-rw-r--r-- | noncore/settings/aqpkg/letterpushbutton.cpp | 34 | ||||
-rw-r--r-- | noncore/settings/aqpkg/letterpushbutton.h | 41 |
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 |