summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Mi <codeminister@publicstatic.de>2014-01-22 12:25:35 (GMT)
committerGregor Mi <codeminister@publicstatic.de>2014-01-22 12:25:35 (GMT)
commit1ba15a3bc4a0291264b12df766badf5c34d265bc (patch)
treeae897ddb85ace893e98e065ffed4c8d570105d58
parent92933bebb13bd513ed19bdda269956322bc849b5 (diff)
SaveLocation: fix layout
-rw-r--r--src/SaveLocation.cpp5
-rw-r--r--src/SaveLocation.ui117
-rw-r--r--src/skanlite.cpp2
3 files changed, 93 insertions, 31 deletions
diff --git a/src/SaveLocation.cpp b/src/SaveLocation.cpp
index e2a2115..31feb3a 100644
--- a/src/SaveLocation.cpp
+++ b/src/SaveLocation.cpp
@@ -30,9 +30,8 @@
SaveLocation::SaveLocation(QWidget *parent) : QDialog(parent)
{
- QWidget *container = new QWidget(this);
- setupUi(container);
- //setMainWidget(container); // FIXME KF5 needed or remove?
+ setupUi(this);
+
connect(u_saveDirLEdit, SIGNAL(textChanged(QString)), this, SLOT(update()));
connect(u_imgPrefix, SIGNAL(textChanged(QString)), this, SLOT(update()));
connect(u_imgFormat, SIGNAL(activated(QString)), this, SLOT(update()));
diff --git a/src/SaveLocation.ui b/src/SaveLocation.ui
index b4e37de..eaaf340 100644
--- a/src/SaveLocation.ui
+++ b/src/SaveLocation.ui
@@ -6,16 +6,22 @@
<rect>
<x>0</x>
<y>0</y>
- <width>347</width>
- <height>110</height>
+ <width>401</width>
+ <height>172</height>
</rect>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="windowTitle">
<string>Save Location</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="locationLabel">
@@ -23,7 +29,7 @@
<string>Save Location:</string>
</property>
<property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
@@ -33,13 +39,7 @@
<widget class="QLineEdit" name="u_saveDirLEdit"/>
</item>
<item>
- <widget class="QPushButton" name="u_getDirButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <widget class="QToolButton" name="u_getDirButton">
<property name="text">
<string>...</string>
</property>
@@ -53,7 +53,7 @@
<string>Name &amp; Format:</string>
</property>
<property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
@@ -78,37 +78,102 @@
</item>
</layout>
</item>
- <item row="3" column="1">
- <widget class="QLabel" name="u_resultValue">
+ <item row="2" column="0">
+ <widget class="QLabel" name="numStartFromLabel">
<property name="text">
- <string>/home/joe/example.png</string>
+ <string>Start numbering from:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="resultLabel">
+ <item row="2" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QSpinBox" name="u_numStartFrom">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>999999</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>168</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="u_resultLabel">
<property name="text">
<string>Example:</string>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="numStartFromLabel">
+ <item row="4" column="1">
+ <widget class="QLabel" name="u_resultValue">
<property name="text">
- <string>Start numbering from:</string>
+ <string>/home/joe/example.png</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="u_numStartFrom">
- <property name="minimum">
- <number>1</number>
+ <item row="6" column="0" colspan="2">
+ <widget class="QDialogButtonBox" name="dialogButtonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="maximum">
- <number>999999</number>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
+ <item row="3" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>18</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="0">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<customwidgets>
diff --git a/src/skanlite.cpp b/src/skanlite.cpp
index 6b37bc0..8e58a6e 100644
--- a/src/skanlite.cpp
+++ b/src/skanlite.cpp
@@ -176,8 +176,6 @@ Skanlite::Skanlite(const QString& device, QWidget* parent)
m_deviceName = device;
}
- // addAction(KStandardAction::quit(qApp, SLOT(quit()), this)); // FIXME KF5 needed?
-
// prepare the Show Image Dialog
/* FIXME KF5
*