KParts
browseropenorsavequestion.cpp
67 iconLabel->setPixmap(icon.pixmap(style()->pixelMetric(QStyle::PM_MessageBoxIconSize, &option, this)));
97 dontAskAgainCheckBox->setText(i18nc("@label:checkbox", "Remember action for files of this type"));
118 connect(saveButton, &QPushButton::clicked, this, &BrowserOpenOrSaveQuestionPrivate::slotYesClicked);
119 connect(openDefaultButton, &QPushButton::clicked, this, &BrowserOpenOrSaveQuestionPrivate::slotOpenDefaultClicked);
120 connect(openWithButton, &QPushButton::clicked, this, &BrowserOpenOrSaveQuestionPrivate::slotOpenWithClicked);
121 connect(buttonBox, &QDialogButtonBox::rejected, this, &BrowserOpenOrSaveQuestionPrivate::reject);
149 KGuiItem openItem(i18nc("@label:button", "&Open with %1", selectedService->name()), selectedService->icon());
203 BrowserOpenOrSaveQuestion::BrowserOpenOrSaveQuestion(QWidget *parent, const QUrl &url, const QString &mimeType)
224 d->questionLabel->setText(i18nc("@info", "Open '%1'?", d->url.toDisplayString(QUrl::PreferLocalFile)));
228 KGuiItem openWithDialogItem(i18nc("@label:button", "&Open with..."), QStringLiteral("document-open"));
249 QObject::connect(menu, &QMenu::triggered, d.get(), &BrowserOpenOrSaveQuestionPrivate::slotAppSelected);
263 // qDebug() << "Not using new feature ServiceSelection; port the caller to BrowserOpenOrSaveQuestion::setFeature(ServiceSelection)";
271 return choice == BrowserOpenOrSaveQuestionPrivate::Save ? Save : (choice == BrowserOpenOrSaveQuestionPrivate::Cancel ? Cancel : Open);
295 if (flags != static_cast<int>(BrowserOpenOrSaveQuestion::AttachmentDisposition) && mime.isValid() && (
315 KGuiItem::assign(d->openDefaultButton, KGuiItem(i18nc("@label:button", "&Open"), QStringLiteral("document-open")));
318 d->questionLabel->setText(i18nc("@info", "Open '%1'?", d->url.toDisplayString(QUrl::PreferLocalFile)));
325 return choice == BrowserOpenOrSaveQuestionPrivate::Save ? Save : (choice == BrowserOpenOrSaveQuestionPrivate::Cancel ? Cancel : Embed);
341 d->fileNameLabel->setWhatsThis(i18nc("@info:whatsthis", "This is the file name suggested by the server"));
Q_OBJECTQ_OBJECT
T & first()
bool inherits(const QString &mimeTypeName) const const
AlignCenter
void setSuggestedFileName(const QString &suggestedFileName)
Sets the suggested filename, shown in the dialog.
Definition: browseropenorsavequestion.cpp:333
void setText(const QString &)
VehicleSection::Features features(QStringView coachNumber, QStringView coachClassification)
NoGlobals
virtual void reject()
QVariant fromValue(const T &value)
Q_SLOTSQ_SLOTS
int count(const T &value) const const
T value() const const
QString text() const
void clicked(bool checked)
QIcon fromTheme(const QString &name)
void setFeatures(Features features)
Enables the given features in the dialog.
Definition: browseropenorsavequestion.cpp:328
void initFrom(const QWidget *widget)
KCALUTILS_EXPORT QString mimeType()
void setTextInteractionFlags(Qt::TextInteractionFlags flags)
void addStretch(int stretch)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
static KService::List associatedApplications(const QStringList &mimeTypeList)
void setIcon(const QIcon &icon)
TextSelectableByMouse
static void assign(QPushButton *button, const KGuiItem &item)
QStyle * style() const const
ActionRole
Result askEmbedOrSave(int flags=0)
Ask the user whether to save or open a url in another application.
Definition: browseropenorsavequestion.cpp:308
PreferLocalFile
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
This class shows the dialog that asks the user whether to save a url or open a url in another applica...
Definition: browseropenorsavequestion.h:30
Result askOpenOrSave()
Ask the user whether to save or open a url in another application.
Definition: browseropenorsavequestion.cpp:222
@ ServiceSelection
Shows "Open With..." with the associated applications for the mimetype.
Definition: browseropenorsavequestion.h:56
bool isEmpty() const const
void setWindowTitle(const QString &)
void setText(const QString &text)
bool isEmpty() const const
virtual int exec()
bool isValid() const const
Accepted
virtual void done(int r)
int result() const const
PM_LayoutVerticalSpacing
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
QVariant data() const const
void setData(const QVariant &userData)
KService::Ptr selectedService() const
Definition: browseropenorsavequestion.cpp:274
QString toLower() const const
QString host(QUrl::ComponentFormattingOptions options) const const
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) const const
void rejected()
void setSpacing(int spacing)
void setObjectName(const QString &name)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void addLayout(QLayout *layout, int stretch)
void addSpacing(int size)
void setPixmap(const QPixmap &)
BrowserOpenOrSaveQuestion(QWidget *parent, const QUrl &url, const QString &mimeType)
Constructor, for all kinds of dialogs shown in this class.
Definition: browseropenorsavequestion.cpp:203
KGuiItem saveAs()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 03:49:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 03:49:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.