kopenwith.h
//
/* This file is part of the KDE libraries
Copyright (C) 2000 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __open_with_h__
#define __open_with_h__
#include <qdialog.h>
#include <kurl.h>
#include <krun.h>
#include <kservice.h>
class KApplicationTree;
class KURLRequester;
class QWidget;
class QCheckBox;
class QPushButton;
class QLabel;
class KOpenWithDlgPrivate;
/* ------------------------------------------------------------------------- */
class KIO_EXPORT KOpenWithDlg : public QDialog //#TODO: Use KDialogBase for KDE4
{
Q_OBJECT
public:
KOpenWithDlg( const KURL::List& urls, QWidget *parent = 0L );
KOpenWithDlg( const KURL::List& urls, const QString& text, const QString& value,
QWidget *parent = 0L );
KOpenWithDlg( const QString& serviceType, const QString& value,
QWidget *parent = 0L );
KOpenWithDlg( QWidget *parent = 0L );
~KOpenWithDlg();
QString text() const;
void hideNoCloseOnExit();
void hideRunInTerminal();
KService::Ptr service() const { return m_pService; }
void setSaveNewApplications(bool b);
public slots:
void slotClear();
void slotSelected( const QString&_name, const QString& _exec );
void slotHighlighted( const QString& _name, const QString& _exec );
void slotTextChanged();
void slotTerminalToggled(bool);
void slotDbClick();
void slotOK();
protected slots:
virtual void accept();
protected:
void setServiceType( const KURL::List& _urls );
void init( const QString& text, const QString& value );
KURLRequester * edit;
QString m_command;
KApplicationTree* m_pTree;
QLabel *label;
QString qName, qServiceType;
bool m_terminaldirty;
QCheckBox *terminal, *remember, *nocloseonexit;
QPushButton *UNUSED;
QPushButton *UNUSED2;
KService::Ptr m_pService;
KOpenWithDlgPrivate *d;
};
/* ------------------------------------------------------------------------- */
#ifndef KDE_NO_COMPAT
class KIO_EXPORT_DEPRECATED KFileOpenWithHandler : public KOpenWithHandler
{
public:
KFileOpenWithHandler() : KOpenWithHandler() {}
virtual ~KFileOpenWithHandler() {}
virtual bool displayOpenWithDialog( const KURL::List& urls );
};
#endif
/* ------------------------------------------------------------------------- */
#endif
KOpenWithDlg
"Open with" dialog box.
Definition: kopenwith.h:46
KFileOpenWithHandler
This class handles the displayOpenWithDialog call, made by KRun when it has no idea what to do with a...
Definition: kopenwith.h:192
KURLRequester
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Definition: kurlrequester.h:56
KOpenWithDlg::service
KService::Ptr service() const
Definition: kopenwith.h:114

KDE Home | KDE Accessibility Home | Description of Access Keys