3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 05/12/2010 Created this file. :-)
17 #include "dlginitial.h"
24 DlgInitial::DlgInitial(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/):
25 QDialog(parent, flags)
29 // Fill combobox with languages:
30 QStringList languageList = SYSTEM->getLanguageList();
32 for(QStringList::Iterator it=languageList.begin(); it!=languageList.end(); it++)
34 QString l = SYSTEM->symbolToLanguage(*it);
35 // ui.cbLanguage->insertItem(l);
36 // ui.cbLanguageCmd->insertItem(l);
37 ui.cbLanguage->addItem(l);
38 ui.cbLanguageCmd->addItem(l);
42 for(int i=RS2::None; i<RS2::LastUnit; i++)
43 // ui.cbUnit->insertItem(Units::unitToString((RS2::Unit)i));
44 ui.cbUnit->addItem(Units::unitToString((RS2::Unit)i));
46 // ui.cbUnit->setCurrentText("Millimeter");
47 // ui.cbLanguage->setCurrentText("English");
48 // ui.cbLanguageCmd->setCurrentText("English");
49 ui.cbUnit->setItemText(ui.cbUnit->currentIndex(), "Millimeter");
50 ui.cbLanguage->setItemText(ui.cbLanguage->currentIndex(), "English");
51 ui.cbLanguageCmd->setItemText(ui.cbLanguageCmd->currentIndex(), "English");
54 DlgInitial::~DlgInitial()
58 void DlgInitial::setText(const QString & t)
60 ui.lWelcome->setText(t);
63 void DlgInitial::setPixmap(const QPixmap & p)
65 ui.lImage->setPixmap(p);
70 settings.beginGroup("Appearance");
71 settings.setValue("Language", SYSTEM->languageToSymbol(ui.cbLanguage->currentText()));
72 settings.setValue("LanguageCmd", SYSTEM->languageToSymbol(ui.cbLanguageCmd->currentText()));
75 settings.beginGroup("Defaults");
76 settings.setValue("Unit", ui.cbUnit->currentText());