KIO
kopenwithdialog.cpp
57writeEntry(KConfigGroup &group, const char *key, const KCompletion::CompletionMode &aValue, KConfigBase::WriteConfigFlags flags = KConfigBase::Normal)
426 disconnect(selectionModel(), &QItemSelectionModel::selectionChanged, this, &KApplicationView::slotSelectionChanged);
434 connect(selectionModel(), &QItemSelectionModel::selectionChanged, this, &KApplicationView::slotSelectionChanged);
472void KApplicationView::slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
575KOpenWithDialog::KOpenWithDialog(const QList<QUrl> &_urls, const QString &_text, const QString &_value, QWidget *parent)
580KOpenWithDialog::KOpenWithDialog(const QList<QUrl> &_urls, const QString &mimeType, const QString &_text, const QString &_value, QWidget *parent)
590 text = i18n("<qt>Select the program you want to use to open the file<br/>%1</qt>", fileName.toHtmlEscaped());
676 combo->setToolTip(i18n("Type to filter the applications below, or specify the name of a command.\nPress down arrow to navigate the results."));
742 remember = new QCheckBox(i18n("&Remember application association for all files of type\n\"%1\" (%2)", qMimeTypeComment, qMimeType));
744 remember = new QCheckBox(i18n("&Remember application association for all files of type\n\"%1\"", qMimeType));
763 QObject::connect(terminal, &QAbstractButton::toggled, q, &KOpenWithDialog::slotTerminalToggled);
769 int checkBoxIndentation = terminal->style()->pixelMetric(QStyle::PM_IndicatorWidth, &checkBoxOption, terminal);
770 checkBoxIndentation += terminal->style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing, &checkBoxOption, terminal);
774 QSpacerItem *spacer = new QSpacerItem(checkBoxIndentation, 0, QSizePolicy::Fixed, QSizePolicy::Minimum);
784 QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", QStringLiteral("konsole"));
795 if (!qMimeType.isNull() && KService::serviceByDesktopName(QStringLiteral("org.kde.discover"))) {
796 QPushButton *discoverButton = new QPushButton(QIcon::fromTheme(QStringLiteral("plasmadiscover")), i18n("Get more Apps from Discover"));
811 // The resize is what caused "can't click on items before clicking on Name header" in previous versions.
820 KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(QStringLiteral("plasma-discover"), {QStringLiteral("--mime"), qMimeType});
863 d->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!d->edit->text().isEmpty() || d->curService);
953 // FIXME: Disable arrow down in CompletionPopup and CompletionPopupAuto only when the dropdown list is shown.
954 // When popup completion mode is used the down arrow is used to navigate the dropdown list of results
955 if (combo->completionMode() != KCompletion::CompletionPopup && combo->completionMode() != KCompletion::CompletionPopupAuto) {
static Q_INVOKABLE bool authorize(const QString &action)
static void rebuildKSycoca(QWidget *parent)
Rebuild KSycoca and show a progress dialog while doing so.
Definition kbuildsycocaprogressdialog.cpp:28
void setTitle(const QString &title)
virtual void setLineEdit(QLineEdit *)
virtual void setCompletionMode(KCompletion::CompletionMode mode)
virtual void setCompletionObject(KCompletion *completionObject, bool handleSignals=true)
void setAutoDeleteCompletionObject(bool autoDelete)
KCompletion::CompletionMode completionMode() const
CompletionMode
CompletionNone
CompletionPopupAuto
CompletionPopup
Normal
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
void addToHistory(const QString &item)
void setHistoryItems(const QStringList &items)
QStringList historyItems() const
CommandLauncherJob runs a command and watches it while running.
Definition commandlauncherjob.h:45
void setDesktopName(const QString &desktopName)
Set the name of the desktop file (e.g. "org.kde.dolphin", without the ".desktop" filename extension).
Definition commandlauncherjob.cpp:70
static AcceptResult accept(KService::Ptr &service, const QString &typedExec, bool remember, const QString &mimeType, bool openInTerminal, bool lingerTerminal, bool saveNewApps)
Accept an openwith request with the provided arguments as context.
Definition openwith.cpp:66
virtual void setReadOnly(bool)
KOpenWithDialog(const QList< QUrl > &urls, QWidget *parent=nullptr)
Create a dialog that asks for a application to open a given URL(s) with.
Definition kopenwithdialog.cpp:551
void setSaveNewApplications(bool b)
Set whether a new .desktop file should be created if the user selects an application for which no cor...
Definition kopenwithdialog.cpp:915
void hideNoCloseOnExit()
Hide the "Do not &close when command exits" Checkbox.
Definition kopenwithdialog.cpp:985
static Ptr group(const QString &relPath)
static Ptr serviceByDesktopName(const QString &_name)
static Ptr serviceByDesktopPath(const QString &_path)
This class does completion of URLs including user directories (~user) and environment variables.
Definition kurlcompletion.h:41
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Definition kurlrequester.h:55
void urlSelected(const QUrl &)
Emitted when the user changed the URL via the file dialog.
void setText(const QString &text)
Sets the current text in the lineedit or combobox.
Definition kurlrequester.cpp:365
void textChanged(const QString &)
Emitted when the text in the lineedit changes.
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
KCALUTILS_EXPORT QString mimeType()
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition krecentdirs.cpp:33
KCOREADDONS_EXPORT QString quoteArg(const QString &arg)
QString label(StandardShortcut id)
KCOREADDONS_EXPORT QString csqueeze(const QString &str, int maxlen=40)
QCA_EXPORT void init()
void setChecked(bool)
void clicked(bool checked)
void toggled(bool checked)
virtual bool hasChildren(const QModelIndex &parent) const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
virtual void addItem(QLayoutItem *item) override
void addLayout(QLayout *layout, int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
bool setStretchFactor(QLayout *layout, int stretch)
AdjustToMinimumContentsLengthWithIcon
void setDuplicatesEnabled(bool enable)
void setMaxCount(int max)
void setSizeAdjustPolicy(SizeAdjustPolicy policy)
bool sendEvent(QObject *receiver, QEvent *event)
virtual void accept()
virtual bool eventFilter(QObject *o, QEvent *e) override
virtual QSize minimumSizeHint() const const override
void setModal(bool modal)
virtual void reject()
void accepted()
void rejected()
void setStandardButtons(StandardButtons buttons)
ShortcutOverride
QIcon fromTheme(const QString &name)
QModelIndexList indexes() const const
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void setWordWrap(bool on)
void setContentsMargins(const QMargins &margins)
void setClearButtonEnabled(bool enable)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
iterator begin()
qsizetype count() const const
iterator end()
T & first()
qsizetype indexOf(const AT &value, qsizetype from) const const
bool isEmpty() const const
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
QMimeType mimeTypeForUrl(const QUrl &url) const const
comment
isDefault
name
QVariant data(int role) const const
void * internalPointer() const const
bool isValid() const const
QModelIndex parent() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void installEventFilter(QObject *filterObj)
void setObjectName(QAnyStringView name)
QString escape(QStringView str)
availableGeometry
Fixed
void clear()
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
bool isNull() const const
QString toHtmlEscaped() const const
PM_IndicatorWidth
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
void initFrom(const QWidget *widget)
CaseInsensitive
OtherFocusReason
DisplayRole
Key_Down
Orientation
void keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override
virtual void setModel(QAbstractItemModel *model) override
QString toString() const const
virtual bool event(QEvent *event) override
void hide()
void setMinimumSize(const QSize &)
minimumWidth
QScreen * screen() const const
void setDisabled(bool disable)
void setFocus()
void resize(const QSize &)
QStyle * style() const const
void setToolTip(const QString &)
void setWhatsThis(const QString &)
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.