123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #include "gui\rusificationwidget.h"
- #include "ui_rusificationwidget.h"
- void doStuffWithEveryItemInMyTree( QTreeWidgetItem *item )
- {
- item->setCheckState(0, Qt::Checked);
- for( int i = 0; i < item->childCount(); ++i )
- doStuffWithEveryItemInMyTree( item->child(i) );
- }
- RusificationWidget::RusificationWidget(LegacyApp *_app, QWidget *parent) :
- QWidget(parent),
- ui(new Ui::RusificationWidget),
- app(_app)
- {
- ui->setupUi(this);
- ui->treeWidget->expandAll();
- hide_all_import_widgets();
- doStuffWithEveryItemInMyTree(ui->treeWidget->invisibleRootItem());
- }
- RusificationWidget::~RusificationWidget()
- {
- delete ui;
- }
- void RusificationWidget::hide_all_import_widgets()
- {
- ui->database_import_widget->hide();
- ui->file_import_widget->hide();
- ui->textfragment_import_widget->hide();
- }
- void RusificationWidget::on_database_import_radiobutton_clicked()
- {
- hide_all_import_widgets();
- ui->database_import_widget->show();
- }
- void RusificationWidget::on_file_import_radiobutton_clicked()
- {
- hide_all_import_widgets();
- ui->file_import_widget->show();
- }
- void RusificationWidget::on_textfragment_import_radiobutton_clicked()
- {
- hide_all_import_widgets();
- ui->textfragment_import_widget->show();
- }
|