Made the config dialog use a list widget for navigation over a tab widget.

Sat, 19 Oct 2013 00:39:09 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sat, 19 Oct 2013 00:39:09 +0300
changeset 517
2b5adb45aaa5
parent 516
d3373bc7ca3b
child 518
623c01862eb8

Made the config dialog use a list widget for navigation over a tab widget.

src/configDialog.cpp file | annotate | diff | comparison | revisions
src/configDialog.h file | annotate | diff | comparison | revisions
ui/config.ui file | annotate | diff | comparison | revisions
--- a/src/configDialog.cpp	Fri Oct 18 23:49:55 2013 +0300
+++ b/src/configDialog.cpp	Sat Oct 19 00:39:09 2013 +0300
@@ -135,13 +135,19 @@
 	ui->m_profileName->setText (ld_defaultname);
 	ui->m_profileUsername->setText (ld_defaultuser);
 	ui->m_profileLicense->setCurrentIndex (ld_defaultlicense);
-	ui->tabs->setCurrentIndex (deftab);
 
 	initGrids();
 	initExtProgs();
+	selectPage (deftab);
 
 	connect (ui->buttonBox, SIGNAL (clicked (QAbstractButton*)),
-			 this, SLOT (buttonClicked (QAbstractButton*)));
+		this, SLOT (buttonClicked (QAbstractButton*)));
+
+	connect (ui->m_pages, SIGNAL (currentChanged (int)),
+		this, SLOT (selectPage (int)));
+
+	connect (ui->m_pagelist, SIGNAL (currentRowChanged (int)),
+		this, SLOT (selectPage (int)));
 }
 
 // =============================================================================
@@ -151,6 +157,13 @@
 }
 
 // =============================================================================
+// -----------------------------------------------------------------------------
+void ConfigDialog::selectPage (int row)
+{	ui->m_pagelist->setCurrentRow (row);
+	ui->m_pages->setCurrentIndex (row);
+}
+
+// =============================================================================
 // Adds a shortcut entry to the list of shortcuts.
 // -----------------------------------------------------------------------------
 void ConfigDialog::addShortcut (KeySequenceConfig& cfg, QAction* act, int& i)
@@ -179,7 +192,7 @@
 	*anglabel = new QLabel ("Angle");
 	short i = 1;
 
-for (QLabel * label : initlist<QLabel*> ( { xlabel, ylabel, zlabel, anglabel }))
+	for (QLabel* label : initlist<QLabel*> ({xlabel, ylabel, zlabel, anglabel}))
 	{	label->setAlignment (Qt::AlignCenter);
 		gridlayout->addWidget (label, 0, i++);
 	}
@@ -335,7 +348,6 @@
 	{	applySettings();
 		accept();
 	} elif (button == dbb->button (QDDB::Apply))
