예제 #1
0
void show()
{
queuesize(50,150,200,170,50+45,150+5,60+45,155);
insertbutton(50,200,200,220,50+45,200+5,60+45,205);
delbutton(50,250,200,270,50+45,250+5,60+45,255);
dispbutton(50,300,200,320,50+45,300+5,60+45,305);
exitbutton(50,350,200,370,50+45,350+5,60+45,355);
}
예제 #2
0
int main( int argc, char **argv )
{
    QApplication app(argc, argv);
    BookMarkServerTestui obj;
    //QWidget* win=new QWidget();
    QWidget win;
    win.setWindowTitle("BOOKMARKS SERVER TESTUI");
    QPushButton* butadd=new QPushButton("Add Bookmark Google" );
    QPushButton* butadd1=new QPushButton("Add Bookmark yahoo" );
    QPushButton* butadd2=new QPushButton("Add Bookmark Nokia" );
    
    QPushButton* butdel=new QPushButton("del Bookmark Google" );
    QPushButton* butdel1=new QPushButton("del Bookmark Yahoo" );
    QPushButton* butdel2=new QPushButton("del Bookmark Nokia" );
    
    QPushButton* butfetch=new QPushButton("Fetch Bookmark" );
    QPushButton* butexit=new QPushButton("Exit Server" );
    QPushButton* Exitapp=new QPushButton("Exit UI" );
    //Add 
    QObject::connect(butadd,SIGNAL(clicked()),&obj,SLOT(buttonclicked()));
    QObject::connect(butadd1,SIGNAL(clicked()),&obj,SLOT(yahooclicked()));
    QObject::connect(butadd2,SIGNAL(clicked()),&obj,SLOT(nokiaclicked()));
    
    QObject::connect(butdel,SIGNAL(clicked()),&obj,SLOT(delbutton()));
    QObject::connect(butdel1,SIGNAL(clicked()),&obj,SLOT(delyahoo()));
    QObject::connect(butdel2,SIGNAL(clicked()),&obj,SLOT(delnokia()));
    
    
    QObject::connect(butfetch,SIGNAL(clicked()),&obj,SLOT(fetchbutton()));
    //QObject::connect(butexit,SIGNAL(clicked()),&obj,SLOT(closeAll()));
    QObject::connect(Exitapp,SIGNAL(clicked()),&app,SLOT(quit()));
    
    
    QVBoxLayout* lay=new QVBoxLayout();
    lay->addWidget(butadd);
    lay->addWidget(butadd1);
    lay->addWidget(butadd2);
    lay->addWidget(butdel);
    lay->addWidget(butdel1);
    lay->addWidget(butdel2);
    lay->addWidget(butfetch);
    //lay->addWidget(butexit);
    lay->addWidget(Exitapp);

    win.setLayout(lay);
    //win->show();
    win.showFullScreen();
    
/*    butadd->show();    
    butdel->show();
    butfetch->show();*/
    return app.exec();
}