[kad-general] [PATCH] KDE4-port-of-qg_dlginitial

[ Thread Index | Date Index | More lists.tuxfamily.org/kad-general Archives ]


From a9836c0d100dc19357d48890bd52eb4c32216c91 Mon Sep 17 00:00:00 2001
From: Riccardo Gori <goric@xxxxxxxxxxx>
Date: Mon, 7 Apr 2008 23:25:02 +0200
Subject: [PATCH] KDE4 port of qg_dlginitial

---
 kad/src/main.cpp                 |   15 +--
 kadgui/src/CMakeLists.txt        |    2 +-
 kadgui/src/kg_dlginitial.cpp     |   98 ++++++++++++++++++
 kadgui/src/kg_dlginitial.h       |   50 +++++++++
 kadgui/src/ui/qg_dlginitial.ui   |  204 --------------------------------------
 kadgui/src/ui/qg_dlginitial.ui.h |   55 ----------
 qcadlib/src/debug/rs_debug.cpp   |   17 ++--
 qcadlib/src/debug/rs_debug.h     |    3 +
 qcadlib/src/engine/rs.h          |    3 +-
 qcadlib/src/engine/rs_units.cpp  |    2 +-
 10 files changed, 167 insertions(+), 282 deletions(-)
 create mode 100644 kadgui/src/kg_dlginitial.cpp
 create mode 100644 kadgui/src/kg_dlginitial.h
 delete mode 100644 kadgui/src/ui/qg_dlginitial.ui
 delete mode 100644 kadgui/src/ui/qg_dlginitial.ui.h

diff --git a/kad/src/main.cpp b/kad/src/main.cpp
index 6e45c5e..632fbeb 100644
--- a/kad/src/main.cpp
+++ b/kad/src/main.cpp
@@ -52,7 +52,7 @@
 #include "rs_filterdxf.h"
 #include "rs_filterdxf1.h"
 
-#include "qg_dlginitial.h"
+#include "kg_dlginitial.h"
 
 #include "qc_applicationwindow.h"
 
