Allow adding additional widgets to the heading of the settings dialog
This commit is contained in:
parent
49854354d6
commit
c91d73afc3
|
@ -193,6 +193,14 @@ void SettingsDialog::setCornerWidget(QWidget *widget, Qt::Corner corner)
|
|||
m_ui->pagesTabWidget->setCornerWidget(widget, corner);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Adds a widget next to the heading.
|
||||
*/
|
||||
void SettingsDialog::addHeadingWidget(QWidget *widget)
|
||||
{
|
||||
m_ui->headingLayout->addWidget(widget);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Updates the tab widget to show the pages for the current category.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
void setSingleCategory(OptionCategory *singleCategory);
|
||||
QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const;
|
||||
void setCornerWidget(QWidget *widget, Qt::Corner corner = Qt::TopRightCorner);
|
||||
void addHeadingWidget(QWidget *widget);
|
||||
|
||||
Q_SIGNALS:
|
||||
void applied();
|
||||
|
|
|
@ -35,41 +35,6 @@
|
|||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="headingLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>No category selected</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QtUtilities::ClearLineEdit" name="filterLineEdit">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QTabWidget" name="pagesTabWidget">
|
||||
<property name="currentIndex">
|
||||
|
@ -96,6 +61,39 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="headingLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="headingLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>No category selected</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QtUtilities::ClearLineEdit" name="filterLineEdit">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue