KIO
kopenwithdialog.cpp
Go to the documentation of this file.
262 QVariant KApplicationModel::headerData(int section, Qt::Orientation orientation, int role) const
403 void KApplicationView::slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
646 int checkBoxIndentation = terminal->style()->pixelMetric( QStyle::PM_IndicatorWidth, &checkBoxOption, terminal );
647 checkBoxIndentation += terminal->style()->pixelMetric( QStyle::PM_CheckBoxLabelSpacing, &checkBoxOption, terminal );
651 QSpacerItem* spacer = new QSpacerItem( checkBoxIndentation, 0, QSizePolicy::Fixed, QSizePolicy::Minimum );
661 QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
671 remember = new QCheckBox(i18n("&Remember application association for this type of file"), mainWidget);
773 void KOpenWithDialogPrivate::addToMimeAppsList(const QString& serviceId /*menu id or storage id*/)
775 KSharedConfig::Ptr profile = KSharedConfig::openConfig("mimeapps.list", KConfig::NoGlobals, "xdgdata-apps");
784 KSharedConfig::Ptr fileTypesConfig = KSharedConfig::openConfig("filetypesrc", KConfig::NoGlobals);
816 KMessageBox::error(q, i18n("Could not extract executable name from '%1', please type a valid program name.", serviceName));
873 preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
931 kDebug(250) << "Creating new service" << serviceName << "(" << newPath << ")" << "menuId=" << menuId;
QString i18n(const char *text)
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
static void rebuildKSycoca(QWidget *parent)
Rebuild KSycoca and show a progress dialog while doing so.
Definition: kbuildsycocaprogressdialog.cpp:41
void sync()
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: kopenwithdialog.cpp:262
void setModal(bool modal)
void layoutChanged()
QModelIndex currentIndex() const
QItemSelectionModel * selectionModel() const
static Ptr serviceByDesktopName(const QString &_name)
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
QString entryPathFor(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:318
virtual bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:253
This class is a widget showing a lineedit and a button, which invokes a filedialog.
Definition: kurlrequester.h:60
KOpenWithDialog(const KUrl::List &urls, QWidget *parent=0)
Create a dialog that asks for a application to open a given URL(s) with.
Definition: kopenwithdialog.cpp:478
QString label(StandardShortcut id)
const QObjectList & children() const
QString simplified() const
const char * name(StandardAction id)
KConfigGroup group(const QByteArray &group)
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
QString & remove(int position, int n)
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: kopenwithdialog.cpp:216
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:210
KSharedConfigPtr config()
void addToHistory(const QString &item)
void initFrom(const QWidget *widget)
QStringList historyItems
virtual void setLineEdit(QLineEdit *)
void layoutAboutToBeChanged()
bool isValid() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QString number(int n, int base)
int count(const T &value) const
static QString simplifiedExecLineFromService(const QString &fullExec)
Definition: kopenwithdialog.cpp:761
static QString newServicePath(bool showInMenu, const QString &suggestedName, QString *menuId=0, const QStringList *reservedMenuIds=0)
QString fileName() const
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:309
virtual void addItem(QLayoutItem *item)
void setObjectName(const QString &name)
bool isEmpty() const
virtual void setCompletionMode(KGlobalSettings::Completion mode)
int removeAll(const T &value)
Definition: kopenwithdialog_p.h:66
QString execFor(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:327
void writeXdgListEntry(const QString &pKey, const QStringList &value, WriteConfigFlags pFlags=Normal)
void * internalPointer() const
QString csqueeze(const QString &str, int maxlen=40)
T & first()
void slotSelected(const QString &_name, const QString &_exec)
Definition: kopenwithdialog.cpp:698
QModelIndex parent() const
void setDuplicatesEnabled(bool enable)
void setMargin(int margin)
static Ptr serviceByDesktopPath(const QString &_path)
virtual void accept()
virtual bool canFetchMore(const QModelIndex &parent) const
Definition: kopenwithdialog.cpp:201
QModelIndex createIndex(int row, int column, void *ptr) const
void writeEntry(KConfigGroup &group, const char *key, const KGlobalSettings::Completion &aValue, KConfigBase::WriteConfigFlags flags=KConfigBase::Normal)
Definition: kopenwithdialog.cpp:57
iterator end()
QString quoteArg(const QString &arg)
bool contains(QChar ch, Qt::CaseSensitivity cs) const
bool isDirectory(const QModelIndex &index) const
Definition: kopenwithdialog.cpp:336
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: kopenwithdialog.cpp:276
KGuiItem ok()
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:756
void slotTerminalToggled(bool)
Definition: kopenwithdialog.cpp:732
QString mid(int position, int n) const
Definition: kurlcompletion.h:53
void highlighted(const QString &_name, const QString &_exec)
KApplicationView(QWidget *parent=0)
Definition: kopenwithdialog.cpp:356
void selected(const QString &_name, const QString &_exec)
void hideNoCloseOnExit()
Hide the "Do not &close when command exits" Checkbox.
Definition: kopenwithdialog.cpp:970
virtual void setModel(QAbstractItemModel *model)
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
static QString findExe(const QString &appname, const QString &pathstr=QString(), SearchOptions options=NoSearchOptions)
typedef ConstIterator
void setCaption(const QString &c)
Completion
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
Definition: kopenwithdialog.cpp:391
bool authorize(const QString &genericAction)
QString fromLatin1(const char *str, int size)
void setClearButtonShown(bool show)
void prepend(const T &value)
void slotHighlighted(const QString &_name, const QString &_exec)
Definition: kopenwithdialog.cpp:708
void sync()
KApplicationModel(QObject *parent=0)
Definition: kopenwithdialog.cpp:190
void setMaxCount(int max)
static Completion completionMode()
QAbstractItemModel * model() const
static Ptr group(const QString &relPath)
virtual ~KApplicationModel()
Definition: kopenwithdialog.cpp:196
void setSizeAdjustPolicy(SizeAdjustPolicy policy)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
Definition: kopenwithdialog_p.h:32
static QString binaryName(const QString &execLine, bool removePath)
Given a full command line (e.g.
Definition: krun.cpp:568
iterator begin()
void setHistoryItems(const QStringList &items)
bool setStretchFactor(QWidget *widget, int stretch)
KGlobalSettings::Completion completionMode() const
This class does completion of URLs including user directories (~user) and environment variables...
Definition: kurlcompletion.h:41
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
void addLayout(QLayout *layout, int stretch)
static Ptr serviceByStorageId(const QString &_storageId)
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
virtual void fetchMore(const QModelIndex &parent)
Definition: kopenwithdialog.cpp:238
virtual void setModel(QAbstractItemModel *model)
Definition: kopenwithdialog.cpp:366
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.