kio Library API Documentation

kopenwith_p.h

00001 // "$Id: kopenwith_p.h,v 1.3.6.1 2004/08/14 22:24:18 binner 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     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
KDE Logo
This file is part of the documentation for kio Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Jan 15 13:33:26 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003