1 #include "settingsdlg.h"
4 SettingsDlg::SettingsDlg(QWidget *parent) :
7 this->setWindowTitle(QString::fromUtf8("Lựa Chọn"));
9 buttonBox = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
10 buttonBox->setOrientation(Qt::Vertical);
11 connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
12 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
14 tabWidget = new QTabWidget;
15 tabWidget ->addTab(new GeneralTab(), QString::fromUtf8("Hiển Thị "));
16 tabWidget ->addTab(new ThemeTab(), QString::fromUtf8("Kiểu Mẫu Widget"));
18 mainLayout = new QGridLayout(this);
20 mainLayout->addWidget(tabWidget,0,0,1,1);
21 mainLayout->addWidget(buttonBox,0,1,1,1);
23 this->setLayout(mainLayout);
27 void SettingsDlg::showSettingsDialog(){
31 GeneralTab::GeneralTab(QWidget *parent)
34 mainLayout = new QVBoxLayout;
35 setLayout(mainLayout);
38 ThemeTab::ThemeTab(QWidget *parent)
41 themes = new QListWidget(this);
42 themes->addItem(new QListWidgetItem( QString::fromUtf8("Mặc định (344 x 200) pixel.")));
43 themes->addItem(new QListWidgetItem( QString::fromUtf8("Lớn (430 x 500) pixel.")));
44 mainLayout = new QVBoxLayout;
45 mainLayout->addWidget(themes);
46 setLayout(mainLayout);