KIO

kopenwithdialog.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 David Faure <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef OPENWITHDIALOG_H
9 #define OPENWITHDIALOG_H
10 
11 #include "kiowidgets_export.h"
12 
13 #include <QDialog>
14 #include <QUrl>
15 #include <KService>
16 
17 class KOpenWithDialogPrivate;
18 
33 class KIOWIDGETS_EXPORT KOpenWithDialog : public QDialog
34 {
35  Q_OBJECT
36 public:
37 
46  explicit KOpenWithDialog(const QList<QUrl> &urls, QWidget *parent = nullptr);
47 
57  KOpenWithDialog(const QList<QUrl> &urls, const QString &text, const QString &value,
58  QWidget *parent = nullptr);
59 
68  KOpenWithDialog(const QString &mimeType, const QString &value,
69  QWidget *parent = nullptr);
70 
82  KOpenWithDialog(const QList<QUrl> &urls, const QString &mimeType,
83  const QString &text, const QString &value,
84  QWidget *parent = nullptr);
85 
92  KOpenWithDialog(QWidget *parent = nullptr);
93 
97  ~KOpenWithDialog();
98 
102  QString text() const;
106  void hideNoCloseOnExit();
110  void hideRunInTerminal();
115  KService::Ptr service() const;
125  void setSaveNewApplications(bool b);
126 
127 public Q_SLOTS: // TODO KDE5: move all those slots to the private class!
128  void slotSelected(const QString &_name, const QString &_exec);
129  void slotHighlighted(const QString &_name, const QString &_exec);
130  void slotTextChanged();
131  void slotTerminalToggled(bool);
132 
133 protected Q_SLOTS:
137  void accept() override;
138 
139 private:
140  bool eventFilter(QObject *object, QEvent *event) override;
141 
142  friend class KOpenWithDialogPrivate;
143  KOpenWithDialogPrivate *const d;
144 
146 
147  Q_PRIVATE_SLOT(d, void _k_slotDbClick())
148  Q_PRIVATE_SLOT(d, void _k_slotFileSelected())
149 };
150 
151 #endif
"Open With" dialog box.
virtual void accept()
Q_DISABLE_COPY(Class)
virtual bool eventFilter(QObject *o, QEvent *e) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:01:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.