-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 @@ | |||
1 | |||
2 | #include <qtimer.h> | ||
3 | |||
4 | #include "obexdialog.h" | ||
5 | #include "obexpopup.h" | ||
6 | |||
7 | using namespace OpieTooth; | ||
8 | |||
9 | /* | ||
10 | * c'tor init the QAction | ||
11 | */ | ||
12 | ObexPopup::ObexPopup() | ||
13 | : QPopupMenu() { | ||
14 | qWarning("RfcCommPopup c'tor"); | ||
15 | |||
16 | QAction* a; | ||
17 | |||
18 | /* connect action */ | ||
19 | a = new QAction( ); // so it's get deleted | ||
20 | a->setText("Push file"); | ||
21 | a->addTo( this ); | ||
22 | connect( a, SIGNAL( activated() ), | ||
23 | this, SLOT( slotPush() ) ); | ||
24 | }; | ||
25 | |||
26 | |||
27 | ObexPopup::~ObexPopup() { | ||
28 | } | ||
29 | |||
30 | |||
31 | void ObexPopup::slotPush() { | ||
32 | |||
33 | qWarning("push something"); | ||
34 | |||
35 | |||
36 | ObexDialog obexDialog; | ||
37 | obexDialog.showMaximized(); | ||
38 | obexDialog.exec(); | ||
39 | } | ||
40 | |||
41 | |||
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 @@ | |||
1 | #ifndef OBEXPOPUP_H | ||
2 | #define OBEXPOPUP_H | ||
3 | |||
4 | #include <qpopupmenu.h> | ||
5 | #include <qaction.h> | ||
6 | |||
7 | namespace OpieTooth { | ||
8 | |||
9 | class ObexPopup : public QPopupMenu { | ||
10 | Q_OBJECT | ||
11 | public: | ||
12 | ObexPopup(); | ||
13 | ~ObexPopup(); | ||
14 | |||
15 | |||
16 | private: | ||
17 | QAction* m_push; | ||
18 | private slots: | ||
19 | void slotPush(); | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | #endif | ||