Public Member Functions | |
HelloApplication (const WEnvironment &env) | |
Private Member Functions | |
void | greet () |
Private Attributes | |
WLineEdit * | nameEdit_ |
WText * | greeting_ |
Definition at line 20 of file hello.C.
HelloApplication::HelloApplication | ( | const WEnvironment & | env | ) |
Definition at line 38 of file hello.C.
00039 : WApplication(env) 00040 { 00041 setTitle("Hello world"); // application title 00042 00043 root()->addWidget(new WText("Your name, please ? ")); // show some text 00044 nameEdit_ = new WLineEdit(root()); // allow text input 00045 nameEdit_->setFocus(); // give focus 00046 00047 WPushButton *b = new WPushButton("Greet me.", root()); // create a button 00048 b->setMargin(5, WWidget::Left); // add 5 pixels margin 00049 00050 root()->addWidget(new WBreak()); // insert a line break 00051 00052 greeting_ = new WText(root()); // empty text 00053 00054 /* 00055 * Connect signals with slots 00056 */ 00057 b->clicked.connect(SLOT(this, HelloApplication::greet)); 00058 nameEdit_->enterPressed.connect(SLOT(this, HelloApplication::greet)); 00059 }
void HelloApplication::greet | ( | ) | [private] |
WLineEdit* HelloApplication::nameEdit_ [private] |
WText* HelloApplication::greeting_ [private] |