1 /*******************************************************************************
3 This file is part of mDictionary.
5 mDictionary is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 mDictionary is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
18 Copyright 2010 Comarch S.A.
20 *******************************************************************************/
22 //Created by Mateusz Półrola
24 #include "XdxfDictSelectDialog.h"
26 XdxfDictSelectDialog::XdxfDictSelectDialog(QWidget *parent) :
28 layout = new QVBoxLayout;
31 checkBoxLayout = new QHBoxLayout;
32 layout->addLayout(checkBoxLayout);
34 langFrom = new QComboBox;
35 langTo = new QComboBox;
37 checkBoxLayout->addWidget(langFrom);
38 checkBoxLayout->addWidget(langTo);
41 treeWidget = new QTreeWidget;
42 treeWidget->setRootIsDecorated(false);
43 treeWidget->setColumnCount(4);
45 headers << tr("From") << tr("To") << tr("Name") << tr("Size");
46 treeWidget->setHeaderLabels(headers);
47 treeWidget->setColumnWidth(0, 100);
48 treeWidget->setColumnWidth(1, 100);
49 treeWidget->setColumnWidth(2, 100);
50 treeWidget->setColumnWidth(3, 100);
51 layout->addWidget(treeWidget);
54 connect(langFrom, SIGNAL(currentIndexChanged(int)),
55 this, SLOT(refreshDictList()));
57 connect(langTo, SIGNAL(currentIndexChanged(int)),
58 this, SLOT(refreshDictList()));
61 setMinimumSize(400,200);
63 setMinimumHeight(350);
70 void XdxfDictSelectDialog::refreshDictList() {
73 treeWidget->insertTopLevelItem(0, new QTreeWidgetItem(l));