summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/rfcpopup.cpp
blob: cc87b6c5f7114951c4b3b25933670e4ce02f2512 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

#include <qtimer.h>

#include "pppdialog.h"
#include "rfcpopup.h"

using namespace OpieTooth;

/*
 * c'tor init the QAction
 */
RfcCommPopup::RfcCommPopup()
    : QPopupMenu()  {
    qWarning("RfcCommPopup c'tor");

    QAction* a;

    /* connect action */
    a = new QAction(  ); // so it's get deleted
    a->setText("Connect");
    a->addTo( this );
    connect( a,  SIGNAL( activated() ),
             this, SLOT( slotConnect() ) );


    /* disconnect action */
    a = new QAction(  );
    a->setText("Disconnect");
    a->addTo( this );
    connect( a, SIGNAL( activated() ) ,
            this, SLOT( slotDisconnect() ) );


    /* foo action */
    a = new QAction(  );
    a->setText("Foo");
    a->addTo( this );
    connect( a, SIGNAL( activated() ),
            this, SLOT( slotFoo() ) );


    /* bar action */
    a = new QAction(  );
    a->setText( "Bar" );
    a->addTo( this );
    connect( a, SIGNAL( activated() ),
            this, SLOT( slotBar() ) );

};


RfcCommPopup::~RfcCommPopup() {
/*  delete m_con;
    delete m_dis;
    delete m_foo;
    delete m_bar; */
}


void RfcCommPopup::slotConnect() {

    qWarning("connect");



    PPPDialog pppDialog;
    pppDialog.showMaximized();
    pppDialog.exec();
}


void RfcCommPopup::slotDisconnect() {
    qWarning("slot disconnected");
}


void RfcCommPopup::slotFoo() {
    qWarning("slotFoo");
}


void RfcCommPopup::slotBar() {
    qWarning("slotBar");
};