[Pkg-owncloud-commits] [owncloud-client] 25/219: Wizard: new layout

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 858218ac343f130021bc79f40e74455adb7d44fd
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Thu Aug 28 12:18:19 2014 +0200

    Wizard:  new layout
---
 src/wizard/owncloudadvancedsetuppage.cpp |  26 ++-
 src/wizard/owncloudadvancedsetuppage.ui  | 280 ++++++++++++-------------------
 src/wizard/owncloudwizardresultpage.cpp  |   2 +-
 src/wizard/owncloudwizardresultpage.ui   |  90 ++++++----
 4 files changed, 187 insertions(+), 211 deletions(-)

diff --git a/src/wizard/owncloudadvancedsetuppage.cpp b/src/wizard/owncloudadvancedsetuppage.cpp
index cb89b3f..b250925 100644
--- a/src/wizard/owncloudadvancedsetuppage.cpp
+++ b/src/wizard/owncloudadvancedsetuppage.cpp
@@ -58,8 +58,18 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
     connect( _ui.pbSelectLocalFolder, SIGNAL(clicked()), SLOT(slotSelectFolder()));
     setButtonText(QWizard::NextButton, tr("Connect..."));
 
-    connect( _ui.tbSyncEverything, SIGNAL(clicked()), SLOT(slotSyncEverythingClicked()));
-    connect( _ui.tbSelectiveSync, SIGNAL(clicked()), SLOT(slotSelectiveSyncClicked()));
+    connect( _ui.rSyncEverything, SIGNAL(clicked()), SLOT(slotSyncEverythingClicked()));
+    connect( _ui.rSelectiveSync, SIGNAL(clicked()), SLOT(slotSelectiveSyncClicked()));
+    connect( _ui.bSelectiveSync, SIGNAL(clicked()), SLOT(slotSelectiveSyncClicked()));
+
+    QIcon appIcon = theme->applicationIcon();
+    _ui.lServerIcon->setText(QString());
+    _ui.lServerIcon->setPixmap(appIcon.pixmap(48));
+
+    _ui.lLocalIcon->setText(QString());
+    _ui.lLocalIcon->setPixmap(QPixmap(":/mirall/resources/folder-sync.png"));
+
+
 }
 
 void OwncloudAdvancedSetupPage::setupCustomization()
