2 Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>
18 #include "settingsdlg.h"
21 SettingsDlg::SettingsDlg(QWidget *parent) :
24 this->setWindowTitle(QString::fromUtf8("Lựa Chọn"));
26 buttonBox = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
27 buttonBox->setOrientation(Qt::Vertical);
28 connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
29 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
31 tabWidget = new QTabWidget;
32 tabWidget ->addTab(new ThemeTab(), QString::fromUtf8("Mẫu widget"));
33 tabWidget ->addTab(new GeneralTab(), QString::fromUtf8("Giới thiệu"));
35 mainLayout = new QGridLayout(this);
37 mainLayout->addWidget(tabWidget,0,0,1,1);
38 mainLayout->addWidget(buttonBox,0,1,1,1);
41 this->setLayout(mainLayout);
45 void SettingsDlg::showSettingsDialog(){
49 GeneralTab::GeneralTab(QWidget *parent)
52 mainLayout = new QVBoxLayout;
53 setLayout(mainLayout);
56 ThemeTab::ThemeTab(QWidget *parent)
59 themes = new QListWidget(this);
60 themes->addItem(new QListWidgetItem( QString::fromUtf8("Mặc định")));
61 themes->addItem(new QListWidgetItem( QString::fromUtf8("Vừa phải")));
62 themes->addItem(new QListWidgetItem( QString::fromUtf8("Lớn")));
64 mainLayout = new QVBoxLayout;
65 mainLayout->addWidget(themes);
66 setLayout(mainLayout);