kio Library API Documentation

kopenwith_p.h

00001 // "$Id: kopenwith_p.h,v 1.3 2003/02/28 01:03:58 antlarr Exp $" 00002 /* This file is part of the KDE libraries 00003 Copyright (C) 2000 David Faure <faure@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 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 QString key(int column, bool ascending) const; 00049 00050 void init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &exec); 00051 00052 public: 00053 KAppTreeListItem( KListView* parent, const QString & name, const QPixmap& pixmap, 00054 bool parse, bool dir, const QString &p, const QString &c ); 00055 KAppTreeListItem( QListViewItem* parent, const QString & name, const QPixmap& pixmap, 00056 bool parse, bool dir, const QString &p, const QString &c ); 00057 bool isDirectory(); 00058 00059 protected: 00060 virtual void activate(); 00061 virtual void setOpen( bool o ); 00062 00063 friend class KApplicationTree; 00064 }; 00065 00066 /* ------------------------------------------------------------------------- */ 00067 00071 class KApplicationTree : public KListView 00072 { 00073 Q_OBJECT 00074 public: 00075 KApplicationTree( QWidget *parent ); 00076 00080 void addDesktopGroup( const QString &relPath, KAppTreeListItem *item = 0 ); 00081 00082 bool isDirSel(); 00083 00084 protected: 00085 void resizeEvent( QResizeEvent *_ev ); 00086 KAppTreeListItem* currentitem; 00087 00088 public slots: 00089 void slotItemHighlighted(QListViewItem* i); 00090 void slotSelectionChanged(QListViewItem* i); 00091 00092 signals: 00093 void selected( const QString& _name, const QString& _exec ); 00094 void highlighted( const QString& _name, const QString& _exec ); 00095 }; 00096 00097 /* ------------------------------------------------------------------------- */ 00098 00099 #endif
KDE Logo
This file is part of the documentation for kio Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:53 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003