5
* Copyright (C) 2010 David Hubner <hubnerd@ntlworld.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
#include <QModelIndex>
29
#include <QContextMenuEvent>
31
#include <QStringList>
35
#include "infokcmmodel.h"
36
#include "infokcmproxymodel.h"
39
class InfoKcmProxyModel;
41
class SidePanel : public QTreeView
48
* Create Side Panel Widget, including search line edit.
50
* @param parent objects parent
52
SidePanel(QWidget *parent);
55
* Destory SidePanel object
60
* Select the first valid item in TreeView
62
void changeToFirstValidItem();
65
* Map a QAbstractItemModel index to a QSortFilterProxyModel index
67
QModelIndex mapToProxySource(const QModelIndex&);
70
* Get all the treeview items keywords
72
QStringList allChildKeywords();
75
* Expand and collapse an Item ( if an expandable item )
77
void toggleExpand(const KcmTreeItem *);
82
* Emitted when menu item is clicked
84
void activated(const KcmTreeItem *);
89
* Triggered when treeview item is clicked
91
void activatedSlot(const QModelIndex &index);
96
* Triggered when collapseAll is selected from tree view
99
void collapseAllSlot();
102
* Triggered when ExpandAll is selected from tree view
105
void expandAllSlot();
108
* Filter out all but menu items that fit certain keywords
110
void filterSideMenuSlot(const QString &);
113
* Triggered when Reset Search is selected from tree view
116
void resetSearchSlot();
121
* Created actions for the tree view item menu
123
void createMenuActions();
126
* Create treeview item menu
128
void contextMenuEvent(QContextMenuEvent *event);
130
InfoKcmModel *m_model;
131
InfoKcmProxyModel *m_proxyModel;