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