Commit db4ad369 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

online widget: minor ui cleanup

parent eb37dfa6
Pipeline #51444 passed with stage
in 10 minutes and 10 seconds
......@@ -58,8 +58,9 @@ ResourceWidget::ResourceWidget(QWidget *parent)
slider_zoom->setRange(0, 15);
connect(slider_zoom, &QAbstractSlider::valueChanged, this, &ResourceWidget::slotSetIconSize);
connect(button_zoomin, &QToolButton::clicked, this, [&]() {
(qMin(slider_zoom->value() + 1, slider_zoom->maximum())); });
connect(button_zoomout, &QToolButton::clicked, this, [&]() { slider_zoom->setValue(qMax(slider_zoom->value() - 1, slider_zoom->minimum())); });
slider_zoom->setValue(qMin(slider_zoom->value() + 1, slider_zoom->maximum())); });
connect(button_zoomout, &QToolButton::clicked, this, [&]() {
slider_zoom->setValue(qMax(slider_zoom->value() - 1, slider_zoom->minimum())); });
message_line->close();
......@@ -84,7 +85,6 @@ ResourceWidget::ResourceWidget(QWidget *parent)
loadConfig();
connect(provider_info, SIGNAL(leftClickedUrl(const QString&)), this, SLOT(slotOpenUrl(const QString&)));
connect(label_license, SIGNAL(leftClickedUrl(const QString&)), this, SLOT(slotOpenUrl(const QString&)));
connect(button_search, &QAbstractButton::clicked, this, &ResourceWidget::slotStartSearch);
connect(search_text, SIGNAL(returnPressed()), this, SLOT(slotStartSearch()));
connect(search_results, &QListWidget::currentRowChanged, this, &ResourceWidget::slotUpdateCurrentItem);
connect(button_preview, &QAbstractButton::clicked, this, [&](){
......@@ -163,7 +163,7 @@ void ResourceWidget::saveConfig()
void ResourceWidget::blockUI(bool block)
{
buildin_box->setEnabled(!block);
search_box->setEnabled(!block);
search_text->setEnabled(!block);
service_list->setEnabled(!block);
setCursor(block ? Qt::WaitCursor : Qt::ArrowCursor);
}
......
......@@ -2,236 +2,199 @@
<ui version="4.0">
<class>ResourceWidget_UI</class>
<widget class="QWidget" name="ResourceWidget_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>507</width>
<height>457</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="2" column="0">
<widget class="QWidget" name="search_box" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QToolButton" name="button_zoomout">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zoom-out">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="slider_zoom">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="button_zoomin">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zoom-in">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="KLineEdit" name="search_text">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<height>16777215</height>
</size>
</property>
<property name="placeholderText">
<string>Search...</string>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_search">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="search">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QSplitter" name="buildin_box">
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0" colspan="7">
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="childrenCollapsible">
<bool>false</bool>
<property name="handleWidth">
<number>7</number>
</property>
<widget class="QWidget" name="layoutWidget_3">
<layout class="QGridLayout" name="list_box">
<item row="1" column="0">
<widget class="QListWidget" name="search_results">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>2</number>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QSpinBox" name="page_number">
<property name="buttonSymbols">
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="prefix">
<string>Page </string>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="KUrlLabel" name="provider_info">
<property name="text">
<string>Photos provided by Example Provider</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="useCursor">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="details_box" native="true">
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
<widget class="QPushButton" name="button_preview">
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="KLineEdit" name="search_text">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Preview</string>
<property name="placeholderText">
<string>Search...</string>
</property>
<property name="icon">
<iconset theme="media-playback-start">
<normaloff>.</normaloff>.</iconset>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="button_import">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Import</string>
<item>
<widget class="QFrame" name="buildin_box">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="icon">
<iconset theme="document-import">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QTextBrowser" name="info_browser">
<property name="openExternalLinks">
<bool>true</bool>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="openLinks">
<bool>true</bool>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<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="QListWidget" name="search_results">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>2</number>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="page_number">
<property name="buttonSymbols">
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="prefix">
<string>Page </string>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="KUrlLabel" name="label_license">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</layout>
</widget>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QFrame" name="details_box">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<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="QTextBrowser" name="info_browser">
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="openLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KUrlLabel" name="label_license">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KUrlLabel" name="provider_info">
<property name="text">
<string>Photos provided by Example Provider</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="useCursor">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="0" colspan="7">
<widget class="KMessageWidget" name="message_line">
<property name="wordWrap">
<bool>true</bool>
......@@ -241,8 +204,102 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QWidget" name="" native="true">
<item row="3" column="2">
<widget class="QSlider" name="slider_zoom">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QPushButton" name="button_preview">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Preview</string>
</property>
<property name="icon">
<iconset theme="media-playback-start">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QToolButton" name="button_zoomin">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zoom-in">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="4">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>81</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="6">
<widget class="QPushButton" name="button_import">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Import</string>
</property>
<property name="icon">
<iconset theme="document-import">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QToolButton" name="button_zoomout">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zoom-out">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="7">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -271,9 +328,18 @@
</widget>
</item>
</layout>
<zorder>search_box</zorder>
<zorder>widget</zorder>
<zorder>message_line</zorder>
<zorder>buildin_box</zorder>
<zorder>button_preview</zorder>
<zorder>button_import</zorder>
<zorder>button_zoomin</zorder>
<zorder>button_zoomout</zorder>
<zorder>slider_zoom</zorder>
<zorder>label_license</zorder>
<zorder>info_browser</zorder>
<zorder>provider_info</zorder>
<zorder>horizontalSpacer</zorder>
</widget>
<customwidgets>
<customwidget>
......@@ -299,7 +365,6 @@
</customwidgets>
<tabstops>
<tabstop>service_list</tabstop>
<tabstop>info_browser</tabstop>
<tabstop>button_preview</tabstop>
<tabstop>button_import</tabstop>
</tabstops>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment