Diffstat (limited to 'noncore/net/opietooth/manager/rfcpopup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp new file mode 100644 index 0000000..1b53f4b --- a/dev/null +++ b/noncore/net/opietooth/manager/rfcpopup.cpp | |||
@@ -0,0 +1,81 @@ | |||
1 | |||
2 | #include <qtimer.h> | ||
3 | |||
4 | #include "pppdialog.h" | ||
5 | #include "rfcpopup.h" | ||
6 | |||
7 | using namespace OpieTooth; | ||
8 | |||
9 | /* | ||
10 | * c'tor init the QAction | ||
11 | */ | ||
12 | RfcCommPopup::RfcCommPopup() | ||
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("Connect"); | ||
21 | a->addTo( this ); | ||
22 | connect( a, SIGNAL( activated() ), | ||
23 | this, SLOT( slotConnect() ) ); | ||
24 | |||
25 | |||
26 | /* disconnect action */ | ||
27 | a = new QAction( ); | ||
28 | a->setText("Disconnect"); | ||
29 | a->addTo( this ); | ||
30 | connect( a, SIGNAL( activated() ) , | ||
31 | this, SLOT( slotDisconnect() ) ); | ||
32 | |||
33 | |||
34 | /* foo action */ | ||
35 | a = new QAction( ); | ||
36 | a->setText("Foo"); | ||
37 | a->addTo( this ); | ||
38 | connect( a, SIGNAL( activated() ), | ||
39 | this, SLOT( slotFoo() ) ); | ||
40 | |||
41 | |||
42 | /* bar action */ | ||
43 | a = new QAction( ); | ||
44 | a->setText( "Bar" ); | ||
45 | a->addTo( this ); | ||
46 | connect( a, SIGNAL( activated() ), | ||
47 | this, SLOT( slotBar() ) ); | ||
48 | |||
49 | }; | ||
50 | |||
51 | |||
52 | RfcCommPopup::~RfcCommPopup() { | ||
53 | /* delete m_con; | ||
54 | delete m_dis; | ||
55 | delete m_foo; | ||
56 | delete m_bar; */ | ||
57 | } | ||
58 | |||
59 | |||
60 | void RfcCommPopup::slotConnect() { | ||
61 | qWarning("connect"); | ||
62 | PPPDialog pppDialog; | ||
63 | pppDialog.showMaximized(); | ||
64 | pppDialog.exec(); | ||
65 | } | ||
66 | |||
67 | |||
68 | void RfcCommPopup::slotDisconnect() { | ||
69 | qWarning("slot disconnected"); | ||
70 | } | ||
71 | |||
72 | |||
73 | void RfcCommPopup::slotFoo() { | ||
74 | qWarning("slotFoo"); | ||
75 | } | ||
76 | |||
77 | |||
78 | void RfcCommPopup::slotBar() { | ||
79 | qWarning("slotBar"); | ||
80 | }; | ||
81 | |||