kapplicationtree.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __KDevApplicationTree_h__
00020 #define __KDevApplicationTree_h__
00021
00022 #include <kurl.h>
00023 #include <klistview.h>
00024
00025 class KURLRequester;
00026
00027 class QWidget;
00028 class QCheckBox;
00029 class QPushButton;
00030 class QLabel;
00031 class QStringList;
00032
00033
00034
00035
00039 class KDevAppTreeListItem : public QListViewItem
00040 {
00041 bool parsed;
00042 bool directory;
00043 QString path;
00044 QString exec;
00045 QString dEntry;
00046
00047 protected:
00048 QString key(int column, bool ascending) const;
00049
00050 void init(const QPixmap& pixmap, bool parse, bool dir, const QString& _path, const QString& _exec, const QString& _dEntry);
00051
00052 public:
00053 KDevAppTreeListItem( KListView* parent, const QString & name, const QPixmap& pixmap,
00054 bool parse, bool dir, const QString& p, const QString& c, const QString& dE );
00055 KDevAppTreeListItem( QListViewItem* parent, const QString & name, const QPixmap& pixmap,
00056 bool parse, bool dir, const QString& p, const QString& c, const QString& dE );
00057 bool isDirectory();
00058
00059 QString desktopEntryPath() const { return dEntry; }
00060 QString executable() const { return exec; }
00061
00062 protected:
00063 virtual void activate();
00064 virtual void setOpen( bool o );
00065
00066 friend class KDevApplicationTree;
00067 };
00068
00069
00070
00074 class KDevApplicationTree : public KListView
00075 {
00076 Q_OBJECT
00077 public:
00078 KDevApplicationTree( QWidget *parent, const char* name = 0 );
00079
00083 void addDesktopGroup( QString relPath, KDevAppTreeListItem *item = 0 );
00084
00085 bool isDirSel();
00086
00087 protected:
00088 void resizeEvent( QResizeEvent *_ev );
00089 KDevAppTreeListItem* currentitem;
00090
00091 public slots:
00092 void slotItemHighlighted(QListViewItem* i);
00093 void slotSelectionChanged(QListViewItem* i);
00094
00095 signals:
00096 void selected( const QString& _name, const QString& _exec );
00097 void highlighted( const QString& _name, const QString& _exec );
00098 };
00099
00100
00101
00102 #endif
This file is part of the documentation for KDevelop Version 3.1.2.