@@ -146,21 +146,14 @@ int main(int argc, char** argv)
 	// show initial config dialog:
 	if (unit=="Invalid") {
 		RS_DEBUG->print("main: show initial config dialog..");
-		QG_DlgInitial di(NULL);
-		di.setText("<font size=\"+1\"><b>Welcome to " QC_APPNAME "</b></font>"
-		"<br>"
-		"Please choose the unit you want to use for new drawings and your "
-		"preferred language.<br>"
-		"You can changes these settings later in the "
-		"Options Dialog of " QC_APPNAME ".");
-		QPixmap pxm(intro_xpm);
-		di.setPixmap(pxm);
-		if (di.exec()) {
+		KG_DlgInitial *di = new KG_DlgInitial();
+		if (di->exec() == 0) {
 			RS_SETTINGS->beginGroup("/Defaults");
 			unit = RS_SETTINGS->readEntry("/Unit", "None");
     		RS_SETTINGS->endGroup();
 		}
 		RS_DEBUG->print("main: show initial config dialog: OK");
+		di = NULL;	//The dialog widget delete itself when closed
 	}
 
     RS_FONTLIST->init();
diff --git a/kadgui/src/CMakeLists.txt b/kadgui/src/CMakeLists.txt
index 41e76d5..a533662 100644
--- a/kadgui/src/CMakeLists.txt
+++ b/kadgui/src/CMakeLists.txt
@@ -40,7 +40,6 @@ kde4_add_ui_files(ui_SRCS
         ui/qg_dlgellipse.ui
         ui/qg_dlghatch.ui
         ui/qg_dlgimageoptions.ui
-        ui/qg_dlginitial.ui
         ui/qg_dlginsert.ui
         ui/qg_dlgline.ui
         ui/qg_dlgmirror.ui
@@ -84,6 +83,7 @@ kde4_add_ui_files(ui_SRCS
 
 kde4_add_library(kadgui STATIC
 	${ui_SRCS}
+	kg_dlginitial.cpp
 	qg_actionhandler.cpp
 	qg_blockwidget.cpp
 	qg_commandedit.cpp
diff --git a/kadgui/src/kg_dlginitial.cpp b/kadgui/src/kg_dlginitial.cpp
new file mode 100644
index 0000000..d083065
--- /dev/null
+++ b/kadgui/src/kg_dlginitial.cpp
@@ -0,0 +1,98 @@
+/***************************************************************************
+ *   Copyright (C) 2008 by Riccardo Gori                                   *
+ *   goric@xxxxxxxxxxx                                                     *
+ *                                                                         *
+ *   This file is part of the KAD project.                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#include "kg_dlginitial.h"
+
+#include "rs.h"
+#include "rs_units.h"
+#include "rs_settings.h"
+
+#include <QLabel>
+#include <QGridLayout>
+#include <QComboBox>
+#include <KLanguageButton>
+
+KG_DlgInitial::KG_DlgInitial(QWidget *parent) : KDialog(parent)
+{
+    setAttribute(Qt::WA_DeleteOnClose, true);
+    enableLinkedHelp(false);
+    setButtons( Ok );
+    setPlainCaption("Welcome");
+    initWidget();
+    setMainWidget(configWidget_);
+}
+
+KG_DlgInitial::~KG_DlgInitial()
+{
+}
+
+void KG_DlgInitial::initWidget()
+{
+    configWidget_ = new QWidget(this);
+    QLabel *mainTextLabel = new QLabel(configWidget_);
+    mainTextLabel->setWordWrap(true);
+    mainTextLabel->setText("<font size=\"+1\"><b>Welcome to KAD</b></font>"
+		"<br>"
+		"Please choose the unit you want to use for new drawings and your "
+		"preferred language.<br>"
+		"You can changes these settings later in the "
+		"Options Dialog of KAD.");
+    
+    unitsCombo_ = new QComboBox(configWidget_);
+    for (int i=RS2::None; i<RS2::LastUnit; i++) {
+	unitsCombo_->addItem(RS_Units::unitToString((RS2::Unit)i));
+    }
+    unitsCombo_->setCurrentIndex(RS2::Millimeter);
+    
+    guiLangCombo_ = new KLanguageButton(configWidget_);
+    guiLangCombo_->loadAllLanguages();
+    commandLangCombo_ = new KLanguageButton(configWidget_);
+    commandLangCombo_->loadAllLanguages();
+    
+    QGridLayout *gridLayout = new QGridLayout(configWidget_);
+    gridLayout->addWidget(mainTextLabel, 0, 0, 1, 2);
+    QLabel *unitsLabel = new QLabel(configWidget_);
+    unitsLabel->setText("Default Unit:");
+    gridLayout->addWidget(unitsLabel, 1, 0);
+    gridLayout->addWidget(unitsCombo_, 1, 1);
+    QLabel *guiLangLabel = new QLabel(configWidget_);
+    guiLangLabel->setText("GUI Language:");
+    gridLayout->addWidget(guiLangLabel, 2, 0);
+    gridLayout->addWidget(guiLangCombo_, 2, 1);
+    QLabel *commandLangLabel = new QLabel(configWidget_);
+    commandLangLabel->setText("Command Language:");
+    gridLayout->addWidget(commandLangLabel, 3, 0);
+    gridLayout->addWidget(commandLangCombo_, 3, 1);
+}
+
+void KG_DlgInitial::accept()
+{
+    RS_SETTINGS->beginGroup("/Appearance");
+    RS_SETTINGS->writeEntry("/Language", guiLangCombo_->current());
+    RS_SETTINGS->writeEntry("/LanguageCmd", commandLangCombo_->current());
+    RS_SETTINGS->endGroup();
+    
+    RS_SETTINGS->beginGroup("/Defaults");
+    RS_SETTINGS->writeEntry("/Unit", unitsCombo_->currentText());
+    RS_SETTINGS->endGroup();
+    done(1);
+}
diff --git a/kadgui/src/kg_dlginitial.h b/kadgui/src/kg_dlginitial.h
new file mode 100644
index 0000000..1607585
--- /dev/null
+++ b/kadgui/src/kg_dlginitial.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ *   Copyright (C) 2008 by Riccardo Gori                                   *
+ *   goric@xxxxxxxxxxx                                                     *
+ *                                                                         *
+ *   This file is part of the KAD project.                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#ifndef KG_DLGINITIAL
+#define KG_DLGINITIAL
+
+#include <KDialog>
+
+class QComboBox;
+class KLanguageButton;
+
+class KG_DlgInitial : public KDialog
+{
+    Q_OBJECT
+    
+    public:
+	KG_DlgInitial(QWidget *parent = 0);
+	~KG_DlgInitial();
+	
+    public slots:
+	void accept();
+	
+    private:
+	void initWidget();
+	QWidget *configWidget_;
+	QComboBox *unitsCombo_;
+	KLanguageButton *guiLangCombo_;
+	KLanguageButton *commandLangCombo_;
+};
+
+#endif //KG_DLGINITIAL
diff --git a/kadgui/src/ui/qg_dlginitial.ui b/kadgui/src/ui/qg_dlginitial.ui
deleted file mode 100644
index fd9570f..0000000
--- a/kadgui/src/ui/qg_dlginitial.ui
+++ /dev/null
@@ -1,204 +0,0 @@
-<ui version="4.0" stdsetdef="1" >
-  <author></author>
-  <comment></comment>
-  <exportmacro></exportmacro>
-  <class>QG_DlgInitial</class>
-  <widget class="QDialog" name="QG_DlgInitial" >
-    <property name="geometry" >
-      <rect>
-        <x>0</x>
-        <y>0</y>
-        <width>413</width>
-        <height>287</height>
-      </rect>
-    </property>
-    <property name="windowTitle" >
-      <string>Welcome</string>
-    </property>
-    <property name="sizeGripEnabled" >
-      <bool>false</bool>
-    </property>
-    <layout class="QVBoxLayout" >
-      <item>
-        <layout class="QHBoxLayout" >
-          <property name="spacing" >
-            <number>19</number>
-          </property>
-          <item>
-            <widget class="QLabel" name="lImage" >
-              <property name="sizePolicy" >
-                <sizepolicy>
-                  <hsizetype>0</hsizetype>
-                  <vsizetype>5</vsizetype>
-                  <horstretch>1</horstretch>
-                  <verstretch>0</verstretch>
-                </sizepolicy>
-              </property>
-              <property name="frameShape" >
-                <enum>QFrame::WinPanel</enum>
-              </property>
-              <property name="frameShadow" >
-                <enum>QFrame::Sunken</enum>
-              </property>
-              <property name="lineWidth" >
-                <number>1</number>
-              </property>
-              <property name="pixmap" >
-                <pixmap>image0</pixmap>
-              </property>
-              <property name="scaledContents" >
-                <bool>true</bool>
-              </property>
-              <property name="wordWrap" >
-                <bool>false</bool>
-              </property>
-            </widget>
-          </item>
-          <item>
-            <layout class="QVBoxLayout" >
-              <item>
-                <widget class="QLabel" name="lWelcome" >
-                  <property name="sizePolicy" >
-                    <sizepolicy>
-                      <hsizetype>5</hsizetype>
-                      <vsizetype>5</vsizetype>
-                      <horstretch>0</horstretch>
-                      <verstretch>0</verstretch>
-                    </sizepolicy>
-                  </property>
-                  <property name="text" >
-                    <string>&lt;font size="+1">&lt;b>Welcome to QCad&lt;/b>
-&lt;/font>
-&lt;br>
-Please choose the unit you want to use for new drawings and your preferred language.&lt;br>
-You can changes these settings later in the Options Dialog of QCad.</string>
-                  </property>
-                  <property name="alignment" >
-                    <set>Qt::AlignVCenter</set>
-                  </property>
-                  <property name="wordWrap" >
-                    <bool>true</bool>
-                  </property>
-                </widget>
-              </item>
-              <item>
-                <layout class="QGridLayout" >
-                  <property name="margin" >
-                    <number>14</number>
-                  </property>
-                  <item row="2" column="1" >
-                    <widget class="QComboBox" name="cbLanguageCmd" />
-                  </item>
-                  <item row="1" column="1" >
-                    <widget class="QComboBox" name="cbLanguage" />
-                  </item>
-                  <item row="0" column="1" >
-                    <widget class="QComboBox" name="cbUnit" />
-                  </item>
-                  <item row="0" column="0" >
-                    <widget class="QLabel" name="lUnit" >
-                      <property name="text" >
-                        <string>Default Unit:</string>
-                      </property>
-                      <property name="wordWrap" >
-                        <bool>false</bool>
-                      </property>
-                    </widget>
-                  </item>
-                  <item row="1" column="0" >
-                    <widget class="QLabel" name="lLanguage" >
-                      <property name="text" >
-                        <string>GUI Language:</string>
-                      </property>
-                      <property name="wordWrap" >
-                        <bool>false</bool>
-                      </property>
-                    </widget>
-                  </item>
-                  <item row="2" column="0" >
-                    <widget class="QLabel" name="lCmdLanguage" >
-                      <property name="text" >
-                        <string>Command Language:</string>
-                      </property>
-                      <property name="wordWrap" >
-                        <bool>false</bool>
-                      </property>
-                    </widget>
-                  </item>
-                </layout>
-              </item>
-            </layout>
-          </item>
-        </layout>
-      </item>
-      <item>
-        <layout class="QHBoxLayout" >
-          <property name="margin" >
-            <number>0</number>
-          </property>
-          <property name="spacing" >
-            <number>6</number>
-          </property>
-          <item>
-            <spacer name="Horizontal Spacing2" >
-              <property name="sizeHint" >
-                <size>
-                  <width>20</width>
-                  <height>20</height>
-                </size>
-              </property>
-              <property name="sizeType" >
-                <enum>QSizePolicy::Expanding</enum>
-              </property>
-              <property name="orientation" >
-                <enum>Qt::Horizontal</enum>
-              </property>
-            </spacer>
-          </item>
-          <item>
-            <widget class="QPushButton" name="buttonOk" >
-              <property name="text" >
-                <string>OK</string>
-              </property>
-              <property name="shortcut" >
-                <string>Enter</string>
-              </property>
-              <property name="autoDefault" >
-                <bool>true</bool>
-              </property>
-              <property name="default" >
-                <bool>true</bool>
-              </property>
-            </widget>
-          </item>
-        </layout>
-      </item>
-    </layout>
-  </widget>
-  <layoutdefault spacing="6" margin="11" />
-  <tabstops>
-    <tabstop>cbUnit</tabstop>
-    <tabstop>cbLanguage</tabstop>
-    <tabstop>cbLanguageCmd</tabstop>
-    <tabstop>buttonOk</tabstop>
-  </tabstops>
-  <images>
-    <image name="image0" >
-      <data format="XPM.GZ" length="53595" >789ced9d595323bb92c7dfcfa7e8387abb31a1eb7d89897968361b9bcdec30310fdaca6016378b0df4c47cf74929ff32c618cad0f43d7566ea2a7c9a1f5a73512a4beedbf5cf7f7c3bded9fcf68f7ffe7177afeecfcd3773a66ebffdc38eaeae9efef3bffee3bffff8b358287c2b956adf2ab5eab7d29ffff6c79fbdfb6fe69b2884ff79966be00ab3face5c6f2649e025b065969dc00d6adf08dc0637c05b60034e3cd3324c91e71b32fb1278055c61563f99abd639cf5a31d78baee65984f98a0d6acfe377c10d6621c186590be65a11e369e646946f99591521dfc873a95034255e5f8bd997c015708559150337899ba17e1ddc006f800db3ad31d79b9562588f616e623dc67a2e174ba61ceae53673b900de045798d50ab3aa429ea3c04daae7f9fbe006b318810db30de3578ae506af47dc820db32c33570aa8df0457b0fe4be6bad536b40ff35754a9525161fc36b8c1ac0acc15d4cb2530eac5186c98b565d68ee5130f9eaba592a9067f9682b95c005f315750afae99abb11efdab55668df675cbfe259b8155b952e5f5ac801bcc6a3b728dc7bb648ee399f68479fd18afdac4fc6ec25c7f0bb6cc6ec8dcacf2f8a2086ef2fad446e424b0c678513f49d86fb5d2647d8760c3acf6982b0566b3c61ce7d77b91d17f99b956c47a305e0deb330fe026b3ad323721bfdd04477fbf005bacbfccacaa751dc62f316b057b877852237fa9b1fe0fc10d66b10436a8af314779ec3133ad97eb6fc14df4b760cb6c2bcc4d0b7fe7f5295de2f52ad69732d11f833deae58aa99703af33570bccc93573adca2c1518f3cb53b045bd61ae17c1e85f477f3de14660b5c9dcac223e16c088d7a6cfac4bcd4a68bfca6ca05fb91f58c7f5d9fe84833dcc0db809fbc4f69659df31d7a3fd1ec14d1e4fb909877a3502a3bfed322b85fd83f1b46af0f883c836c46f7306762c8fb967b6251d5827ccaec4f2d9e01f8d72c1707bbbc75c049b4be6893dc660cbfa158ab95e643625705cff4964ae9745e606daab2a18f6d25bcc74deb0bd2accb6067f0af669903e597eb1066e32db33b065369ab911edd58a8cfee760f417db60f4d7ab91591f1afd9b45f88b9eb009f51b60ab984b9159fff68959d7100fb6c00eeb7f603625ecbf2a58b13e4c07ec783e17f29166a586f58903e63ad6970cc155d4ef80d1de25cc0db477db60b4d745701c7f9939caaf315f13eded06b32a229ec9c8269c7f6a0bec98cd88d99614ebb30386bd759f79e2afbdc0943d717b639849bea00f53075b66a999a37cd282d15e95c04dd8ef118cfe6e9fb909ff742632e43d05a37f12eba37ebb13e6f9c031bed80b665b82bf06fdab4acc178d60ae57395f53066c597ef183998e5fb6771fdc045f81d15e3f31378be04330fabb3a38ee87efe0284f3f32c677ccaa88f62232d6d705637c93306bc7fb43a1bd29d96ad0c723b886f8d0664ea2fd83ff29532e703e65597eb237ef2f71c94cfa60fbaf829bcc49acc7feb425e6666c7f00467b5963568a595c80b17ebbce4c019afd81f56d0ce2afddf5ac293de4f59a2730f27f2799497dac5fc55c36ccc9397305ecc6cc515ed5676e44f9af999b45c49bc831dedd45c678c7e026ce875330c633b7130eeb179047617cbd36e150ef309fc27cb21e19edbb13e67cf81e0cfd3ac8ab1ce441bd8ee7d766643eefdc005c833ea0bf781e5ac1ec6af0c77a649cff4760c5ebd167ccd1df540b8cf62ee4abda56b17ec5fab4cd28cf777013e7d9180cfd992b6615f39593c8d0af01633dae03863f091d19ebfdc1acd15e4546bdbd64b60af18df56b1de28fd900a3bd09f1d950b4e1e74d3762ae5913f6a779648ee7a559666e1611af96c0f13c2e80d1dffd648efea22e2273bdda67d62566bd3261d6c719b886f6c760c76cef994d09fab9898cf69760f4b76570dccff5c888471d668b7c4bd49827fed305e33c13cdc838af4f981305f9833f1a5b2c409e3be692614e505fb5cc76c8dca8f27a9c665645667d0fae727bdd6326fdb03d0b60c4273d61ccbf01c6fa1debc31af4773f22431f3fc1f037d9888cf65b608c67c7cc0efbd79e83a10f3b604e602fb50e4ea0df907fd076b3c87fbf33c7e7ade40cdce4f519c5dc68f2f3bfd901e3bc726bcccdd87e9759c17f25da537ce7783260d6f00759658ee79542ffa81fbd1d99ef534c038cfee28ad9c6fe168cfe667dc27c1f5301c77806f912f8b309f6b02ede572592b962d09ef5e56a16cf0743e686e57cc2dd3037717f64aec155dc3f9d4546fefe63c2613fb84366e5f8bec7b07e9c2e810fc090c7a07ff447b33f618e4fc791d17e15ec381f764791717eb17e9c417cd0a83798cf8ec08adbcb4264e87707ecc0d04fd4b77160d41bc8eb4ab86f80be1d9e775dd88fae56325c6f77982b0d665d658ecf7b463237713fe04ec0b86f7117ccda61be27e628af427bf237b65f198ce7093561dcdfa0bdc5fadd2518fdd53973944fdc80e3f863b062ffb6587f92403fc791d1bf1119f95b888fce952bdcdfed323770ff980cc055ec9f15e66695f767c2fa702ab6d760b41767cca684787e0baef1f388ea45c6f835708c67c791b95e96c00ef7a3fbcc16fd2de6b7f02f751a19f26d8263ff1173d49fba01c7fa87c8383f305ed4a709fa496a71bfeb3a18cf0bee96b9d2c0fd518339e6bf669359433fee89d938dcaf5d45e6feaec56ce379ba1e99e38fd88b8ce77507aee1bee32832ce8f381ece0b5b04c7f91e981d9e07c53032ee97b03ef228e6843989f56760d49b2618cfcf3ad83b49e27dbe5e622e1af077e612eecfcd0573bc5f36e760dc774ad6775289df170c22f37db66a80319f44ff0aeebfdd0a73b580f8b1ca5cc37db57c0237f1fd431d6c713f7cc35c2fe2bebd1919f7e13fc155aed7cb60dce7242a32e68ff5b81f536c8f84d2411eff118cf3c115c0e82fefc0b8ff71ec1f4913df1fa83118f78d6e2932faef8221af7c8ccce7bf38065b9cd7bdc86c2fdb888cf130bf2a727f771a19f7497d7015f35d4446bed6880cfd603e85fcd915c131fe57997509df279c80158f6f2a609c97d646e6f8e46a91212ffb77624ae8df8bcce3bb36b8c6ed6d6c8ffda77f4646feb81319f915f46314eea35622235f8ce323be590776ec5fee2032ee7b3a91713e73bc486c09f7c5a79171ff6b27ccfe528a8cf3620d1cefcbf62363bf5726ccf684bc56f1faec4164dca7613fd1f1caf7fdb11ef6b3f05f87fb37bb1a19f7993791f17c6f22237fd88d0c7f80ffba1abe1fd9898cf98ec0f17ea11719f58760e43f6a1819fbe99e393eaf3ad827a961bc5664e807f649a2ff42ffe471fcfc3288ccf5bdfbff1be5ff932c524825b534d24a2793bf7ab5bf228beccb33792e07f2425eca2b799d6d69de93450ee50f79236fe59dbc9723e2b17cf8abd7fb69599c7c944ff2a7fc2e97e432f18a5c956bef8d26d7a84d4b8ee8b3c22d655baed36f3bb22b37641bad56e877c3f4b5912efb72937a7665e755dd96dca6115ffcfe6d5968fe1dd993bb724fee53cf0399d09a96e561cafc47f2589ec853599045bf76b2654996654556654d76215d5d3664334d1221655508a1e8a36725972bc2084b63b6a6a5794796967022117d7126578896bc7fc9a1387fada317bd4662202ee8cf9a18c84dfa735b5cd28c157125ae61a90ed50da38dde91e587b89165faf396e67cd15ab6c59db8975d311263317a5b16ef23e281ecb7291ec513c9f2537c974d5ad19258162bf4a721a988c94bbaf3d62356499635d2fd89a071449b6c52a6d52f9164d7629da45a935ba223ba6283c6e8c0070fc9973af493109bd463536c7989c536f531bebd144103eb347f9f5a6d891dd113bb42d25c7b627fbe2c24ef017986118772591c8a23712c4ec4a92888a22889b2a888aaa889ba6888a6924a28a5b4eccf58a54d1e31904e19450f923e0eaa44511b71a9cec4b93a57035a4b590cd485ba545724459b66bb56d7caef8c15f543f4a4134375e3b5246ed50de965d35b53b6d5adba139bea9e7844ed066a249794a5f60ff364097b6293465f0bbd851aab07f5a89ed44ff55d2da965b5a256d59a6aa9b65a571dd5551b6a536da9ed17b254d48eeaa95dd1517b8197c26a3ae28af64f47edab03d116dbb4f275b14a2d0f85152db9a98e688d3b72a8eed5b1585127ea14a38d49ff1d55a09f964943dbaa4854eaddabb2aad03a5bd4be3a7fbfc80d21a8459ba2c79074545375d5504d2db5d04a6b6dc29d79a2fb6a5d9fe9733dd017fa525fe9eb695954419d51ac73de3b82c75deb61d82d03daa91dfd439549ab65d195f43c40126dab1d7d43bfbfa5f665d927df3bf7fb8d7c83a294b786be1303edad724ad1a2a3ae699cb11cea911e073d75fc7e9a278bbed50faaaa1f95d34ff4e74ffd5d2fe965bda257f55af8b4d4a96eeb75dd9127baa5bb7a436fea2dbded23c364b79cd36cb7b4e37a7a87b4d295c7ba47b4a377c987fa6aa8f7e8bf3bb49f56f4be3ea07577f4a15cd347fa985a17c946eb72ac76e873a44fbc7790152992900576f4294956d0c7a2ad0a24df2dadb7a87cac9b6b175dd2655da19dbd455ed6d2555dd375ddf0e4cf0dffd14d43ee6d94d1de13699ca231b43fc6130febaa53f2f575d2fa4059d2347913d9605b6c5394eeeb71d0f783d726edcb1a9d426b14cf8aa4edaeb154e3a3f6508da80fe54be24add1a6b68df85159d9096c6b2662ccd5234ce5b4d1fa94baa5b7b2d8b4c4c62fae68c3c7b9be63834e766602ecce5b40d69ec2b736d86e68768875daba85f53d8892cebf24aacd3badac652ccea532ba7f62802b5e4953a24d9fc8e6ed39e3d24ff0831506e1b8abbfe673abdcac1af8e687d7e3f6da96b3a9b9629a67a3daefb76fe7ca253e1de47909e8f02e397e7ceb35dccadb933f76664c6e6c13c9a27f3d37c7f19a7688d4b66d9ac9855b3665a72c9db8a62de0b9ffd9d85e66f8b11f9e8687efdd4dedf34eba663ba66430ccca6d932db66874feaa9d1964dcfec9a3db3efc7a3dd58a0fc39f5d4fbaa22dae6401ee8dbb74eeb17e74bdf1c9a23736c4ecca92998a229cdf6a2d1caa6e2bfe5223fa0b862ea72eb5f25497a7979ee93340dd3b4d20aabaca618f3c21ffdd96b8db5d6d9c4f685b5675992645e0ea3c7f6dc0eec85bdb457f65ac849cd9a69dba1fd616fecadbdb3f71457decd993320cb9ade13bb7664c7f6c13eda27fb93d6dc0e99e69afd6e97ecb25db1ab76cdb6e6ef13b29dcff03be1d44dc2672b9cbe542886ad5046d80e59fc8862fa283c1db42876b5545156accfcda850eca26c8de2a1a0a87e44b94893fe4be793cfdb28d31c516cf4595e596c51567348e7b38f8b4b62fc5a16e568f46dbb6e3bb66b37eca6dd5223bb2d57ed8eedd95dbb67f7ed813db44772e30d49b6a8ac50564e6bf52b941bc6fa1551567b4be7dca618d33ea368adf7f49e3d56b7f47c60e81c71f6844ecb4bcadafa6259ddd9535ba0649ff26d35107496f89c41dfe87dd9b0453a7b76f4500dd5399db59427a8844ed48e18bc9265e84fb4debd2d89735bb695f06d61dd366cd3d101e62829f05f67d93be7384b9991c567c86c872ec9d20abade0859f78a189126498f94a7afcb077343998ba20c764d5897c86b5552239f6fc803ca8f77f58130aeefce44570ddcb9acba812abb0b77a92e6dd15da92bca5c8794db513e40920c4992167d5ecbd232c6e799fe99416cba6b37743fdc8dbb7577eede8ddc98bc63dd3db847f7e47ece95652d7815d9257851f87b66240de58fde3b4896029d9bd12eb7de2eeebb34facefffd1d3ad15b5f6917b1e5b368d2e13878ccb2e8b925b7ec56dcaaa3bc49b6bce55ccbb5ddbaebbc7ece7d6d17f2ff0df2fb4df274f2f30fd9a5ab7ba2eb36281fab9a03bda37ee87dd5739b6e8b32ecca427609cf8fc2eb72dd6dbb1de765d9757bb6e4b52b572973e8ba7d77e00eddd1745699c5fd62db3466625aeed89db85357704592a6e4ca629d779358d5455771555773f5d7912c63fb658df294866bb866221391a844bb0bb2c5505e935ff3dd434269a84d9c9c9315656bbff8f52449d24fce92f364905c24977406f07379999e3b7dbcaee802e5c8f34f974ced9749643e7563f2e5f517bf6dfbbb4b7ad67b33bbcbd67e995a557b5e8ee2cff4f972646fbffc5af9ebf78b97e9ff42c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966c965c966f96db274c4408fe8bf376a68dcf3c7ff2efc3b499ddf244b27fc7f14bfaab468bc03759ff6d1bb5f2d91978575265ae1ffa7f82b8556a6ce5fda21eda3cebf5696195d7db2a861ba2de67f48079dafb54bfc7c6ee48fdae3957d7ed5275ed9057a6a7d549acfd9e3e547f4bede2ed0d3d9e263fc8a3d6662dc97db057a6afdeb6c32f9dcff0ebbf8cf229ef65536f9c89c1fb74bd83729bdf5ee17da64c1393f67178a69eff7bef95a9b2c34e727ed12f4f476dfd657db6481397fc12ee4bf376ff554f78b9eeb9398d859cc96eacd397fcd2e14593a6fc8f2d9b8d4218ba69d35bfc52e6ffa6fba7edfd48297e7abf68cb7b9cfbdfd27dd2ef3fd778173fcfd55bc9f4befa4f4f6b9f8ce6cbf74bbcccf0152fba4e5579d37f75727adef5bb91fff3bf2297679ed2bbdf76db250bedd7b39c742cf50efeeb5e063497a2c9af5b0aff077bfa7420ef65a57f3ed71f6fe3af919f9a3beff7be2504a493dcf20cb87f49ca69faf7c569c9437f6d76bbba4f9ff6c96f4e1fdf515b2a49e6790e543f13e6d7ffdea73c8bcb2488e0159527c71e6992f45475f2f49ea5d823f8f3af17e2cc52e9de991f5e8e3e7d12fcaf2ee7e8ef3fd4decb2d05efe7bd845f0dddb24f77ab6d3741efff7b0cb9be5457cfddbd86581f237b7cb3c59bef47cf98a3bc88f14f283f07dc25f7ceeffc2adcbeb6798e8635f998f2d7aeef3befbf8f70b6fedd7bf324f7e61cbd622cf2fef9fffe1f9e5c379ef973dbf7cc8a60be5636971a9f36adc94fdb588655e3fafcfe4572fcb8279729abc9f78de4f9725e5796476ceb43546bba4c99be6eb9f3a63d2ee185ece96b63fc3f9b7c0fdd86b0f1ba49ffd297b26ed3c7b31a77af72eeef97bbcdf796ff98e7fa5e9f9c5b9b3e85efefc7d72da9984b363c6ef296748bd879e8d9befae6f46964ffa7d27cd2e53baeb854fea3df2dc39dfcd15a75ba67cfff26e8e91be673ef5791503bfc22e5ff9bd983ed1e1a3e6edb3538d7a7131e77bd277ec42e3edcb9a3a4db7cb22cf218be8dabfcb6feadfbeee8ae5a9392ec58bb7e2c9cdd71a7c7b6cf47958c02e9d7459d2e3997f17d16c1187b1fef5bf8c2f47afb2f237c7c6681bbc1fd3e2d80239ecbb67c5b34dc4582ec9c99bd5c89bfc7e9cd8442e513d6aa59991e5cdf325f6655ee0dc4ffb2ee4ddf322be0b479f80f1a615b1faacd79ef7fb1093fcbba68434f11cd8356d73231f6c9f245d559771cce48a7883241844bbf0ef17c9c7423c4bf1b737fa0ee21e99c49d8bf89ba99fb727674aebf96c31336f33a01e97612de397bfff905de227255f9c17d3f4c164b6191fef85d836e5efb3bb10efe423bbd4c4ee942d077376df87ec12f4911e055e9de9e22eee95591f275986027b29bc676f6e711bde5662fb59ff71fff9f7f9c5feb376117c9bf699f37f56a29d3976d90e63acaa5ed4f7b45d26fb63208fc56edc9ff427ed17ffc69958ac7f971ff6dbcb38f66c97e9bdf0d677811ffe5b58371cdf262bbff43692dd18a1c5d86b6fe22588c2fc9e39d9f7fb26466b92a7f67c8e28bc9771368ef9ef39e7fcddd179cf8c9ffefb98e666726a7493a9f743aaa9b58777760e9ef7856c3df70b52b6a6ec87367adfdf10447bf15cf3fe1e2c3dffcffafd2725f1769efb9e18cc4e2b95736afdbb62f1be50b1ed36e2cfde2e0e6fffa3c8dd8e7da7cffdb9abe87c66afcc956667dae7633137bc2fc83e33d2e862f8fde90be946cffb6afafd59d3bf7fffef27c7bdf305dfd95dcb07f2fbf0a1d814561f33421fa7625de2f3b338fb29ff4e5eab736f1bff33ead0de95795cff96db34597c26b4d8bdd5074b4b1a79f8e5a3e67f073ea365469616ef2c8a9193bcc8ef2ff6ed18e7850ce7f1a48ff7ff892f674596b02a5df4b145c6d3cbc628c93f87dfee4eeddc2021c5a45fb9b1ff0db2789bf0aa7d0c89a7544227920c1913c514dcf63edbc1bf4fd79fcd31ee20a6b47cbc920f51e2e73a57f66d7d3fd326db931f18ff16dc96cfbdb88f3fe77d0b8c1562168fa32e7dec0af18c353755f74a96969cb999a67843bde421cfcf6bc64f37719564c343ff8626ff3b5d6429bdadfc598e365e76ebebbccdd9a63417652a34df88b4e17f0ea7a3347ebc78beab539ff7eba2cf0114fc82e7f0eb20cdb6b82efac4b42ccf6be5e2cf583e83838c2dff1eeab0b6f3e9fd81e740c97a086ff30bcf1e535ee7f753cd6df0f861cc6b5f1ffcc0902dfc13d82066033847a4bc0ef39b673f887ee17d455dfaf6d477e24bb3b24c3ce721e8742afb80ae27fb66a2f353fe39ea411e86b6fde9f3839f15fd33a23fd3e5c8eb525aceb9f8f7de6ba8d56ef474af7bcab70798a7c57e3065f3e00764d307df7ffa1e667abfd059cad6ae85554ee2973af7fb86fd7a2a9f1af8678b10f3fc5bdece7d5d329cd82a8edbf7faf47bc1f7f736832f6f87f9786fd5422e3dc0f823bf5782ee1f783daeecd7e3e327af23f886f16b4e2667f9cb988c887c48cf117e7587d3ba9f647b52dae73b80e0afbcdb395fb7cfb69a94163fc7f3efc29e3a7e319f9d8a9103d998c8ea238b7f63662b787a8dfbf97df25c17defd3c57962c14af09f1e693e67b256bb248ebf7d3e7fa664d965f29b92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92cb92cd92c7ffecfbffff1bfe992fcac</data>
-    </image>
-  </images>
-  <includes>
-    <include location="local" >rs_system.h</include>
-    <include location="local" >rs.h</include>
-    <include location="local" >rs_settings.h</include>
-    <include location="local" >rs_units.h</include>
-  </includes>
-  <connections>
-    <connection>
-      <sender>buttonOk</sender>
-      <signal>clicked()</signal>
-      <receiver>QG_DlgInitial</receiver>
-      <slot>ok()</slot>
-    </connection>
-  </connections>
-</ui>
diff --git a/kadgui/src/ui/qg_dlginitial.ui.h b/kadgui/src/ui/qg_dlginitial.ui.h
deleted file mode 100644
index edbe985..0000000
--- a/kadgui/src/ui/qg_dlginitial.ui.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-
-
-void QG_DlgInitial::init() {
-    // Fill combobox with languages:
-    QStringList languageList = RS_SYSTEM->getLanguageList();
-    for (RS_StringList::Iterator it = languageList.begin();
-    	it!=languageList.end();
-        it++) {
-            
-        QString l = RS_SYSTEM->symbolToLanguage(*it);
-        cbLanguage->insertItem(l);
-        cbLanguageCmd->insertItem(l);
-    }
-        
-        
-        // units:
-        for (int i=RS2::None; i<RS2::LastUnit; i++) {
-        cbUnit->insertItem(RS_Units::unitToString((RS2::Unit)i));
-    }
-        
-        cbUnit->setCurrentText("Millimeter");
-        cbLanguage->setCurrentText("English");
-        cbLanguageCmd->setCurrentText("English");
-}
-
-void QG_DlgInitial::setText(const QString& t) {
-    lWelcome->setText(t);
-}
-
-void QG_DlgInitial::setPixmap(const QPixmap& p) {
-    lImage->setPixmap(p);
-}
-
-void QG_DlgInitial::ok() {
-    RS_SETTINGS->beginGroup("/Appearance");
-    RS_SETTINGS->writeEntry("/Language", 
-                            RS_SYSTEM->languageToSymbol(cbLanguage->currentText()));
-    RS_SETTINGS->writeEntry("/LanguageCmd", 
-                            RS_SYSTEM->languageToSymbol(cbLanguageCmd->currentText()));
-    RS_SETTINGS->endGroup();
-    
-    RS_SETTINGS->beginGroup("/Defaults");
-    RS_SETTINGS->writeEntry("/Unit", cbUnit->currentText());
-    RS_SETTINGS->endGroup();
-    accept();
-}
-#include "qg_dlginitial.moc.cpp"
diff --git a/qcadlib/src/debug/rs_debug.cpp b/qcadlib/src/debug/rs_debug.cpp
index 28b47f9..c6238a7 100644
--- a/qcadlib/src/debug/rs_debug.cpp
+++ b/qcadlib/src/debug/rs_debug.cpp
@@ -30,6 +30,9 @@
 #include <stdio.h>
 #include <stdarg.h>
 
+#include <QDateTime>
+#include <QString>
+
 RS_Debug* RS_Debug::uniqueInstance = NULL;
 
 
@@ -43,11 +46,11 @@ RS_Debug* RS_Debug::uniqueInstance = NULL;
 RS_Debug* RS_Debug::instance() {
     if(uniqueInstance==NULL) {
         QDateTime now = QDateTime::currentDateTime();
-        QString nowStr;
+        //QString nowStr;
 
-	nowStr = now.toString("yyyyMMdd_hhmmss");
+	//nowStr = now.toString("yyyyMMdd_hhmmss");
 
-	QString fName = QString("debug_%1.log").arg(nowStr);
+	//QString fName = QString("debug_%1.log").arg(nowStr);
 
         uniqueInstance = new RS_Debug;
 
@@ -137,11 +140,9 @@ void RS_Debug::print(RS_DebugLevel level, const char* format ...) {
  */
 void RS_Debug::timestamp() {
     QDateTime now = QDateTime::currentDateTime();
-    QString nowStr;
-
-    nowStr = now.toString("yyyyMMdd_hh:mm:ss:zzz ");
+    QString nowStr = now.toString("yyyyMMdd_hh:mm:ss:zzz ");
 
-    fprintf(stream, nowStr.toLatin1());
+    fprintf(stream, nowStr.toLatin1().constData());
     fprintf(stream, "\n");
     fflush(stream);
 }
@@ -152,7 +153,7 @@ void RS_Debug::timestamp() {
  */
 void RS_Debug::printUnicode(const QString& text) {
     for (int i=0; i<(int)text.length(); i++) {
-        print("[%X] %c", text.at(i).unicode(), text.at(i).toLatin1().constData());
+        print("[%X] %c", text.at(i).unicode(), text.at(i).toLatin1());
     }
 }
 
diff --git a/qcadlib/src/debug/rs_debug.h b/qcadlib/src/debug/rs_debug.h
index e661a90..5863471 100644
--- a/qcadlib/src/debug/rs_debug.h
+++ b/qcadlib/src/debug/rs_debug.h
@@ -37,6 +37,9 @@
 
 #define RS_DEBUG RS_Debug::instance()
 
+class QString;
+class QTimeStamp;
+
 /**
  * Debugging facilities.
  *
diff --git a/qcadlib/src/engine/rs.h b/qcadlib/src/engine/rs.h
index e13bfc7..dda1f33 100644
--- a/qcadlib/src/engine/rs.h
+++ b/qcadlib/src/engine/rs.h
@@ -27,8 +27,7 @@
 #ifndef RS_H
 #define RS_H
 
-#include <qnamespace.h>
-#include <qprinter.h>
+#include <QPrinter>
 
 #define RS_TEST
 
diff --git a/qcadlib/src/engine/rs_units.cpp b/qcadlib/src/engine/rs_units.cpp
index c3a7e13..bfa2c4e 100644
--- a/qcadlib/src/engine/rs_units.cpp
+++ b/qcadlib/src/engine/rs_units.cpp
@@ -28,7 +28,7 @@
 #include "rs_units.h"
 
 #include <stdio.h>
-#include <qobject.h>
+#include <QObject>
 
 #include "rs_math.h"
 #include "rs_debug.h"
-- 
1.5.3.7



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/