KXmlGui
kedittoolbar.cpp
87 qDebug(240) << "XmlData" << this << "type" << s_XmlTypeToString[m_type] << "xmlFile:" << m_xmlFile;
166 ToolBarItem(QListWidget *parent, const QString &tag = QString(), const QString &name = QString(), const QString &statusText = QString())
299 mimedata->setData(QStringLiteral("application/x-kde-source-treewidget"), m_activeList ? "active" : "inactive");
304bool ToolBarListWidget::dropMimeData(int index, const QMimeData *mimeData, Qt::DropAction action)
312 const bool sourceIsActiveList = mimeData->data(QStringLiteral("application/x-kde-source-treewidget")) == "active";
342 m_cbHidden = new QCheckBox(i18nc("@option:check", "&Hide text when toolbar shows text alongside icons"), this);
395 KEditToolBarWidgetPrivate(KEditToolBarWidget *widget, const QString &cName, KActionCollection *collection)
430 void slotDropped(ToolBarListWidget *list, int index, ToolBarItem *item, bool sourceIsActiveList);
467 // qDebug(240) << "looking for name=" << item->internalName() << "and tag=" << item->internalTag();
470 if ((elem.attribute(QStringLiteral("name")) == item->internalName()) && (elem.tagName() == item->internalTag())) {
474 // qDebug(240) << "no item found in the DOM with name=" << item->internalName() << "and tag=" << item->internalTag();
598 m_buttonBox->setStandardButtons(QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel);
602 KGuiItem::assign(m_buttonBox->button(QDialogButtonBox::RestoreDefaults), KStandardGuiItem::defaults());
654 i18n("Do you really want to reset all toolbars of this application to their default? The changes will be applied immediately."),
691 const QString xml_file = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kxmlgui5/")
774 , d(new KEditToolBarWidgetPrivate(this, componentName(), KXMLGUIClient::actionCollection() /*create new one*/))
794void KEditToolBarWidgetPrivate::initOldStyle(const QString &resourceFile, bool global, const QString &defaultToolBar)
833void KEditToolBarWidgetPrivate::initFromFactory(KXMLGUIFactory *factory, const QString &defaultToolBar)
946 // qDebug(240) << "updating client " << client << " " << client->componentName() << " xmlFile=" << client->xmlFile();
979 QObject::connect(m_toolbarCombo, qOverload<int>(&QComboBox::activated), m_widget, [this](int index) {
1011 KListWidgetSearchLine *inactiveListSearchLine = new KListWidgetSearchLine(m_widget, m_inactiveList);
1036 KListWidgetSearchLine *activeListSearchLine = new KListWidgetSearchLine(m_widget, m_activeList);
1068 m_insertAction->setIcon(QIcon::fromTheme(QApplication::isRightToLeft() ? QStringLiteral("go-previous") : QStringLiteral("go-next")));
1075 m_removeAction->setIcon(QIcon::fromTheme(QApplication::isRightToLeft() ? QStringLiteral("go-next") : QStringLiteral("go-previous")));
1154 // This also makes the app-defined named for "mainToolBar" appear rather than the ui_standards-defined name.
1224 ToolBarItem *act = new ToolBarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), QString());
1231 ToolBarItem *act = new ToolBarItem(m_activeList, tagSpacer, spacer_name.arg(spacer_num++), QString());
1242 new ToolBarItem(m_activeList, tagMerge, name, i18n("This element will be replaced with all the elements of an embedded component."));
1256 i18n("This is a dynamic list of actions. You can move it, but if you remove it you will not be able to re-add it."));
1269 ToolBarItem *act = new ToolBarItem(m_activeList, it.tagName(), action->objectName(), action->toolTip());
1270 act->setText(nameFilter.subs(KLocalizedString::removeAcceleratorMarker(action->iconText())).toString());
1288 ToolBarItem *act = new ToolBarItem(m_inactiveList, tagAction, action->objectName(), action->toolTip());
1289 act->setText(nameFilter.subs(KLocalizedString::removeAcceleratorMarker(action->text())).toString());
1301 ToolBarItem *spacer = new ToolBarItem(nullptr, tagSpacer, spacer_name.arg(spacer_num++), QString());
1334 // qCDebug(DEBUG_KXMLGUI) << "found toolbar" << m_currentXmlData->toolBarText(*it) << "m_currentXmlData set to";
1357 QString statusText = static_cast<ToolBarItem *>(m_inactiveList->selectedItems().first())->statusText();
1358 m_helpArea->setText(i18nc("@label Action tooltip in toolbar editor, below the action list", "%1", statusText));
1383 m_helpArea->setText(i18nc("@label Action tooltip in toolbar editor, below the action list", "%1", statusText));
1393 QString internalName = static_cast<ToolBarItem *>(m_inactiveList->currentItem())->internalName();
1423void KEditToolBarWidgetPrivate::insertActive(ToolBarItem *item, ToolBarItem *before, bool prepend)
1627 QDomElement act_elem = KXMLGUIFactory::findActionByName(elem, item->internalName(), true /*create*/);
1670 QDomElement act_elem = KXMLGUIFactory::findActionByName(elem, item->internalName(), true /*create*/);
1676 act_elem.setAttribute(QStringLiteral("priority"), hidden ? QAction::LowPriority : QAction::NormalPriority);
1684void KEditToolBarWidgetPrivate::slotDropped(ToolBarListWidget *list, int index, ToolBarItem *item, bool sourceIsActiveList)
1686 // qCDebug(DEBUG_KXMLGUI) << "slotDropped list=" << (list==m_activeList?"activeList":"inactiveList")
1703 delete item; // not needed anymore. must be deleted before slotToolBarSelected clears the lists
QList< QAction * > actions() const
Returns the list of QActions which belong to this action collection.
Definition kactioncollection.cpp:265
void setResourceFile(const QString &file, bool global=true)
The name (absolute or relative) of your application's UI resource file is assumed to be share/apps/ap...
Definition kedittoolbar.cpp:618
void setDefaultToolBar(const QString &toolBarName)
Sets the default toolbar that will be selected when the dialog is shown.
Definition kedittoolbar.cpp:630
KEditToolBar(KActionCollection *collection, QWidget *parent=nullptr)
Old constructor for apps that do not use components.
Definition kedittoolbar.cpp:566
void newToolBarConfig()
Signal emitted when 'apply' or 'ok' is clicked or toolbars were reset.
static void setGlobalDefaultToolBar(const QString &toolBarName)
Sets the default toolbar which will be auto-selected for all KEditToolBar instances.
Definition kedittoolbar.cpp:760
static void assign(QPushButton *button, const KGuiItem &item)
static QString getIcon(KIconLoader::Group group=KIconLoader::Desktop, KIconLoader::Context context=KIconLoader::Application, bool strictIconSize=false, int iconSize=0, bool user=false, QWidget *parent=nullptr, const QString &title=QString())
Toolbar
Action
QString toString() const
static QString removeAcceleratorMarker(const QString &label)
KLocalizedString subs(const KLocalizedString &a, int fieldWidth=0, QChar fillChar=QLatin1Char(' ')) const
static void setToolBarsEditable(bool editable)
Enable or disable toolbar editing via drag & drop of actions.
Definition ktoolbar.cpp:1445
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
Definition kxmlguiclient.h:40
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition kxmlguifactory.h:56
static QString readConfigFile(const QString &filename, const QString &componentName=QString())
Definition kxmlguifactory.cpp:96
QList< KXMLGUIClient * > clients() const
Returns a list of all clients currently added to this factory.
Definition kxmlguifactory.cpp:440
static bool saveConfigFile(const QDomDocument &doc, const QString &filename, const QString &componentName=QString())
Definition kxmlguifactory.cpp:122
static QDomElement actionPropertiesElement(QDomDocument &doc)
Definition kxmlguifactory.cpp:700
static QDomElement findActionByName(QDomElement &elem, const QString &sName, bool create)
Definition kxmlguifactory.cpp:714
Q_SCRIPTABLE Q_NOREPLY void start()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text)
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
Type type(const QSqlDatabase &db)
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
QDebug operator<<(QDebug dbg, const DcrawInfoContainer &c)
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &title=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
Continue
QStringView merge(QStringView lhs, QStringView rhs)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QString name(StandardAction id)
KGuiItem cancel()
KGuiItem defaults()
KGuiItem apply()
KGuiItem ok()
QString label(StandardShortcut id)
void clicked(bool checked)
void setIcon(const QIcon &icon)
DragDrop
NormalPriority
void addLayout(QLayout *layout, int stretch)
void addStretch(int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
void insertWidget(int index, QWidget *widget, int stretch, Qt::Alignment alignment)
bool isEmpty() const const
void activated(int index)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void clear()
void setCurrentIndex(int index)
applicationName
QCoreApplication * instance()
Accepted
virtual void accept()
void setModal(bool modal)
virtual void reject()
virtual void showEvent(QShowEvent *event) override
virtual QSize sizeHint() const const override
void accepted()
QPushButton * button(StandardButton which) const const
void clicked(QAbstractButton *button)
void rejected()
StandardButton standardButton(QAbstractButton *button) const const
void setStandardButtons(StandardButtons buttons)
bool isRelativePath(const QString &path)
QDomElement documentElement() const const
ParseResult setContent(QAnyStringView text, ParseOptions options)
QString attribute(const QString &name, const QString &defValue) const const
void setAttribute(const QString &name, const QString &value)
QString tagName() const const
QDomNode appendChild(const QDomNode &newChild)
QDomNode cloneNode(bool deep) const const
QDomNode firstChild() const const
QDomNode insertAfter(const QDomNode &newChild, const QDomNode &refChild)
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
bool isNull() const const
QDomNode nextSibling() const const
QDomNode removeChild(const QDomNode &oldChild)
QDomNode replaceChild(const QDomNode &newChild, const QDomNode &oldChild)
QDomDocument toDocument() const const
QDomElement toElement() const const
QDomNode item(int index) const const
int length() const const
bool exists() const const
bool remove()
void addWidget(QWidget *widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment)
void setRowStretch(int row, int stretch)
virtual void setSpacing(int spacing) override
bool isRightToLeft()
QIcon fromTheme(const QString &name)
WriteOnly
void setBuddy(QWidget *buddy)
void setContentsMargins(const QMargins &margins)
void textChanged(const QString &text)
void append(QList< T > &&value)
qsizetype count() const const
const_reverse_iterator crbegin() const const
const_reverse_iterator crend() const const
T & first()
bool isEmpty() const const
count
QListWidgetItem * currentItem() const const
QListWidgetItem * item(int row) const const
void itemDoubleClicked(QListWidgetItem *item)
void itemSelectionChanged()
int row(const QListWidgetItem *item) const const
Qt::ItemFlags flags() const const
QListWidget * listWidget() const const
void setFlags(Qt::ItemFlags flags)
void setIcon(const QIcon &icon)
void setText(const QString &text)
QString text() const const
QByteArray data(const QString &mimeType) const const
void setData(const QString &mimeType, const QByteArray &data)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool contains(const QSet< T > &other) const const
iterator insert(const T &value)
GenericDataLocation
QString writableLocation(StandardLocation type)
bool isEmpty() const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString trimmed() const const
PM_SmallIconSize
DropAction
transparent
ItemIsDragEnabled
WidgetWithChildrenShortcut
AscendingOrder
QTestData & newRow(const char *dataTag)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void setEnabled(bool)
virtual void hideEvent(QHideEvent *event)
void setMinimumSize(const QSize &)
virtual void setVisible(bool visible)
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:56:26 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:56:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.