kio Library API Documentation

kopenwith.h

00001 // 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_h__ 00021 #define __open_with_h__ 00022 00023 #include <qdialog.h> 00024 00025 #include <kurl.h> 00026 #include <krun.h> 00027 #include <kservice.h> 00028 00029 class KApplicationTree; 00030 class KURLRequester; 00031 00032 class QWidget; 00033 class QCheckBox; 00034 class QPushButton; 00035 class QLabel; 00036 00037 class KOpenWithDlgPrivate; 00038 00039 /* ------------------------------------------------------------------------- */ 00046 class KIO_EXPORT KOpenWithDlg : public QDialog //#TODO: Use KDialogBase for KDE4 00047 { 00048 Q_OBJECT 00049 public: 00050 00059 KOpenWithDlg( const KURL::List& urls, QWidget *parent = 0L ); 00060 00070 KOpenWithDlg( const KURL::List& urls, const QString& text, const QString& value, 00071 QWidget *parent = 0L ); 00072 00081 KOpenWithDlg( const QString& serviceType, const QString& value, 00082 QWidget *parent = 0L ); 00083 00091 KOpenWithDlg( QWidget *parent = 0L ); 00092 00096 ~KOpenWithDlg(); 00097 00101 QString text() const; 00105 void hideNoCloseOnExit(); 00109 void hideRunInTerminal(); 00114 KService::Ptr service() const { return m_pService; } 00125 void setSaveNewApplications(bool b); 00126 void saveInMDKMenuStructure( const QString & filename, const QString &menuElement ); 00127 00128 public slots: 00132 void slotClear(); 00133 void slotSelected( const QString&_name, const QString& _exec ); 00134 void slotHighlighted( const QString& _name, const QString& _exec ); 00135 void slotTextChanged(); 00136 void slotTerminalToggled(bool); 00137 void slotDbClick(); 00138 void slotOK(); 00139 00140 protected slots: 00144 virtual void accept(); 00145 00146 protected: 00147 00151 void setServiceType( const KURL::List& _urls ); 00152 00160 void init( const QString& text, const QString& value ); 00161 QString pathToCopyEntry( QString path, QString menuId ); 00162 00163 KURLRequester * edit; 00164 QString m_command; 00165 00166 KApplicationTree* m_pTree; 00167 QLabel *label; 00168 00169 QString qName, qServiceType; 00170 bool m_terminaldirty; 00171 QCheckBox *terminal, *remember, *nocloseonexit; 00172 QPushButton *UNUSED; 00173 QPushButton *UNUSED2; 00174 00175 KService::Ptr m_pService; 00176 00177 KOpenWithDlgPrivate *d; 00178 }; 00179 00180 /* ------------------------------------------------------------------------- */ 00181 00182 #ifndef KDE_NO_COMPAT 00183 00194 class KIO_EXPORT KFileOpenWithHandler : public KOpenWithHandler 00195 { 00196 public: 00197 KFileOpenWithHandler() : KOpenWithHandler() {} 00198 virtual ~KFileOpenWithHandler() {} 00199 00204 virtual bool displayOpenWithDialog( const KURL::List& urls ); 00205 }; 00206 #endif 00207 00208 00209 /* ------------------------------------------------------------------------- */ 00210 00211 #endif
KDE Logo
This file is part of the documentation for kio Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Apr 12 23:09:17 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003