-
 	{	applySettings();
 	} elif (button == dbb->button (QDDB::Cancel))
 	{	reject();
@@ -352,7 +364,7 @@
 	quickColorItems.clear();
 
 	// Init table items
-for (LDQuickColor & entry : quickColors)
+	for (LDQuickColor& entry : quickColors)
 	{	QListWidgetItem* item = new QListWidgetItem;
 
 		if (entry.isSeparator())
@@ -517,7 +529,7 @@
 int ConfigDialog::getItemRow (QListWidgetItem* item, QList<QListWidgetItem*>& haystack)
 {	int i = 0;
 
-for (QListWidgetItem * it : haystack)
+	for (QListWidgetItem* it : haystack)
 	{	if (it == item)
 			return i;
 
@@ -543,7 +555,7 @@
 QList<ShortcutListItem*> ConfigDialog::getShortcutSelection()
 {	QList<ShortcutListItem*> out;
 
-for (QListWidgetItem * entry : ui->shortcutsList->selectedItems())
+	for (QListWidgetItem* entry : ui->shortcutsList->selectedItems())
 		out << static_cast<ShortcutListItem*> (entry);
 
 	return out;
@@ -570,7 +582,7 @@
 void ConfigDialog::slot_resetShortcut()
 {	QList<ShortcutListItem*> sel = getShortcutSelection();
 
-for (ShortcutListItem * item : sel)
+	for (ShortcutListItem* item : sel)
 	{	item->keyConfig()->reset();
 		setShortcutText (item);
 	}
@@ -582,7 +594,7 @@
 void ConfigDialog::slot_clearShortcut()
 {	QList<ShortcutListItem*> sel = getShortcutSelection();
 
-for (ShortcutListItem * item : sel)
+	for (ShortcutListItem* item : sel)
 	{	item->keyConfig()->value = QKeySequence();
 		setShortcutText (item);
 	}
@@ -594,7 +606,7 @@
 void ConfigDialog::slot_setExtProgPath()
 {	const LDExtProgInfo* info = null;
 
-for (const LDExtProgInfo & it : g_LDExtProgInfo)
+	for (const LDExtProgInfo& it : g_LDExtProgInfo)
 	{	if (it.setPathButton == sender())
 		{	info = &it;
 			break;
@@ -634,7 +646,7 @@
 str ConfigDialog::quickColorString()
 {	str val;
 
-for (const LDQuickColor & entry : quickColors)
+	for (const LDQuickColor& entry : quickColors)
 	{	if (val.length() > 0)
 			val += ':';
 
--- a/src/configDialog.h	Fri Oct 18 23:49:55 2013 +0300
+++ b/src/configDialog.h	Sat Oct 19 00:39:09 2013 +0300
@@ -91,6 +91,7 @@
 		void slot_setExtProgPath();
 		void slot_findDownloadFolder();
 		void buttonClicked (QAbstractButton* button);
+		void selectPage (int row);
 };
 
 // =============================================================================
--- a/ui/config.ui	Fri Oct 18 23:49:55 2013 +0300
+++ b/ui/config.ui	Sat Oct 19 00:39:09 2013 +0300
@@ -6,401 +6,354 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>561</width>
-    <height>351</height>
+    <width>717</width>
+    <height>328</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Settings</string>
   </property>
   <property name="windowIcon">
-   <iconset resource="../../ldforge.qrc">
+   <iconset resource="../ldforge.qrc">
     <normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <widget class="QTabWidget" name="tabs">
-     <property name="tabPosition">
-      <enum>QTabWidget::North</enum>
-     </property>
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <property name="elideMode">
-      <enum>Qt::ElideNone</enum>
-     </property>
-     <property name="documentMode">
-      <bool>false</bool>
-     </property>
-     <property name="tabsClosable">
-      <bool>false</bool>
-     </property>
-     <property name="movable">
-      <bool>false</bool>
-     </property>
-     <widget class="QWidget" name="tab">
-      <attribute name="title">
-       <string>Interface</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
+    <layout class="QHBoxLayout" name="horizontalLayout_7" stretch="0,0">
+     <item>
+      <widget class="QListWidget" name="m_pagelist">
+       <property name="minimumSize">
+        <size>
+         <width>144</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>144</width>
+         <height>16777215</height>
+        </size>
+       </property>
        <item>
-        <widget class="QGroupBox" name="groupBox">
-         <property name="title">
-          <string>Colors</string>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_3" stretch="0">
-          <item>
-           <layout class="QFormLayout" name="formLayout">
-            <property name="fieldGrowthPolicy">
-             <enum>QFormLayout::ExpandingFieldsGrow</enum>
-            </property>
-            <item row="0" column="0">
-             <widget class="QLabel" name="label">
-              <property name="whatsThis">
-               <string/>
-              </property>
-              <property name="text">
-               <string>Main color:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="1">
-             <widget class="QPushButton" name="mainColorButton">
-              <property name="whatsThis">
-               <string>This color is used for the main color.</string>
-              </property>
-              <property name="text">
-               <string/>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/colorselect.png</normaloff>:/icons/colorselect.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="0">
-             <widget class="QLabel" name="label_3">
-              <property name="whatsThis">
-               <string/>
-              </property>
-              <property name="text">
-               <string>Main color alpha:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="1">
-             <widget class="QSlider" name="mainColorAlpha">
-              <property name="whatsThis">
-               <string>Opacity of main color in the viewport.</string>
-              </property>
-              <property name="minimum">
-               <number>1</number>
-              </property>
-              <property name="maximum">
-               <number>10</number>
-              </property>
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="tickPosition">
-               <enum>QSlider::TicksAbove</enum>
-              </property>
-              <property name="tickInterval">
-               <number>1</number>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="0">
-             <widget class="QLabel" name="label_2">
-              <property name="whatsThis">
-               <string/>
-              </property>
-              <property name="text">
-               <string>Background:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="1">
-             <widget class="QPushButton" name="backgroundColorButton">
-              <property name="whatsThis">
-               <string>This is the background color for the viewport.</string>
-              </property>
-              <property name="text">
-               <string/>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/colorselect.png</normaloff>:/icons/colorselect.png</iconset>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-         </layout>
-        </widget>
+        <property name="text">
+         <string>Interface</string>
+        </property>
        </item>
        <item>
-        <layout class="QFormLayout" name="formLayout_2">
-         <property name="fieldGrowthPolicy">
-          <enum>QFormLayout::ExpandingFieldsGrow</enum>
-         </property>
-         <item row="0" column="0">
-          <widget class="QLabel" name="label_5">
-           <property name="whatsThis">
-            <string/>
-           </property>
-           <property name="text">
-            <string>Line thickness:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <layout class="QHBoxLayout" name="horizontalLayout">
-           <item>
-            <widget class="QSlider" name="lineThickness">
-             <property name="whatsThis">
-              <string>How thick lines should be drawn in the viewport.</string>
-             </property>
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>8</number>
-             </property>
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="tickPosition">
-              <enum>QSlider::TicksAbove</enum>
-             </property>
-             <property name="tickInterval">
-              <number>1</number>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="label_6">
-             <property name="text">
-              <string>#</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-        </layout>
+        <property name="text">
+         <string>Profile</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Shortcuts</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Quick colors</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Grids</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>External Programs</string>
+        </property>
        </item>
        <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_8">
+        <property name="text">
+         <string>Downloads</string>
+        </property>
+       </item>
+      </widget>
+     </item>
+     <item>
+      <widget class="QStackedWidget" name="m_pages">
+       <property name="currentIndex">
+        <number>0</number>
+       </property>
+       <widget class="QWidget" name="page_3">
+        <layout class="QVBoxLayout" name="verticalLayout_13">
          <item>
-          <layout class="QVBoxLayout" name="verticalLayout_11">
-           <item>
-            <widget class="QCheckBox" name="blackEdges">
-             <property name="whatsThis">
-              <string>Makes all edgelines appear black. If this is not set, edge lines take their color as defined in LDConfig.ldr.</string>
-             </property>
-             <property name="text">
-              <string>Black edges</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="colorBFC">
-             <property name="whatsThis">
-              <string>Polygons' front sides become green and back sides red.</string>
-             </property>
-             <property name="text">
-              <string>Red/green BFC view (incomplete)</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="colorizeObjects">
-             <property name="whatsThis">
-              <string>Makes colored objects (non-16 and 24) appear colored in the list view. A red triangle will, for instance, have its entry written in red text. This can be useful to locate colored objects.</string>
-             </property>
-             <property name="text">
-              <string>Colorize objects in list view</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="implicitFiles">
-             <property name="text">
-              <string>List implicitly loaded files</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QVBoxLayout" name="verticalLayout_12">
-           <item>
-            <widget class="QCheckBox" name="m_logostuds">
-             <property name="text">
-              <string>Use logoed studs</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <spacer name="verticalSpacer_6">
-             <property name="orientation">
-              <enum>Qt::Vertical</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>20</width>
-               <height>40</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
+          <widget class="QGroupBox" name="groupBox">
+           <property name="title">
+            <string>Interface</string>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0">
+            <item>
+             <layout class="QFormLayout" name="formLayout">
+              <property name="fieldGrowthPolicy">
+               <enum>QFormLayout::ExpandingFieldsGrow</enum>
+              </property>
+              <item row="0" column="0">
+               <widget class="QLabel" name="label">
+                <property name="whatsThis">
+                 <string/>
+                </property>
+                <property name="text">
+                 <string>Main color:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="0" column="1">
+               <widget class="QPushButton" name="mainColorButton">
+                <property name="whatsThis">
+                 <string>This color is used for the main color.</string>
+                </property>
+                <property name="text">
+                 <string/>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/colorselect.png</normaloff>:/icons/colorselect.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0">
+               <widget class="QLabel" name="label_3">
+                <property name="whatsThis">
+                 <string/>
+                </property>
+                <property name="text">
+                 <string>Main color alpha:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="QSlider" name="mainColorAlpha">
+                <property name="whatsThis">
+                 <string>Opacity of main color in the viewport.</string>
+                </property>
+                <property name="minimum">
+                 <number>1</number>
+                </property>
+                <property name="maximum">
+                 <number>10</number>
+                </property>
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="tickPosition">
+                 <enum>QSlider::TicksAbove</enum>
+                </property>
+                <property name="tickInterval">
+                 <number>1</number>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="0">
+               <widget class="QLabel" name="label_2">
+                <property name="whatsThis">
+                 <string/>
+                </property>
+                <property name="text">
+                 <string>Background:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="1">
+               <widget class="QPushButton" name="backgroundColorButton">
+                <property name="whatsThis">
+                 <string>This is the background color for the viewport.</string>
+                </property>
+                <property name="text">
+                 <string/>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/colorselect.png</normaloff>:/icons/colorselect.png</iconset>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QFormLayout" name="formLayout_2">
+              <property name="fieldGrowthPolicy">
+               <enum>QFormLayout::ExpandingFieldsGrow</enum>
+              </property>
+              <item row="0" column="1">
+               <layout class="QHBoxLayout" name="horizontalLayout">
+                <item>
+                 <widget class="QSlider" name="lineThickness">
+                  <property name="whatsThis">
+                   <string>How thick lines should be drawn in the viewport.</string>
+                  </property>
+                  <property name="minimum">
+                   <number>1</number>
+                  </property>
+                  <property name="maximum">
+                   <number>8</number>
+                  </property>
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="tickPosition">
+                   <enum>QSlider::TicksAbove</enum>
+                  </property>
+                  <property name="tickInterval">
+                   <number>1</number>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+              <item row="0" column="0">
+               <widget class="QLabel" name="label_5">
+                <property name="whatsThis">
+                 <string/>
+                </property>
+                <property name="text">
+                 <string>Line thickness:</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="horizontalLayout_8">
+              <item>
+               <layout class="QVBoxLayout" name="verticalLayout_11">
+                <item>
+                 <widget class="QCheckBox" name="blackEdges">
+                  <property name="whatsThis">
+                   <string>Makes all edgelines appear black. If this is not set, edge lines take their color as defined in LDConfig.ldr.</string>
+                  </property>
+                  <property name="text">
+                   <string>Black edges</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QCheckBox" name="colorBFC">
+                  <property name="whatsThis">
+                   <string>Polygons' front sides become green and back sides red.</string>
+                  </property>
+                  <property name="text">
+                   <string>Red/green BFC view (incomplete)</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QCheckBox" name="colorizeObjects">
+                  <property name="whatsThis">
+                   <string>Makes colored objects (non-16 and 24) appear colored in the list view. A red triangle will, for instance, have its entry written in red text. This can be useful to locate colored objects.</string>
+                  </property>
+                  <property name="text">
+                   <string>Colorize objects in list view</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QCheckBox" name="implicitFiles">
+                  <property name="text">
+                   <string>List implicitly loaded files</string>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </item>
+              <item>
+               <layout class="QVBoxLayout" name="verticalLayout_12">
+                <item>
+                 <widget class="QCheckBox" name="m_logostuds">
+                  <property name="text">
+                   <string>Use logoed studs</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <spacer name="verticalSpacer_6">
+                  <property name="orientation">
+                   <enum>Qt::Vertical</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>20</width>
+                    <height>40</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
          </item>
         </layout>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab_7">
-      <attribute name="title">
-       <string>Profile</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_10">
-       <item>
-        <widget class="QGroupBox" name="groupBox_4">
-         <property name="title">
-          <string>Profile</string>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_8">
-          <item>
-           <layout class="QFormLayout" name="formLayout_3">
-            <item row="2" column="0">
-             <widget class="QLabel" name="label_8">
-              <property name="text">
-               <string>Username:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="0">
-             <widget class="QLabel" name="label_7">
-              <property name="text">
-               <string>Name:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="3" column="0">
-             <widget class="QLabel" name="label_9">
-              <property name="text">
-               <string>License:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="1">
-             <widget class="QLineEdit" name="m_profileName"/>
-            </item>
-            <item row="2" column="1">
-             <widget class="QLineEdit" name="m_profileUsername"/>
-            </item>
-            <item row="3" column="1">
-             <widget class="QComboBox" name="m_profileLicense">
-              <property name="sizePolicy">
-               <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-               </sizepolicy>
-              </property>
-              <item>
-               <property name="text">
-                <string>CA - redistributable</string>
-               </property>
+       </widget>
+       <widget class="QWidget" name="page_4">
+        <layout class="QVBoxLayout" name="verticalLayout_14">
+         <item>
+          <widget class="QGroupBox" name="groupBox_4">
+           <property name="title">
+            <string>Profile</string>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_8">
+            <item>
+             <layout class="QFormLayout" name="formLayout_3">
+              <item row="2" column="0">
+               <widget class="QLabel" name="label_8">
+                <property name="text">
+                 <string>Username:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0">
+               <widget class="QLabel" name="label_7">
+                <property name="text">
+                 <string>Name:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="0">
+               <widget class="QLabel" name="label_9">
+                <property name="text">
+                 <string>License:</string>
+                </property>
+               </widget>
               </item>
-              <item>
-               <property name="text">
-                <string>NonCA - not redistributable</string>
-               </property>
+              <item row="1" column="1">
+               <widget class="QLineEdit" name="m_profileName"/>
               </item>
-              <item>
-               <property name="text">
-                <string>None</string>
-               </property>
+              <item row="2" column="1">
+               <widget class="QLineEdit" name="m_profileUsername"/>
               </item>
-             </widget>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <spacer name="verticalSpacer_7">
-            <property name="orientation">
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>20</width>
-              <height>40</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab_2">
-      <attribute name="title">
-       <string>Shortcuts</string>
-      </attribute>
-      <layout class="QHBoxLayout" name="horizontalLayout_3">
-       <item>
-        <widget class="QGroupBox" name="groupBox_2">
-         <property name="whatsThis">
-          <string>Here you can alter keyboard shortcuts for almost all LDForge actions. Only exceptions are the controls for the viewport. Use the set button to set a key shortcut, clear to remove it and reset to restore the shortcut to its default value.
-
-Shortcut changes apply immediately after closing this window.</string>
-         </property>
-         <property name="title">
-          <string>Shortcuts</string>
-         </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_5">
-          <item>
-           <widget class="QListWidget" name="shortcutsList">
-            <property name="verticalScrollBarPolicy">
-             <enum>Qt::ScrollBarAsNeeded</enum>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <layout class="QVBoxLayout" name="verticalLayout_4">
-            <item>
-             <widget class="QPushButton" name="shortcut_set">
-              <property name="text">
-               <string>Set</string>
-              </property>
-             </widget>
+              <item row="3" column="1">
+               <widget class="QComboBox" name="m_profileLicense">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <item>
+                 <property name="text">
+                  <string>CA - redistributable</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>NonCA - not redistributable</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>None</string>
+                 </property>
+                </item>
+               </widget>
+              </item>
+             </layout>
             </item>
             <item>
-             <widget class="QPushButton" name="shortcut_reset">
-              <property name="text">
-               <string>Reset</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/undo.png</normaloff>:/icons/undo.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="shortcut_clear">
-              <property name="text">
-               <string>Clear</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer name="verticalSpacer_2">
+             <spacer name="verticalSpacer_7">
               <property name="orientation">
                <enum>Qt::Vertical</enum>
               </property>
@@ -413,237 +366,300 @@
              </spacer>
             </item>
            </layout>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab_3">
-      <attribute name="title">
-       <string>Quick colors</string>
-      </attribute>
-      <layout class="QHBoxLayout" name="horizontalLayout_4">
-       <item>
-        <widget class="QGroupBox" name="groupBox_3">
-         <property name="whatsThis">
-          <string>Here you can alter the layout of the quick colors toolbar. Use the controls to add, remove or edit the colors used. You can also add separators in between colors.
+          </widget>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QWidget" name="page_5">
+        <layout class="QVBoxLayout" name="verticalLayout_15">
+         <item>
+          <widget class="QGroupBox" name="groupBox_2">
+           <property name="whatsThis">
+            <string>Here you can alter keyboard shortcuts for almost all LDForge actions. Only exceptions are the controls for the viewport. Use the set button to set a key shortcut, clear to remove it and reset to restore the shortcut to its default value.
 
-Usually this contains MainColor, EdgeColor and some auxiliary colors used to group objects.</string>
-         </property>
-         <property name="title">
-          <string>Quick colors</string>
-         </property>
-         <layout class="QHBoxLayout" name="horizontalLayout_6">
-          <item>
-           <widget class="QListWidget" name="quickColorList">
-            <property name="verticalScrollBarPolicy">
-             <enum>Qt::ScrollBarAsNeeded</enum>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <layout class="QVBoxLayout" name="verticalLayout_5">
+Shortcut changes apply immediately after closing this window.</string>
+           </property>
+           <property name="title">
+            <string>Shortcuts</string>
+           </property>
+           <layout class="QHBoxLayout" name="horizontalLayout_5">
             <item>
-             <widget class="QPushButton" name="quickColor_add">
-              <property name="text">
-               <string>Add Color</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/palette.png</normaloff>:/icons/palette.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="quickColor_addSep">
-              <property name="text">
-               <string>Add Separator</string>
+             <widget class="QListWidget" name="shortcutsList">
+              <property name="verticalScrollBarPolicy">
+               <enum>Qt::ScrollBarAsNeeded</enum>
               </property>
              </widget>
             </item>
             <item>
-             <widget class="QPushButton" name="quickColor_edit">
-              <property name="text">
-               <string>Edit</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/mode-draw.png</normaloff>:/icons/mode-draw.png</iconset>
-              </property>
-             </widget>
+             <layout class="QVBoxLayout" name="verticalLayout_4">
+              <item>
+               <widget class="QPushButton" name="shortcut_set">
+                <property name="text">
+                 <string>Set</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="shortcut_reset">
+                <property name="text">
+                 <string>Reset</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/undo.png</normaloff>:/icons/undo.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="shortcut_clear">
+                <property name="text">
+                 <string>Clear</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="verticalSpacer_2">
+                <property name="orientation">
+                 <enum>Qt::Vertical</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>20</width>
+                  <height>40</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
             </item>
-            <item>
-             <widget class="Line" name="line_2">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-             </widget>
-            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QWidget" name="page_6">
+        <layout class="QVBoxLayout" name="verticalLayout_16">
+         <item>
+          <widget class="QGroupBox" name="groupBox_3">
+           <property name="whatsThis">
+            <string>Here you can alter the layout of the quick colors toolbar. Use the controls to add, remove or edit the colors used. You can also add separators in between colors.
+
+Usually this contains MainColor, EdgeColor and some auxiliary colors used to group objects.</string>
+           </property>
+           <property name="title">
+            <string>Quick colors</string>
+           </property>
+           <layout class="QHBoxLayout" name="horizontalLayout_6">
             <item>
-             <widget class="QPushButton" name="quickColor_moveUp">
-              <property name="text">
-               <string>Move Up</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/arrow-up.png</normaloff>:/icons/arrow-up.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="quickColor_moveDown">
-              <property name="text">
-               <string>Move Down</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/arrow-down.png</normaloff>:/icons/arrow-down.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="Line" name="line">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QPushButton" name="quickColor_remove">
-              <property name="text">
-               <string>Remove</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
+             <widget class="QListWidget" name="quickColorList">
+              <property name="verticalScrollBarPolicy">
+               <enum>Qt::ScrollBarAsNeeded</enum>
               </property>
              </widget>
             </item>
             <item>
-             <widget class="QPushButton" name="quickColor_clear">
-              <property name="text">
-               <string>Clear List</string>
-              </property>
-              <property name="icon">
-               <iconset resource="../../ldforge.qrc">
-                <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <spacer name="verticalSpacer_3">
-              <property name="orientation">
-               <enum>Qt::Vertical</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>20</width>
-                <height>40</height>
-               </size>
-              </property>
-             </spacer>
+             <layout class="QVBoxLayout" name="verticalLayout_5">
+              <item>
+               <widget class="QPushButton" name="quickColor_add">
+                <property name="text">
+                 <string>Add Color</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/palette.png</normaloff>:/icons/palette.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="quickColor_addSep">
+                <property name="text">
+                 <string>Add Separator</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="quickColor_edit">
+                <property name="text">
+                 <string>Edit</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/mode-draw.png</normaloff>:/icons/mode-draw.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="Line" name="line_2">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="quickColor_moveUp">
+                <property name="text">
+                 <string>Move Up</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/arrow-up.png</normaloff>:/icons/arrow-up.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="quickColor_moveDown">
+                <property name="text">
+                 <string>Move Down</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/arrow-down.png</normaloff>:/icons/arrow-down.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="Line" name="line">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="quickColor_remove">
+                <property name="text">
+                 <string>Remove</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="quickColor_clear">
+                <property name="text">
+                 <string>Clear List</string>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="verticalSpacer_3">
+                <property name="orientation">
+                 <enum>Qt::Vertical</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>20</width>
+                  <height>40</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
             </item>
            </layout>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab_4">
-      <attribute name="title">
-       <string>Grids</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_6">
-       <item>
-        <widget class="QGroupBox" name="grids">
-         <property name="title">
-          <string>Grids</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab_5">
-      <attribute name="title">
-       <string>External Programs</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_9">
-       <item>
-        <widget class="QGroupBox" name="extProgs">
-         <property name="whatsThis">
-          <string>LDForge supports launching of several third-party utility tools; here you can set the file paths to these tools. Set the paths of the tools to the exe files.
-
-Under Linux, you can also set the programs to be launched with Wine, so you can use Windows binaries here as well. You will obviously need Wine installed. A 'wine' command in PATH is necessary for this to work.</string>
-         </property>
-         <property name="title">
-          <string>External Programs</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_4">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab_6">
-      <attribute name="title">
-       <string>Downloading</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_7">
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
+          </widget>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QWidget" name="page_7">
+        <layout class="QVBoxLayout" name="verticalLayout_17">
          <item>
-          <widget class="QLabel" name="label_4">
-           <property name="text">
-            <string>Download path:</string>
+          <widget class="QGroupBox" name="grids">
+           <property name="title">
+            <string>Grids</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QLineEdit" name="downloadPath"/>
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
          </item>
+        </layout>
+       </widget>
+       <widget class="QWidget" name="page_8">
+        <layout class="QVBoxLayout" name="verticalLayout_18">
          <item>
-          <widget class="QPushButton" name="findDownloadPath">
-           <property name="text">
-            <string/>
+          <widget class="QGroupBox" name="extProgs">
+           <property name="whatsThis">
+            <string>LDForge supports launching of several third-party utility tools; here you can set the file paths to these tools. Set the paths of the tools to the exe files.
+
+Under Linux, you can also set the programs to be launched with Wine, so you can use Windows binaries here as well. You will obviously need Wine installed. A 'wine' command in PATH is necessary for this to work.</string>
            </property>
-           <property name="icon">
-            <iconset resource="../../ldforge.qrc">
-             <normaloff>:/icons/folder.png</normaloff>:/icons/folder.png</iconset>
+           <property name="title">
+            <string>External Programs</string>
            </property>
           </widget>
          </item>
+         <item>
+          <spacer name="verticalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
         </layout>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="guessNetPaths">
-         <property name="whatsThis">
-          <string>&lt;p&gt;When this is set, LDForge tries to adjust and correct part paths based on the input. A full path given to the download prompt should be of form &lt;tt&gt;&quot;&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;.dat&quot;&lt;/tt&gt; - with this set, input can be automatically completed.&lt;/p&gt;
+       </widget>
+       <widget class="QWidget" name="page_9">
+        <layout class="QVBoxLayout" name="verticalLayout_19">
+         <item>
+          <widget class="QGroupBox" name="groupBox_5">
+           <property name="title">
+            <string>Downloads</string>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_20">
+            <item>
+             <layout class="QHBoxLayout" name="horizontalLayout_2">
+              <item>
+               <widget class="QLabel" name="label_4">
+                <property name="text">
+                 <string>Download path:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLineEdit" name="downloadPath"/>
+              </item>
+              <item>
+               <widget class="QPushButton" name="findDownloadPath">
+                <property name="text">
+                 <string/>
+                </property>
+                <property name="icon">
+                 <iconset resource="../ldforge.qrc">
+                  <normaloff>:/icons/folder.png</normaloff>:/icons/folder.png</iconset>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="guessNetPaths">
+              <property name="whatsThis">
+               <string>&lt;p&gt;When this is set, LDForge tries to adjust and correct part paths based on the input. A full path given to the download prompt should be of form &lt;tt&gt;&quot;&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;.dat&quot;&lt;/tt&gt; - with this set, input can be automatically completed.&lt;/p&gt;
 
 &lt;p&gt;Examples:
 &lt;ul&gt;
@@ -652,38 +668,43 @@
 &lt;li&gt;3002s01 -&gt; parts/s/3002s01.dat&lt;/li&gt;
 &lt;li&gt;4-4cyli -&gt; p/4-4cyli.dat&lt;/li&gt;
 &lt;/ul&gt;&lt;/p&gt;</string>
-         </property>
-         <property name="text">
-          <string>Correct and guess part paths</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="autoCloseNetPrompt">
-         <property name="whatsThis">
-          <string>If this is set, LDForge will close the download prompt after everything has been downloaded. The prompt will not be closed if a download has failed.</string>
-         </property>
-         <property name="text">
-          <string>Close download prompt after completion</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_5">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-    </widget>
+              </property>
+              <property name="text">
+               <string>Correct and guess part paths</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="autoCloseNetPrompt">
+              <property name="whatsThis">
+               <string>If this is set, LDForge will close the download prompt after everything has been downloaded. The prompt will not be closed if a download has failed.</string>
+              </property>
+              <property name="text">
+               <string>Close download prompt after completion</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer name="verticalSpacer_5">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>187</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </widget>
+     </item>
+    </layout>
    </item>
    <item>
     <widget class="QDialogButtonBox" name="buttonBox">
@@ -698,7 +719,7 @@
   </layout>
  </widget>
  <resources>
-  <include location="../../ldforge.qrc"/>
+  <include location="../ldforge.qrc"/>
  </resources>
  <connections/>
 </ui>

mercurial