[Pkg-owncloud-commits] [owncloud-client] 281/484: Share dialog: a few layout adjustements
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:53 UTC 2015
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 b74e81267124ff4d2358410fe96ec35f6702982b
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Mon Nov 9 15:58:50 2015 +0100
Share dialog: a few layout adjustements
---
src/gui/shareusergroupwidget.cpp | 13 +++---
src/gui/shareusergroupwidget.ui | 28 +++++-------
src/gui/sharewidget.ui | 93 ++++++++++++++++++++++++----------------
3 files changed, 73 insertions(+), 61 deletions(-)
diff --git a/src/gui/shareusergroupwidget.cpp b/src/gui/shareusergroupwidget.cpp
index 7beb8a9..8edeaef 100644
--- a/src/gui/shareusergroupwidget.cpp
+++ b/src/gui/shareusergroupwidget.cpp
@@ -60,7 +60,7 @@ ShareUserGroupWidget::ShareUserGroupWidget(AccountPtr account, const QString &sh
_manager = new ShareManager(_account, this);
connect(_manager, SIGNAL(sharesFetched(QList<QSharedPointer<Share>>)), SLOT(slotSharesFetched(QList<QSharedPointer<Share>>)));
connect(_manager, SIGNAL(shareCreated(QSharedPointer<Share>)), SLOT(getShares()));
- connect(_ui->shareeLineEdit, SIGNAL(returnPressed()), SLOT(on_searchPushButton_clicked()));
+// connect(_ui->shareeLineEdit, SIGNAL(returnPressed()), SLOT(on_searchPushButton_clicked()));
connect(_completer, SIGNAL(activated(QModelIndex)), SLOT(slotCompleterActivated(QModelIndex)));
}
@@ -90,15 +90,13 @@ void ShareUserGroupWidget::on_searchPushButton_clicked()
QWidget *w = _ui->sharesLayout->itemAt(i)->widget();
if (w != NULL) {
- const QSharedPointer<Sharee> x = dynamic_cast<ShareWidget *>(w)->share()->getShareWith();
+ const QSharedPointer<Sharee> x = static_cast<ShareWidget *>(w)->share()->getShareWith();
sharees.append(x);
}
}
-
_sharees.append(currentUser);
-
_completerModel = new ShareeModel(_account,
_ui->shareeLineEdit->text(),
_isFile ? QLatin1String("file") : QLatin1String("folder"),
@@ -106,10 +104,11 @@ void ShareUserGroupWidget::on_searchPushButton_clicked()
_completer);
connect(_completerModel, SIGNAL(shareesReady()), SLOT(slotUpdateCompletion()));
_completerModel->fetch();
+ _completer->setModel(_completerModel);
}
-void ShareUserGroupWidget::slotUpdateCompletion() {
- _completer->setModel(_completerModel);
+void ShareUserGroupWidget::slotUpdateCompletion()
+{
_completer->complete();
}
@@ -137,6 +136,8 @@ void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>>
ShareWidget *s = new ShareWidget(share, this);
_ui->sharesLayout->addWidget(s);
}
+
+ _ui->labelShares->setVisible(!shares.empty());
}
void ShareUserGroupWidget::slotCompleterActivated(const QModelIndex & index) {
diff --git a/src/gui/shareusergroupwidget.ui b/src/gui/shareusergroupwidget.ui
index 19c2926..a6b3a35 100644
--- a/src/gui/shareusergroupwidget.ui
+++ b/src/gui/shareusergroupwidget.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>372</width>
- <height>271</height>
+ <width>457</width>
+ <height>188</height>
</rect>
</property>
<property name="windowTitle">
@@ -20,19 +20,26 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QLineEdit" name="shareeLineEdit"/>
+ <widget class="QLineEdit" name="shareeLineEdit">
+ <property name="placeholderText">
+ <string>Share with users, groups or remote users ...</string>
+ </property>
+ </widget>
</item>
<item>
<widget class="QPushButton" name="searchPushButton">
<property name="text">
<string>Search</string>
</property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
</widget>
</item>
</layout>
</item>
<item>
- <widget class="QLabel" name="label">
+ <widget class="QLabel" name="labelShares">
<property name="enabled">
<bool>true</bool>
</property>
@@ -44,19 +51,6 @@
<item>
<layout class="QVBoxLayout" name="sharesLayout"/>
</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>
<layoutdefault spacing="6" margin="11"/>
diff --git a/src/gui/sharewidget.ui b/src/gui/sharewidget.ui
index 0e323cc..84c3d91 100644
--- a/src/gui/sharewidget.ui
+++ b/src/gui/sharewidget.ui
@@ -9,65 +9,82 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>376</width>
+ <height>128</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
<item>
- <widget class="QLabel" name="sharedWith">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Permissions</string>
- </property>
- </widget>
- </item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <widget class="QCheckBox" name="permissionUpdate">
+ <widget class="QLabel" name="sharedWith">
<property name="text">
- <string>Update</string>
+ <string>TextLabel</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="permissionCreate">
+ <widget class="QToolButton" name="deleteShareButton">
<property name="text">
- <string>Create</string>
+ <string/>
</property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="permissionDelete">
- <property name="text">
- <string>Delete</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="permissionShare">
- <property name="text">
- <string>Share</string>
+ <property name="icon">
+ <iconset theme="user-trash"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
- <widget class="QPushButton" name="deleteShareButton">
- <property name="text">
- <string>Delete</string>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Permissions</string>
</property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QCheckBox" name="permissionDelete">
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="permissionCreate">
+ <property name="text">
+ <string>Create</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="permissionUpdate">
+ <property name="text">
+ <string>Update</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="permissionShare">
+ <property name="text">
+ <string>Share</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
</layout>
--
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