kopenwith.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
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 
00028 #include <kservice.h>
00029 
00030 class KApplicationTree;
00031 class KURLRequester;
00032 
00033 class QWidget;
00034 class QCheckBox;
00035 class QPushButton;
00036 class QLabel;
00037 
00038 class KOpenWithDlgPrivate;
00039 
00040 
00047 class KOpenWithDlg : public QDialog 
00048 {
00049     Q_OBJECT
00050 public:
00051 
00060     KOpenWithDlg( const KURL::List& urls, QWidget *parent = 0L );
00061 
00071     KOpenWithDlg( const KURL::List& urls, const QString& text, const QString& value,
00072                   QWidget *parent = 0L );
00073 
00082     KOpenWithDlg( const QString& serviceType, const QString& value, 
00083                   QWidget *parent = 0L );
00084 
00092     KOpenWithDlg( QWidget *parent = 0L );
00093 
00097     ~KOpenWithDlg();
00098 
00102     QString text() const;
00106     void hideNoCloseOnExit();
00110     void hideRunInTerminal();
00115     KService::Ptr service() const { return m_pService; }
00126     void setSaveNewApplications(bool b);
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 
00162     KURLRequester * edit;
00163     QString m_command;
00164 
00165     KApplicationTree* m_pTree;
00166     QLabel *label;
00167 
00168     QString qName, qServiceType;
00169     bool m_terminaldirty;
00170     QCheckBox   *terminal, *remember, *nocloseonexit;
00171     QPushButton *UNUSED;
00172     QPushButton *UNUSED2;
00173 
00174     KService::Ptr m_pService;
00175 
00176     KOpenWithDlgPrivate *d;
00177 };
00178 
00179 
00180 
00181 #ifndef KDE_NO_COMPAT
00182 
00193 class KFileOpenWithHandler : public KOpenWithHandler
00194 {
00195 public:
00196   KFileOpenWithHandler() : KOpenWithHandler() {}
00197   virtual ~KFileOpenWithHandler() {}
00198 
00203   virtual bool displayOpenWithDialog( const KURL::List& urls );
00204 };
00205 #endif
00206 
00207 
00208 
00209 
00210 #endif
 
This file is part of the documentation for kio Library Version 3.2.0.