-rw-r--r-- | noncore/net/opietooth/manager/obexpopup.cpp | 41 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexpopup.h | 23 |
2 files changed, 64 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp new file mode 100644 index 0000000..a550648 --- a/dev/null +++ b/noncore/net/opietooth/manager/obexpopup.cpp @@ -0,0 +1,41 @@ + +#include <qtimer.h> + +#include "obexdialog.h" +#include "obexpopup.h" + +using namespace OpieTooth; + +/* + * c'tor init the QAction + */ +ObexPopup::ObexPopup() + : QPopupMenu() { + qWarning("RfcCommPopup c'tor"); + + QAction* a; + + /* connect action */ + a = new QAction( ); // so it's get deleted + a->setText("Push file"); + a->addTo( this ); + connect( a, SIGNAL( activated() ), + this, SLOT( slotPush() ) ); +}; + + +ObexPopup::~ObexPopup() { +} + + +void ObexPopup::slotPush() { + + qWarning("push something"); + + + ObexDialog obexDialog; + obexDialog.showMaximized(); + obexDialog.exec(); +} + + diff --git a/noncore/net/opietooth/manager/obexpopup.h b/noncore/net/opietooth/manager/obexpopup.h new file mode 100644 index 0000000..ba95e27 --- a/dev/null +++ b/noncore/net/opietooth/manager/obexpopup.h @@ -0,0 +1,23 @@ +#ifndef OBEXPOPUP_H +#define OBEXPOPUP_H + +#include <qpopupmenu.h> +#include <qaction.h> + +namespace OpieTooth { + + class ObexPopup : public QPopupMenu { + Q_OBJECT + public: + ObexPopup(); + ~ObexPopup(); + + + private: + QAction* m_push; + private slots: + void slotPush(); + }; +}; + +#endif |