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 vboxlayout = new QVBoxLayout;
32 vboxlayout1 = new QVBoxLayout;
34 mainLayout = new QGridLayout(this);
36 vboxlayout1->addWidget(buttonBox);
38 view = new QDeclarativeView(this);
39 view->setSource(QUrl("/opt/lichvietwidget/qml/lichvietwidget/settings.qml"));
41 vboxlayout->addWidget(view);
43 mainLayout->addLayout(vboxlayout,0 ,0,1,1);
44 mainLayout->addLayout(vboxlayout1,0,1,1,1);
46 this->setLayout(mainLayout);
50 void SettingsDlg::showSettingsDialog(){
51 this->setMinimumHeight(325);