diff options
-rw-r--r-- | client/widgets/main.cc | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/client/widgets/main.cc b/client/widgets/main.cc deleted file mode 100644 index fc4603d..0000000 --- a/client/widgets/main.cc +++ /dev/null @@ -1,42 +0,0 @@ -#include "widget.h" -#include "label.h" -#include "lineedit.h" -#include "pushbutton.h" -#include <QApplication> -#include <QVBoxLayout> -#include <vector> - -std::vector< Widget* > widgets; - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QWidget widget; - QVBoxLayout *layout = new QVBoxLayout(); - - Label *label = new Label(&widget, "Test label:", "center"); - LineEdit *lineedit = new LineEdit(&widget, "[0-9]+"); - widgets.push_back(lineedit); - LineEdit *lineedit2 = new LineEdit(&widget, "[0-9]+"); - widgets.push_back(lineedit2); - PushButton *pushbutton = new PushButton(&widget, "Commit", "committer"); - widgets.push_back(pushbutton); - - layout->addWidget(label); - layout->addWidget(lineedit); - layout->addWidget(lineedit2); - layout->addWidget(pushbutton); - - widget.setLayout(layout); - widget.show(); - - app.exec(); - - std::vector< Widget* >::iterator i=widgets.begin(); - while (i != widgets.end()) { - Widget* w = *i; - printf("%s = %s\n", w->getName().toStdString().c_str(), w->getValue().toStdString().c_str()); - i++; - } -} |