]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
- Simplify layout of Export Raw Data dialog
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 17 Apr 2015 19:13:16 +0000 (21:13 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 17 Apr 2015 19:13:16 +0000 (21:13 +0200)
- Set resizing policy of formats combobox and available signals list to
grow with content

gui/exportrawdatadialog.cpp
gui/exportrawdatadialog.ui

index 34618b799b05f70d63870ef9124c8e8f279aa51e..983eda51a8b3ef0c6a0e6a78ec0f55926a7e99d7 100644 (file)
@@ -38,6 +38,8 @@ ExportRawDataDialog::ExportRawDataDialog(const QStringList& supportedFormats, QW
 
   ui->qcbox_formats->addItems(supportedFormats);
   ui->qlv_availableSignals->setModel(&m_availableSignals);
+  ui->qcbox_formats->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+  ui->qlv_availableSignals->setSizeAdjustPolicy(QListView::AdjustToContents);
 
   connect(ui->qpb_browse, SIGNAL(clicked()), this, SLOT(onBrowseClicked()));
   connect(ui->qpb_ok, SIGNAL(clicked()), this, SLOT(accept()));
index 27cba6c092970c284e27748b67607028d02ce83a..6763b80fde2f84356ee1a6f5b69a1edefa99df2e 100644 (file)
@@ -7,11 +7,11 @@
     <x>0</x>
     <y>0</y>
     <width>400</width>
-    <height>344</height>
+    <height>370</height>
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   <property name="windowTitle">
    <string>Export raw data</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
+  <property name="modal">
+   <bool>true</bool>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="1">
+    <layout class="QHBoxLayout" name="horLay_Path">
+     <item>
+      <widget class="QLineEdit" name="qle_destPath">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
+     </item>
+     <item>
       <widget class="QPushButton" name="qpb_browse">
        <property name="text">
         <string>Browse</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="1">
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horLay_format">
+     <item>
+      <widget class="QLabel" name="ql_formatCap">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Format:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
       <widget class="QComboBox" name="qcbox_formats">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
       </widget>
      </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="ql_formatCap">
+    </layout>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="vertLay_availableSignals">
+     <property name="sizeConstraint">
+      <enum>QLayout::SetDefaultConstraint</enum>
+     </property>
+     <item>
+      <widget class="QLabel" name="ql_availSigsCap">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="text">
-        <string>Format:</string>
+        <string>Available signals:</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="0">
-      <widget class="QLineEdit" name="qle_destPath">
+     <item>
+      <widget class="QListView" name="qlv_availableSignals">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
     </layout>
    </item>
    <item>
-    <widget class="QWidget" name="widget" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <item>
-       <widget class="QLabel" name="ql_availSigsCap">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="text">
-         <string>Available signals:</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QListView" name="qlv_availableSignals"/>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout">
+    <layout class="QHBoxLayout" name="horLay_buttons">
      <item>
       <spacer name="horizontalSpacer">
        <property name="orientation">