Commit c63d4af7 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Add collapse/expand buttons to schedule view

BUG:416282
FIXED-IN:4.8.5
parent 4dced877
......@@ -65,10 +65,22 @@ KScheduledView::KScheduledView(QWidget *parent) :
{
setupUi(this);
// setup icons for collapse and expand button
KGuiItem collapseGuiItem("",
KIcon("zoom-out"),
QString(),
QString());
KGuiItem expandGuiItem("",
KIcon("zoom-in"),
QString(),
QString());
m_collapseButton->setGuiItem(collapseGuiItem);
m_expandButton->setGuiItem(expandGuiItem);
// create the searchline widget
// and insert it into the existing layout
m_searchWidget = new KTreeWidgetFilterLineWidget(m_listTab, m_scheduleTree);
m_filterBox->insertWidget(1, m_searchWidget);
m_filterBox->insertWidget(3, m_searchWidget);
//enable custom context menu
m_scheduleTree->setContextMenuPolicy(Qt::CustomContextMenu);
......
......@@ -17,27 +17,31 @@
<item>
<layout class="QHBoxLayout" name="m_filterBox">
<item>
<widget class="KPushButton" name="m_accountsCombo">
<widget class="KPushButton" name="m_collapseButton">
<property name="toolTip">
<string>Collapse all accounts in the list</string>
</property>
<property name="text">
<string>Filter Accounts</string>
<string/>
</property>
</widget>
</item>
<item>
<spacer name="spacer2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="KPushButton" name="m_expandButton">
<property name="toolTip">
<string>Expand all accounts in the list</string>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
<property name="text">
<string/>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>20</height>
</size>
</widget>
</item>
<item>
<widget class="KPushButton" name="m_accountsCombo">
<property name="text">
<string>Filter Accounts</string>
</property>
</spacer>
</widget>
</item>
<item>
<widget class="KPushButton" name="m_qbuttonNew">
......@@ -48,16 +52,6 @@
</item>
</layout>
</item>
<item>
<widget class="Line" name="line1">
<property name="frameShape">
<enum>QFrame::HLine</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
<item>
<widget class="KTabWidget" name="m_tabWidget">
<widget class="QWidget" name="m_listTab">
......@@ -152,5 +146,38 @@
</customwidget>
</customwidgets>
<resources/>
<connections/>
<connections>
<connection>
<sender>m_collapseButton</sender>
<signal>clicked()</signal>
<receiver>m_scheduleTree</receiver>
<slot>collapseAll()</slot>
<hints>
<hint type="sourcelabel">
<x>23</x>
<y>17</y>
</hint>
<hint type="destinationlabel">
<x>196</x>
<y>114</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_expandButton</sender>
<signal>clicked()</signal>
<receiver>m_scheduleTree</receiver>
<slot>expandAll()</slot>
<hints>
<hint type="sourcelabel">
<x>74</x>
<y>17</y>
</hint>
<hint type="destinationlabel">
<x>196</x>
<y>114</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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