Changeset 35
- Timestamp:
- 05/27/08 14:49:14 (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
form_subscribe.cpp (modified) (2 diffs)
-
form_subscribe.h (modified) (1 diff)
-
form_subscribe_ui.cpp (modified) (1 diff)
-
form_subscribe_ui.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/form_subscribe.cpp
r20 r35 19 19 FormSubscribe::FormSubscribe (QWidget* parent) : FormSubscribeUI (parent) 20 20 { 21 connect(button_ok, SIGNAL(clicked()), this, SLOT(button_ok_clicked())); 22 connect(button_refresh, SIGNAL(clicked()), this, SLOT(button_refresh_clicked())); 23 connect(button_cancel, SIGNAL(clicked()), this, SLOT(reject())); 21 connect(button_ok, SIGNAL(clicked()), this, SLOT(button_ok_clicked())); 22 connect(button_refresh, SIGNAL(clicked()), this, SLOT(button_refresh_clicked())); 23 connect(button_select_all, SIGNAL(clicked()), this, SLOT(button_select_all_clicked())); 24 connect(button_select_none, SIGNAL(clicked()), this, SLOT(button_select_none_clicked())); 25 connect(button_cancel, SIGNAL(clicked()), this, SLOT(reject())); 24 26 25 27 // загрузка дерева … … 190 192 } 191 193 //---------------------------------------------------------------------------------------------- 194 195 void FormSubscribe::button_select_all_clicked () 196 { 197 for (int group_index = 0; group_index < tree_forum->topLevelItemCount(); group_index++) 198 { 199 QTreeWidgetItem* group_item = tree_forum->topLevelItem(group_index); 200 201 for (int forum_index = 0; forum_index < group_item->childCount(); forum_index++) 202 { 203 QTreeWidgetItem* forum_item = group_item->child(forum_index); 204 forum_item->setCheckState(0, Qt::Checked); 205 } 206 } 207 } 208 //---------------------------------------------------------------------------------------------- 209 210 void FormSubscribe::button_select_none_clicked () 211 { 212 for (int group_index = 0; group_index < tree_forum->topLevelItemCount(); group_index++) 213 { 214 QTreeWidgetItem* group_item = tree_forum->topLevelItem(group_index); 215 216 for (int forum_index = 0; forum_index < group_item->childCount(); forum_index++) 217 { 218 QTreeWidgetItem* forum_item = group_item->child(forum_index); 219 forum_item->setCheckState(0, Qt::Unchecked); 220 } 221 } 222 } 223 //---------------------------------------------------------------------------------------------- -
trunk/form_subscribe.h
r14 r35 29 29 30 30 // ОК 31 void button_ok_clicked ();31 void button_ok_clicked (); 32 32 // Отмена 33 33 void button_refresh_clicked (); 34 // выбрать все 35 void button_select_all_clicked (); 36 // отменить все 37 void button_select_none_clicked (); 34 38 }; 35 39 //---------------------------------------------------------------------------------------------- -
trunk/form_subscribe_ui.cpp
r7 r35 42 42 layout_button->addWidget(button_refresh); 43 43 44 button_select_all = new QPushButton(this); 45 button_select_all->setText(QString::fromUtf8("Выбрать все")); 46 layout_button->addWidget(button_select_all); 47 48 button_select_none = new QPushButton(this); 49 button_select_none->setText(QString::fromUtf8("Отменить все")); 50 layout_button->addWidget(button_select_none); 51 52 spacer_button = new QSpacerItem(1, height(), QSizePolicy::Maximum, QSizePolicy::Expanding); 53 layout_button->addItem(spacer_button); 54 44 55 button_cancel = new QPushButton(this); 45 56 button_cancel->setText(QString::fromUtf8("Отмена")); 46 57 button_cancel->setShortcut(QKeySequence("Esc")); 47 58 layout_button->addWidget(button_cancel); 48 49 spacer_button = new QSpacerItem(1, height(), QSizePolicy::Maximum, QSizePolicy::Expanding);50 layout_button->addItem(spacer_button);51 59 } 52 60 //---------------------------------------------------------------------------------------------- -
trunk/form_subscribe_ui.h
r18 r35 27 27 QPushButton* button_ok; 28 28 QPushButton* button_refresh; 29 QPushButton* button_select_all; 30 QPushButton* button_select_none; 29 31 QPushButton* button_cancel; 30 32
Note: See TracChangeset
for help on using the changeset viewer.
