setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
_ui->errorLabel->hide();
+
+ // Setup the sharee search progress indicator
+ _ui->shareeHorizontalLayout->addWidget(&_pi_sharee);
}
ShareUserGroupWidget::~ShareUserGroupWidget()
void ShareUserGroupWidget::searchForSharees()
{
_completionTimer.stop();
+ _pi_sharee.startAnimation();
ShareeModel::ShareeSet blacklist;
// Add the current user to _sharees since we can't share with ourself
}
_ui->errorLabel->hide();
_completerModel->fetch(_ui->shareeLineEdit->text(), blacklist);
-
}
void ShareUserGroupWidget::getShares()
void ShareUserGroupWidget::slotShareesReady()
{
+ _pi_sharee.stopAnimation();
if (_completerModel->rowCount() == 0) {
displayError(0, tr("No results for '%1'").arg(_completerModel->currentSearch()));
return;
void ShareUserGroupWidget::displayError(int code, const QString& message)
{
+ _pi_sharee.stopAnimation();
qDebug() << "Error from server" << code << message;
_ui->errorLabel->setText(message);
_ui->errorLabel->show();
<x>0</x>
<y>0</y>
<width>457</width>
- <height>188</height>
+ <height>164</height>
</rect>
</property>
<property name="windowTitle">
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QLineEdit" name="shareeLineEdit">
- <property name="placeholderText">
- <string>Share with users or groups ...</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="shareeHorizontalLayout">
+ <item>
+ <widget class="QLineEdit" name="shareeLineEdit">
+ <property name="placeholderText">
+ <string>Share with users or groups ...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<widget class="QLabel" name="errorLabel">
<rect>
<x>0</x>
<y>0</y>
- <width>441</width>
- <height>98</height>
+ <width>437</width>
+ <height>94</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3"/>