* Know bugs fixed
[lichviet-widget] / settingsdlg.cpp
1 /*
2 Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
3
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.
8
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.
13
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/>
16 */
17
18 #include "settingsdlg.h"
19
20
21 SettingsDlg::SettingsDlg(QWidget *parent) :
22     QDialog(parent)
23 {
24     this->setWindowTitle(QString::fromUtf8("Lựa Chọn"));
25
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()));
30
31     vboxlayout = new QVBoxLayout;
32     vboxlayout1 = new QVBoxLayout;
33
34     mainLayout = new QGridLayout(this);
35
36     vboxlayout1->addWidget(buttonBox);
37
38     view = new QDeclarativeView(this);
39     view->setSource(QUrl("/opt/lichvietwidget/qml/lichvietwidget/settings.qml"));
40
41     vboxlayout->addWidget(view);
42
43     mainLayout->addLayout(vboxlayout,0 ,0,1,1);
44     mainLayout->addLayout(vboxlayout1,0,1,1,1);
45 \
46     this->setLayout(mainLayout);
47
48 }
49
50 void SettingsDlg::showSettingsDialog(){
51     this->setMinimumHeight(325);
52     this->show();
53 }
54