KVIrc  4.9.2
DeveloperAPIs
KvsObject_treeWidget.h
Go to the documentation of this file.
1 #ifndef _CLASS_TREEWIDGET_H_
2 #define _CLASS_TREEWIDGET_H_
3 //=============================================================================
4 //
5 // File : KvsObject_treeWidget.h
6 // Creation date : Fri Jan 28 14:21:48 CEST 2005
7 // by Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor)
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2005-2008 Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "KvsObject_widget.h"
30 #include "object_macros.h"
31 
32 #include <QTreeWidget>
33 
35 {
36  Q_OBJECT
37 public:
39 
40 public:
41  QWidget * widget() { return (QWidget *)object(); };
42  void fileDropped(QString &, QTreeWidgetItem *);
43 
44 protected:
45  virtual bool init(KviKvsRunTimeContext * pContext, KviKvsVariantList * pParams);
46 
77 protected slots:
78  void slotClicked(QTreeWidgetItem *, int);
79  void slotSelectionChanged();
80  void slotCurrentChanged(QTreeWidgetItem *, QTreeWidgetItem *);
81  void slotItemActivated(QTreeWidgetItem *, int col);
82  void slotOnItemEntered(QTreeWidgetItem *, int col);
83  void slotItemExpanded(QTreeWidgetItem *);
84  void slotItemCollapsed(QTreeWidgetItem *);
85  void slotItemChanged(QTreeWidgetItem *, int);
86 };
87 
88 class KviKvsTreeWidget : public QTreeWidget
89 {
90  Q_OBJECT
91 public:
92  KviKvsTreeWidget(QWidget * par, const char * name, KvsObject_treeWidget *);
93  virtual ~KviKvsTreeWidget();
94 
95 protected:
97 
98 protected:
99  void dropEvent(QDropEvent * e);
100  void dragEnterEvent(QDragEnterEvent * e);
101  void dragMoveEvent(QDragMoveEvent * e);
102 };
103 
104 #endif // _CLASS_TREEWIDGET_H_
bool selectedItems(KviKvsObjectFunctionCall *c)
Definition: KvsObject_widget.h:39
QWidget * widget()
Definition: KvsObject_treeWidget.h:41
void slotItemActivated(QTreeWidgetItem *, int col)
Definition: KvsObject_treeWidget.cpp:517
void slotItemChanged(QTreeWidgetItem *, int)
Definition: KvsObject_treeWidget.cpp:568
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
void fileDropped(QString &, QTreeWidgetItem *)
Definition: KvsObject_treeWidget.cpp:575
virtual ~KviKvsTreeWidget()
Class to handle variant variables lists.
Definition: KviKvsVariantList.h:41
bool itemAt(KviKvsObjectFunctionCall *c)
Definition: KviKvsObjectFunctionCall.h:33
bool setSelectionMode(KviKvsObjectFunctionCall *c)
void slotItemExpanded(QTreeWidgetItem *)
Definition: KvsObject_treeWidget.cpp:544
void slotOnItemEntered(QTreeWidgetItem *, int col)
Definition: KvsObject_treeWidget.cpp:530
bool setAllColumnsShowFocus(KviKvsObjectFunctionCall *c)
bool itemCollapsedEvent(KviKvsObjectFunctionCall *c)
bool topLevelItemCount(KviKvsObjectFunctionCall *c)
bool setHeaderLabels(KviKvsObjectFunctionCall *c)
Definition: KvsObject_treeWidget.h:88
bool onItemEvent(KviKvsObjectFunctionCall *c)
Definition: KvsObject_treeWidget.h:34
void slotSelectionChanged()
Definition: KvsObject_treeWidget.cpp:484
#define e
Definition: detector.cpp:69
bool itemClickedEvent(KviKvsObjectFunctionCall *c)
bool showListViewHeader(KviKvsObjectFunctionCall *c)
bool setColumnCount(KviKvsObjectFunctionCall *c)
#define KVSO_DECLARE_OBJECT(__className)
Definition: object_macros.h:33
void dropEvent(QDropEvent *e)
Definition: KvsObject_treeWidget.cpp:611
bool setColumnText(KviKvsObjectFunctionCall *c)
bool takeItem(KviKvsObjectFunctionCall *c)
void slotClicked(QTreeWidgetItem *, int)
Definition: KvsObject_treeWidget.cpp:470
bool setSorting(KviKvsObjectFunctionCall *c)
bool currentItem(KviKvsObjectFunctionCall *c)
bool listViewHeaderIsVisible(KviKvsObjectFunctionCall *c)
QObject * object() const
Definition: KviKvsObject.h:94
bool setSortingEnabled(KviKvsObjectFunctionCall *c)
bool setBackgroundImage(KviKvsObjectFunctionCall *c)
Definition: KviKvsRunTimeContext.h:103
bool itemExpandedEvent(KviKvsObjectFunctionCall *c)
void slotItemCollapsed(QTreeWidgetItem *)
Definition: KvsObject_treeWidget.cpp:556
void dragMoveEvent(QDragMoveEvent *e)
Definition: KvsObject_treeWidget.cpp:606
QString name()
Definition: KviRuntimeInfo.cpp:655
KvsObject_treeWidget * m_pParentScript
Definition: KvsObject_treeWidget.h:96
bool addColumn(KviKvsObjectFunctionCall *c)
KviKvsTreeWidget(QWidget *par, const char *name, KvsObject_treeWidget *)
Definition: KvsObject_treeWidget.cpp:582
bool selectionChangedEvent(KviKvsObjectFunctionCall *c)
virtual bool init(KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams)
Definition: KvsObject_treeWidget.cpp:204
bool setRootIsDecorated(KviKvsObjectFunctionCall *c)
void dragEnterEvent(QDragEnterEvent *e)
Definition: KvsObject_treeWidget.cpp:596
bool itemActivatedEvent(KviKvsObjectFunctionCall *c)
bool currentChangedEvent(KviKvsObjectFunctionCall *c)
bool itemChangedEvent(KviKvsObjectFunctionCall *c)
bool firstChild(KviKvsObjectFunctionCall *c)
void slotCurrentChanged(QTreeWidgetItem *, QTreeWidgetItem *)
Definition: KvsObject_treeWidget.cpp:505
bool topLevelItem(KviKvsObjectFunctionCall *c)
bool clear(KviKvsObjectFunctionCall *c)
bool hideListViewHeader(KviKvsObjectFunctionCall *c)
bool setAcceptDrops(KviKvsObjectFunctionCall *c)