@@ -261,15 +271,18 @@ void OwncloudAdvancedSetupPage::setConfigExists(bool config)
 void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked()
 {
     // Because clicking on it also changes it, restore it to the previous state in case the user cancel the dialog
-    _ui.tbSelectiveSync->setChecked(!_blacklist.isEmpty());
+    _ui.rSyncEverything->setChecked(_blacklist.isEmpty());
 
     Account *acc = static_cast<OwncloudWizard *>(wizard())->account();
     SelectiveSyncDialog *dlg = new SelectiveSyncDialog(acc, 0, this);
     if (dlg->exec() == QDialog::Accepted) {
         _blacklist = dlg->createBlackList();
         if (!_blacklist.isEmpty()) {
-            _ui.tbSyncEverything->setChecked(false);
-            _ui.tbSelectiveSync->setChecked(true);
+            _ui.rSelectiveSync->blockSignals(true);
+            _ui.rSelectiveSync->setChecked(true);
+            _ui.rSelectiveSync->blockSignals(false);
+        } else {
+            _ui.rSyncEverything->setChecked(true);
         }
         wizard()->setProperty("blacklist", _blacklist);
     }
@@ -277,8 +290,7 @@ void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked()
 
 void OwncloudAdvancedSetupPage::slotSyncEverythingClicked()
 {
-    _ui.tbSyncEverything->setChecked(true);
-    _ui.tbSelectiveSync->setChecked(false);
+    _ui.rSyncEverything->setChecked(true);
     _blacklist.clear();
 }
 
diff --git a/src/wizard/owncloudadvancedsetuppage.ui b/src/wizard/owncloudadvancedsetuppage.ui
index 679914a..e9cff7c 100644
--- a/src/wizard/owncloudadvancedsetuppage.ui
+++ b/src/wizard/owncloudadvancedsetuppage.ui
@@ -19,7 +19,7 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
+  <layout class="QVBoxLayout" name="verticalLayout_4">
    <item>
     <widget class="QLabel" name="topLabel">
      <property name="sizePolicy">
@@ -56,27 +56,86 @@
     </spacer>
    </item>
    <item>
-    <layout class="QFormLayout" name="advancedBox">
-     <property name="fieldGrowthPolicy">
-      <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-     </property>
-     <item row="1" column="0">
-      <widget class="QLabel" name="label">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="text">
-        <string>&Local Folder</string>
-       </property>
-       <property name="buddy">
-        <cstring>pbSelectLocalFolder</cstring>
-       </property>
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QLabel" name="lServerIcon">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="lServer">
+         <property name="text">
+          <string>Server</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="0" column="1">
+      <widget class="QWidget" name="widget" native="true">
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <widget class="QRadioButton" name="rSyncEverything">
+          <property name="text">
+           <string>Sync everything from server</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <widget class="QRadioButton" name="rSelectiveSync">
+            <property name="text">
+             <string/>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="bSelectiveSync">
+            <property name="text">
+             <string>Choose what to sync</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+       </layout>
       </widget>
      </item>
      <item row="1" column="1">
+      <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>
+     <item row="2" column="1">
       <widget class="QPushButton" name="pbSelectLocalFolder">
        <property name="sizePolicy">
         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -89,7 +148,7 @@
        </property>
       </widget>
      </item>
-     <item row="2" column="1">
+     <item row="3" column="1">
       <widget class="QWidget" name="resolutionWidget" native="true">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@@ -114,173 +173,48 @@
           </property>
          </widget>
         </item>
-        <item row="1" column="0">
-         <spacer name="horizontalSpacer_6">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeType">
-           <enum>QSizePolicy::Fixed</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item row="1" column="1">
-         <widget class="QLabel" name="label_6">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string><small>Syncs your existing data to new location.</small></string>
-          </property>
-          <property name="scaledContents">
-           <bool>false</bool>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0" colspan="2">
+        <item row="1" column="0" colspan="2">
          <widget class="QRadioButton" name="cbSyncFromScratch">
           <property name="toolTip">
            <string><html><head/><body><p>If this box is checked, existing content in the local directory will be erased to start a clean sync from the server.</p><p>Do not check this if the local content should be uploaded to the servers directory.</p></body></html></string>
           </property>
           <property name="text">
-           <string>&Start a clean sync</string>
-          </property>
-          <property name="checkable">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0">
-         <spacer name="horizontalSpacer_5">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeType">
-           <enum>QSizePolicy::Fixed</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item row="3" column="1">
-         <widget class="QLabel" name="label_5">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="text">
-           <string><small>Erases the contents of the local folder before syncing using the new settings.</small></string>
-          </property>
-          <property name="scaledContents">
-           <bool>false</bool>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QWidget" name="widget" native="true">
-       <layout class="QGridLayout" name="gridLayout">
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_3">
-          <property name="text">
-           <string>or</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignCenter</set>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QToolButton" name="tbSelectiveSync">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>160</width>
-            <height>80</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>Choose what to sync</string>
+           <string>&Start a clean sync (Erases the local folder!)</string>
           </property>
           <property name="checkable">
            <bool>true</bool>
           </property>
          </widget>
         </item>
-        <item row="0" column="0">
-         <widget class="QToolButton" name="tbSyncEverything">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>160</width>
-            <height>80</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>Sync everything from server</string>
-          </property>
-          <property name="checkable">
-           <bool>true</bool>
-          </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
        </layout>
       </widget>
      </item>
-     <item row="0" column="0">
-      <widget class="QLabel" name="label_2">
-       <property name="text">
-        <string>Remote</string>
-       </property>
-      </widget>
+     <item row="2" column="0" rowspan="2">
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QLabel" name="lLocalIcon">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="lLocal">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>&Local Folder</string>
+         </property>
+         <property name="buddy">
+          <cstring>pbSelectLocalFolder</cstring>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </item>
     </layout>
    </item>
diff --git a/src/wizard/owncloudwizardresultpage.cpp b/src/wizard/owncloudwizardresultpage.cpp
index 27a6fc1..4fa1c09 100644
--- a/src/wizard/owncloudwizardresultpage.cpp
+++ b/src/wizard/owncloudwizardresultpage.cpp
@@ -47,7 +47,7 @@ OwncloudWizardResultPage::OwncloudWizardResultPage()
 
     Theme* theme = Theme::instance();
     QIcon appIcon = theme->applicationIcon();
-    _ui.pbOpenServer->setText(tr("Open %1").arg(theme->appNameGUI()));
+    _ui.pbOpenServer->setText(tr("Open %1 in Browser").arg(theme->appNameGUI()));
     _ui.pbOpenServer->setIcon(appIcon.pixmap(48));
     _ui.pbOpenServer->setIconSize(QSize(48, 48));
     _ui.pbOpenServer->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
diff --git a/src/wizard/owncloudwizardresultpage.ui b/src/wizard/owncloudwizardresultpage.ui
index 67f262a..6a1e58a 100644
--- a/src/wizard/owncloudwizardresultpage.ui
+++ b/src/wizard/owncloudwizardresultpage.ui
@@ -6,15 +6,15 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>469</width>
-    <height>325</height>
+    <width>473</width>
+    <height>366</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <item>
     <widget class="QLabel" name="topLabel">
      <property name="text">
       <string>TextLabel</string>
@@ -24,7 +24,7 @@
      </property>
     </widget>
    </item>
-   <item row="1" column="0">
+   <item>
     <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
       <spacer name="horizontalSpacer">
@@ -43,7 +43,7 @@
       </spacer>
      </item>
      <item>
-      <layout class="QVBoxLayout" name="verticalLayout">
+      <layout class="QVBoxLayout" name="verticalLayout_2">
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout_12"/>
        </item>
@@ -92,36 +92,66 @@
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
-          <widget class="QToolButton" name="pbOpenLocal">
-           <property name="minimumSize">
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
             <size>
-             <width>160</width>
-             <height>80</height>
+             <width>40</width>
+             <height>20</height>
             </size>
            </property>
-           <property name="text">
-            <string>PushButton</string>
-           </property>
-           <property name="toolButtonStyle">
-            <enum>Qt::ToolButtonTextUnderIcon</enum>
-           </property>
-          </widget>
+          </spacer>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <item>
+            <widget class="QToolButton" name="pbOpenServer">
+             <property name="minimumSize">
+              <size>
+               <width>160</width>
+               <height>80</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>PushButton</string>
+             </property>
+             <property name="toolButtonStyle">
+              <enum>Qt::ToolButtonTextUnderIcon</enum>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QToolButton" name="pbOpenLocal">
+             <property name="minimumSize">
+              <size>
+               <width>160</width>
+               <height>80</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>PushButton</string>
+             </property>
+             <property name="toolButtonStyle">
+              <enum>Qt::ToolButtonTextUnderIcon</enum>
+             </property>
+            </widget>
+           </item>
+          </layout>
          </item>
          <item>
-          <widget class="QToolButton" name="pbOpenServer">
-           <property name="minimumSize">
+          <spacer name="horizontalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
             <size>
-             <width>160</width>
-             <height>80</height>
+             <width>40</width>
+             <height>20</height>
             </size>
            </property>
-           <property name="text">
-            <string>PushButton</string>
-           </property>
-           <property name="toolButtonStyle">
-            <enum>Qt::ToolButtonTextUnderIcon</enum>
-           </property>
-          </widget>
+          </spacer>
          </item>
         </layout>
        </item>
@@ -132,8 +162,8 @@
          </property>
          <property name="sizeHint" stdset="0">
           <size>
-           <width>20</width>
-           <height>40</height>
+           <width>336</width>
+           <height>13</height>
           </size>
          </property>
         </spacer>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list