48 QVBoxLayout *main_layout =
new QVBoxLayout(
this);
49 QGridLayout *tech_layout =
new QGridLayout();
51 QPushButton *effects_button;
52 QPushButton *add_button;
53 QPushButton *delete_button;
54 QPushButton *edit_button;
65 tech_layout->setSizeConstraint(QLayout::SetMaximumSize);
67 label =
new QLabel(QString::fromUtf8(
R__(
"Rule Name")));
68 label->setParent(
this);
69 rname =
new QLineEdit(
this);
72 tech_layout->addWidget(label, row, 0);
73 tech_layout->addWidget(
rname, row++, 2);
75 label =
new QLabel(QString::fromUtf8(
R__(
"Name")));
76 label->setParent(
this);
79 name =
new QLineEdit(
this);
82 tech_layout->addWidget(label, row, 0);
83 tech_layout->addWidget(
same_name, row, 1);
84 tech_layout->addWidget(
name, row++, 2);
86 edit_button =
new QPushButton(QString::fromUtf8(
R__(
"Edit Values")),
this);
87 connect(edit_button, SIGNAL(pressed()),
this, SLOT(
edit_now()));
88 tech_layout->addWidget(edit_button, row++, 2);
90 label =
new QLabel(QString::fromUtf8(
R__(
"Req1")));
91 label->setParent(
this);
96 tech_layout->addWidget(label, row, 0);
99 label =
new QLabel(QString::fromUtf8(
R__(
"Req2")));
100 label->setParent(
this);
104 tech_layout->addWidget(label, row, 0);
107 label =
new QLabel(QString::fromUtf8(
R__(
"Root Req")));
108 label->setParent(
this);
113 tech_layout->addWidget(label, row, 0);
116 effects_button =
new QPushButton(QString::fromUtf8(
R__(
"Effects")),
this);
117 connect(effects_button, SIGNAL(pressed()),
this, SLOT(
edit_effects()));
118 tech_layout->addWidget(effects_button, row++, 2);
120 add_button =
new QPushButton(QString::fromUtf8(
R__(
"Add tech")),
this);
121 connect(add_button, SIGNAL(pressed()),
this, SLOT(
add_now()));
122 tech_layout->addWidget(add_button, row, 0);
125 delete_button =
new QPushButton(QString::fromUtf8(
R__(
"Remove this tech")),
this);
126 connect(delete_button, SIGNAL(pressed()),
this, SLOT(
delete_now()));
127 tech_layout->addWidget(delete_button, row++, 2);
133 main_layout->addLayout(tech_layout);
135 setLayout(main_layout);
161 QMenu *menu =
new QMenu();
163 button->setToolButtonStyle(Qt::ToolButtonTextOnly);
164 button->setPopupMode(QToolButton::MenuButtonPopup);
168 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
req1_menu(QAction *)));
171 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
req2_menu(QAction *)));
174 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
root_req_menu(QAction *)));
181 button->setMenu(menu);