Krita Source Code Documentation
Loading...
Searching...
No Matches
KDEPrivate::KisKEditToolBarWidgetPrivate Class Reference

Public Member Functions

void dump () const
 
QDomElement findElementForToolBarItem (const ToolBarItem *item) const
 
void initFromFactory (KisKXMLGUIFactory *factory, const QString &defaultToolbar)
 
void initOldStyle (const QString &file, bool global, const QString &defaultToolbar)
 
void insertActive (ToolBarItem *item, ToolBarItem *before, bool prepend=false)
 
 KisKEditToolBarWidgetPrivate (KisKEditToolBarWidget *widget, const QString &cName, KisKActionCollection *collection)
 
void loadActions (const QDomElement &elem)
 
void loadToolBarCombo (const QString &defaultToolbar)
 
QString loadXMLFile (const QString &_xml_file)
 
void moveActive (ToolBarItem *item, ToolBarItem *before)
 
void removeActive (ToolBarItem *item)
 
void selectActiveItem (const QString &)
 
void setupLayout ()
 
void slotActiveSelectionChanged ()
 
void slotChangeIconButton ()
 
void slotDownButton ()
 
void slotDropped (ToolBarListWidget *list, int index, ToolBarItem *item, bool sourceIsActiveList)
 
void slotInactiveSelectionChanged ()
 
void slotInsertButton ()
 
void slotRemoveButton ()
 
void slotToolBarSelected (int index)
 
void slotUpButton ()
 
void updateLocal (QDomElement &elem)
 
QString xmlFile (const QString &xml_file) const
 
 ~KisKEditToolBarWidgetPrivate ()
 

Public Attributes

ToolBarListWidgetm_activeList {nullptr}
 
ToolBarList m_barList
 
QToolButton * m_changeIconAction {nullptr}
 
KisKActionCollectionm_collection {nullptr}
 
QLabel * m_comboLabel {nullptr}
 
KSeparator * m_comboSeparator {nullptr}
 
QString m_componentName
 
QDomElement m_currentToolBarElem
 
XmlDatam_currentXmlData {nullptr}
 
QToolButton * m_downAction {nullptr}
 
QPixmap m_emptyIcon
 
KisKXMLGUIFactorym_factory {nullptr}
 
QString m_globalFile
 
QLabel * m_helpArea {nullptr}
 
ToolBarListWidgetm_inactiveList {nullptr}
 
QToolButton * m_insertAction {nullptr}
 
bool m_loadedOnce {false}
 
QDomDocument m_localDoc
 
QString m_rcFile
 
QToolButton * m_removeAction {nullptr}
 
QComboBox * m_toolbarCombo {nullptr}
 
QToolButton * m_upAction {nullptr}
 
KisKEditToolBarWidgetm_widget {nullptr}
 
QString m_xmlFile
 
QList< XmlDatam_xmlFiles
 

Detailed Description

Definition at line 417 of file kedittoolbar.cpp.

Constructor & Destructor Documentation

◆ KisKEditToolBarWidgetPrivate()

KDEPrivate::KisKEditToolBarWidgetPrivate::KisKEditToolBarWidgetPrivate ( KisKEditToolBarWidget * widget,
const QString & cName,
KisKActionCollection * collection )
inline
Parameters
collectionIn the old-style constructor, this is the collection passed to the KisKEditToolBar constructor. In the xmlguifactory-based constructor, we let KisKXMLGUIClient create a dummy one, but it probably isn't used.

Definition at line 427 of file kedittoolbar.cpp.

429 : m_collection(collection),
430 m_widget(widget),
431 m_factory(0),
432 m_loadedOnce(false)
433 {
434 m_componentName = cName;
435 m_helpArea = 0L;
436 // We want items with an icon to align with items without icon
437 // So we use an empty QPixmap for that
438 const int iconSize = widget->style()->pixelMetric(QStyle::PM_SmallIconSize);
439 m_emptyIcon = QPixmap(iconSize, iconSize);
440 m_emptyIcon.fill(Qt::transparent);
441 }
int iconSize(qreal width, qreal height)

References iconSize(), m_componentName, m_emptyIcon, and m_helpArea.

◆ ~KisKEditToolBarWidgetPrivate()

KDEPrivate::KisKEditToolBarWidgetPrivate::~KisKEditToolBarWidgetPrivate ( )
inline

Definition at line 442 of file kedittoolbar.cpp.

443 {
444 }

Member Function Documentation

◆ dump()

void KDEPrivate::KisKEditToolBarWidgetPrivate::dump ( ) const
inline

Definition at line 516 of file kedittoolbar.cpp.

517 {
519 for (; xit != m_xmlFiles.end(); ++xit) {
520 (*xit).dump();
521 }
522 }

References m_xmlFiles.

◆ findElementForToolBarItem()

QDomElement KDEPrivate::KisKEditToolBarWidgetPrivate::findElementForToolBarItem ( const ToolBarItem * item) const
inline

Look for a given item in the current toolbar

Definition at line 496 of file kedittoolbar.cpp.

497 {
498 //qDebug(240) << "looking for name=" << item->internalName() << "and tag=" << item->internalTag();
499 for (QDomNode n = m_currentToolBarElem.firstChild(); !n.isNull(); n = n.nextSibling()) {
500 QDomElement elem = n.toElement();
501 if ((elem.attribute(QStringLiteral("name")) == item->internalName()) &&
502 (elem.tagName() == item->internalTag())) {
503 return elem;
504 }
505 }
506 //qDebug(240) << "no item found in the DOM with name=" << item->internalName() << "and tag=" << item->internalTag();
507 return QDomElement();
508 }
QString internalName() const
QString internalTag() const

References KDEPrivate::ToolBarItem::internalName(), KDEPrivate::ToolBarItem::internalTag(), and m_currentToolBarElem.

◆ initFromFactory()

void KisKEditToolBarWidgetPrivate::initFromFactory ( KisKXMLGUIFactory * factory,
const QString & defaultToolbar )

Definition at line 856 of file kedittoolbar.cpp.

858{
859 qDebug() << "initFromFactory";
860 //TODO: make sure we can call this multiple times?
861 if (m_loadedOnce) {
862 return;
863 }
864
865 m_loadedOnce = true;
866
867 m_factory = factory;
868
869 // add all of the client data
870 bool first = true;
871 foreach (KisKXMLGUIClient *client, factory->clients()) {
872 if (client->xmlFile().isEmpty()) {
873 continue;
874 }
875
877 if (first) {
878 type = XmlData::Shell;
879 first = false;
880 Q_ASSERT(!client->localXMLFile().isEmpty()); // where would we save changes??
881 }
882
883 XmlData data(type, client->localXMLFile(), client->actionCollection());
884 QDomDocument domDoc = client->domDocument();
885 data.setDomDocument(domDoc);
886 m_xmlFiles.append(data);
887
888 //d->m_actionList += client->actionCollection()->actions();
889 }
890
891#ifndef NDEBUG
892 //d->dump();
893#endif
894
895 // now load in our toolbar combo box
896 loadToolBarCombo(defaultToolBar);
897 m_widget->adjustSize();
898 m_widget->setMinimumSize(m_widget->sizeHint());
899
901 foreach (QAction *action, m_widget->actionCollection()->actions()) {
902 action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
903 }
904}
void loadToolBarCombo(const QString &defaultToolbar)
KisKActionCollection * actionCollection() const override
QList< QAction * > actions() const
void addAssociatedWidget(QWidget *widget)
virtual QString xmlFile() const
virtual QDomDocument domDocument() const
virtual QString localXMLFile() const
virtual KisKActionCollection * actionCollection() const
QList< KisKXMLGUIClient * > clients() const

References KisKXMLGUIClient::actionCollection(), KDEPrivate::KisKEditToolBarWidget::actionCollection(), KisKActionCollection::actions(), KisKActionCollection::addAssociatedWidget(), KisKXMLGUIFactory::clients(), KisKXMLGUIClient::domDocument(), loadToolBarCombo(), KisKXMLGUIClient::localXMLFile(), m_factory, m_loadedOnce, m_widget, m_xmlFiles, KDEPrivate::XmlData::Part, KDEPrivate::XmlData::setDomDocument(), KDEPrivate::XmlData::Shell, and KisKXMLGUIClient::xmlFile().

◆ initOldStyle()

void KisKEditToolBarWidgetPrivate::initOldStyle ( const QString & file,
bool global,
const QString & defaultToolbar )

Definition at line 814 of file kedittoolbar.cpp.

817{
818 qDebug() << "initOldStyle";
819 //TODO: make sure we can call this multiple times?
820 if (m_loadedOnce) {
821 return;
822 }
823
824 m_loadedOnce = true;
825 //d->m_actionList = collection->actions();
826
827 // handle the merging
828 if (global) {
829 m_widget->loadStandardsXmlFile(); // ui_standards.xmlgui
830 }
831 const QString localXML = loadXMLFile(resourceFile);
832 m_widget->setXML(localXML, global ? true /*merge*/ : false);
833
834 // first, get all of the necessary info for our local xml
835 XmlData local(XmlData::Local, xmlFile(resourceFile), m_collection);
836 QDomDocument domDoc;
837 domDoc.setContent(localXML);
838 local.setDomDocument(domDoc);
839 m_xmlFiles.append(local);
840
841 // then, the merged one (ui_standards + local xml)
842 XmlData merge(XmlData::Merged, QString(), m_collection);
843 merge.setDomDocument(m_widget->domDocument());
844 m_xmlFiles.append(merge);
845
846#ifndef NDEBUG
847 dump();
848#endif
849
850 // now load in our toolbar combo box
851 loadToolBarCombo(defaultToolBar);
852 m_widget->adjustSize();
853 m_widget->setMinimumSize(m_widget->sizeHint());
854}
QString xmlFile(const QString &xml_file) const
QString loadXMLFile(const QString &_xml_file)
void setXML(const QString &document, bool merge=false)

References KisKXMLGUIClient::domDocument(), dump(), KisKXMLGUIClient::loadStandardsXmlFile(), loadToolBarCombo(), loadXMLFile(), KDEPrivate::XmlData::Local, m_collection, m_loadedOnce, m_widget, m_xmlFiles, KDEPrivate::XmlData::Merged, KDEPrivate::XmlData::setDomDocument(), KisKXMLGUIClient::setXML(), and xmlFile().

◆ insertActive()

void KisKEditToolBarWidgetPrivate::insertActive ( ToolBarItem * item,
ToolBarItem * before,
bool prepend = false )

Definition at line 1411 of file kedittoolbar.cpp.

1412{
1413 if (!item) {
1414 return;
1415 }
1416
1417 QDomElement new_item;
1418 // let's handle the separator specially
1419 if (item->isSeparator()) {
1420 new_item = m_widget->domDocument().createElement(QStringLiteral("Separator"));
1421 } else {
1422 new_item = m_widget->domDocument().createElement(QStringLiteral("Action"));
1423 }
1424
1425 new_item.setAttribute(QStringLiteral("name"), item->internalName());
1426
1427 Q_ASSERT(!m_currentToolBarElem.isNull());
1428
1429 if (before) {
1430 // we have the item in the active list which is before the new
1431 // item.. so let's try our best to add our new item right after it
1432 QDomElement elem = findElementForToolBarItem(before);
1433 Q_ASSERT(!elem.isNull());
1434 m_currentToolBarElem.insertAfter(new_item, elem);
1435 } else {
1436 // simply put it at the beginning or the end of the list.
1437 if (prepend) {
1438 m_currentToolBarElem.insertBefore(new_item, m_currentToolBarElem.firstChild());
1439 } else {
1440 m_currentToolBarElem.appendChild(new_item);
1441 }
1442 }
1443
1444 // and set this container as a noMerge
1445 m_currentToolBarElem.setAttribute(QStringLiteral("noMerge"), QLatin1String("1"));
1446
1447 // update the local doc
1449}
QDomElement findElementForToolBarItem(const ToolBarItem *item) const

References KisKXMLGUIClient::domDocument(), findElementForToolBarItem(), KDEPrivate::ToolBarItem::internalName(), KDEPrivate::ToolBarItem::isSeparator(), m_currentToolBarElem, m_widget, and updateLocal().

◆ loadActions()

void KisKEditToolBarWidgetPrivate::loadActions ( const QDomElement & elem)

Definition at line 1193 of file kedittoolbar.cpp.

1194{
1195 const QLatin1String tagSeparator("Separator");
1196 const QLatin1String tagMerge("Merge");
1197 const QLatin1String tagActionList("ActionList");
1198 const QLatin1String tagAction("Action");
1199 const QLatin1String attrName("name");
1200
1201 int sep_num = 0;
1202 QString sep_name(QStringLiteral("separator_%1"));
1203
1204 // clear our lists
1205 m_inactiveList->clear();
1206 m_activeList->clear();
1207 m_insertAction->setEnabled(false);
1208 m_removeAction->setEnabled(false);
1209 m_upAction->setEnabled(false);
1210 m_downAction->setEnabled(false);
1211
1212 // We'll use this action collection
1214
1215 // store the names of our active actions
1216 QSet<QString> active_list;
1217
1218 // Filtering message requested by translators (scripting).
1219 KLocalizedString nameFilter = ki18nc("@item:intable Action name in toolbar editor", "%1");
1220
1221 // see if our current action is in this toolbar
1222 QDomNode n = elem.firstChild();
1223 for (; !n.isNull(); n = n.nextSibling()) {
1224 QDomElement it = n.toElement();
1225 if (it.isNull()) {
1226 continue;
1227 }
1228 if (it.tagName() == tagSeparator) {
1229 ToolBarItem *act = new ToolBarItem(m_activeList, tagSeparator, sep_name.arg(sep_num++), QString());
1230 act->setSeparator(true);
1231 act->setText(SEPARATORSTRING);
1232 it.setAttribute(attrName, act->internalName());
1233 continue;
1234 }
1235
1236 if (it.tagName() == tagMerge) {
1237 // Merge can be named or not - use the name if there is one
1238 QString name = it.attribute(attrName);
1239 ToolBarItem *act = new ToolBarItem(m_activeList, tagMerge, name, i18n("This element will be replaced with all the elements of an embedded component."));
1240 if (name.isEmpty()) {
1241 act->setText(i18n("<Merge>"));
1242 } else {
1243 act->setText(i18n("<Merge %1>", name));
1244 }
1245 continue;
1246 }
1247
1248 if (it.tagName() == tagActionList) {
1249 ToolBarItem *act = new ToolBarItem(m_activeList, tagActionList, it.attribute(attrName), 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."));
1250 act->setText(i18n("ActionList: %1", it.attribute(attrName)));
1251 continue;
1252 }
1253
1254 // iterate through this client's actions
1255 // This used to iterate through _all_ actions, but we don't support
1256 // putting any action into any client...
1257 foreach (QAction *action, actionCollection->actions()) {
1258 // do we have a match?
1259 if (it.attribute(attrName) == action->objectName()) {
1260 // we have a match!
1261 ToolBarItem *act = new ToolBarItem(m_activeList, it.tagName(), action->objectName(), action->toolTip());
1262 act->setText(nameFilter.subs(KLocalizedString::removeAcceleratorMarker(action->iconText())).toString());
1263 act->setIcon(!action->icon().isNull() ? action->icon() : m_emptyIcon);
1264 act->setTextAlongsideIconHidden(action->priority() < QAction::NormalPriority);
1265
1266 active_list.insert(action->objectName());
1267 break;
1268 }
1269 }
1270 }
1271
1272 // go through the rest of the collection
1273 foreach (QAction *action, actionCollection->actions()) {
1274 // skip our active ones
1275 if (active_list.contains(action->objectName())) {
1276 continue;
1277 }
1278
1279 ToolBarItem *act = new ToolBarItem(m_inactiveList, tagAction, action->objectName(), action->toolTip());
1280 act->setText(nameFilter.subs(KLocalizedString::removeAcceleratorMarker(action->text())).toString());
1281 act->setIcon(!action->icon().isNull() ? action->icon() : m_emptyIcon);
1282 }
1283
1284 m_inactiveList->sortItems(Qt::AscendingOrder);
1285
1286 // finally, add default separators to the inactive list
1287 ToolBarItem *act = new ToolBarItem(0L, tagSeparator, sep_name.arg(sep_num++), QString());
1288 act->setSeparator(true);
1289 act->setText(SEPARATORSTRING);
1290 m_inactiveList->insertItem(0, act);
1291}
void setTextAlongsideIconHidden(bool hidden)
void setSeparator(bool sep)
KisKActionCollection * actionCollection() const
A container for a set of QAction objects.
#define SEPARATORSTRING
const char * name(StandardAction id)

References KDEPrivate::XmlData::actionCollection(), KisKActionCollection::actions(), KDEPrivate::ToolBarItem::internalName(), m_activeList, m_currentXmlData, m_downAction, m_emptyIcon, m_inactiveList, m_insertAction, m_removeAction, m_upAction, SEPARATORSTRING, KDEPrivate::ToolBarItem::setSeparator(), and KDEPrivate::ToolBarItem::setTextAlongsideIconHidden().

◆ loadToolBarCombo()

void KisKEditToolBarWidgetPrivate::loadToolBarCombo ( const QString & defaultToolbar)

Definition at line 1151 of file kedittoolbar.cpp.

1152{
1153 const QLatin1String attrName("name");
1154 // just in case, we clear our combo
1155 m_toolbarCombo->clear();
1156
1157 int defaultToolBarId = -1;
1158 int count = 0;
1159 // load in all of the toolbar names into this combo box
1160 QList<XmlData>::const_iterator xit = m_xmlFiles.constBegin();
1161 for (; xit != m_xmlFiles.constEnd(); ++xit) {
1162 // skip the merged one in favor of the local one,
1163 // so that we can change icons
1164 // This also makes the app-defined named for "mainToolBar" appear rather than the ui_standards-defined name.
1165 if ((*xit).type() == XmlData::Merged) {
1166 continue;
1167 }
1168
1169 // each xml file may have any number of toolbars
1170 ToolBarList::const_iterator it = (*xit).barList().begin();
1171 for (; it != (*xit).barList().constEnd(); ++it) {
1172 const QString text = (*xit).toolBarText(*it);
1173 m_toolbarCombo->addItem(text);
1174 const QString name = (*it).attribute(attrName);
1175 if (defaultToolBarId == -1 && name == defaultToolBar) {
1176 defaultToolBarId = count;
1177 }
1178 count++;
1179 }
1180 }
1181 const bool showCombo = (count > 1);
1182 m_comboLabel->setVisible(showCombo);
1183 m_comboSeparator->setVisible(showCombo);
1184 m_toolbarCombo->setVisible(showCombo);
1185 if (defaultToolBarId == -1) {
1186 defaultToolBarId = 0;
1187 }
1188 // we want to the specified item selected and its actions loaded
1189 m_toolbarCombo->setCurrentIndex(defaultToolBarId);
1190 slotToolBarSelected(m_toolbarCombo->currentIndex());
1191}

References m_comboLabel, m_comboSeparator, m_toolbarCombo, m_xmlFiles, KDEPrivate::XmlData::Merged, and slotToolBarSelected().

◆ loadXMLFile()

QString KDEPrivate::KisKEditToolBarWidgetPrivate::loadXMLFile ( const QString & _xml_file)
inline

Load in the specified XML file and dump the raw xml

Definition at line 478 of file kedittoolbar.cpp.

479 {
480 QString raw_xml;
481 QString xml_file = xmlFile(_xml_file);
482 //qDebug() << "loadXMLFile xml_file=" << xml_file;
483
484 if (!QDir::isRelativePath(xml_file)) {
485 raw_xml = KisKXMLGUIFactory::readConfigFile(xml_file);
486 } else {
488 }
489
490 return raw_xml;
491 }
static QString readConfigFile(const QString &filename, const QString &componentName=QString())

References m_componentName, KisKXMLGUIFactory::readConfigFile(), and xmlFile().

◆ moveActive()

void KisKEditToolBarWidgetPrivate::moveActive ( ToolBarItem * item,
ToolBarItem * before )

Definition at line 1489 of file kedittoolbar.cpp.

1490{
1491 QDomElement e = findElementForToolBarItem(item);
1492
1493 if (e.isNull()) {
1494 return;
1495 }
1496
1497 // remove item
1498 m_activeList->takeItem(m_activeList->row(item));
1499
1500 // put it where it's supposed to go
1501 m_activeList->insertItem(m_activeList->row(before) + 1, item);
1502
1503 // make it selected again
1504 m_activeList->setCurrentItem(item);
1505
1506 // and do the real move in the DOM
1507 if (!before) {
1508 m_currentToolBarElem.insertBefore(e, m_currentToolBarElem.firstChild());
1509 } else {
1511 }
1512
1513 // and set this container as a noMerge
1514 m_currentToolBarElem.setAttribute(QStringLiteral("noMerge"), QLatin1String("1"));
1515
1516 // update the local doc
1518}

References findElementForToolBarItem(), m_activeList, m_currentToolBarElem, and updateLocal().

◆ removeActive()

void KisKEditToolBarWidgetPrivate::removeActive ( ToolBarItem * item)

Definition at line 1451 of file kedittoolbar.cpp.

1452{
1453 if (!item) {
1454 return;
1455 }
1456
1457 // we're modified, so let this change
1458 Q_EMIT m_widget->enableOk(true);
1459
1460 // now iterate through to find the child to nuke
1461 QDomElement elem = findElementForToolBarItem(item);
1462 if (!elem.isNull()) {
1463 // nuke myself!
1464 m_currentToolBarElem.removeChild(elem);
1465
1466 // and set this container as a noMerge
1467 m_currentToolBarElem.setAttribute(QStringLiteral("noMerge"), QLatin1String("1"));
1468
1469 // update the local doc
1471 }
1472}

References KDEPrivate::KisKEditToolBarWidget::enableOk(), findElementForToolBarItem(), m_currentToolBarElem, m_widget, and updateLocal().

◆ selectActiveItem()

void KisKEditToolBarWidgetPrivate::selectActiveItem ( const QString & internalName)

Definition at line 1392 of file kedittoolbar.cpp.

1393{
1394 int activeItemCount = m_activeList->count();
1395 for (int i = 0; i < activeItemCount; i++) {
1396 ToolBarItem *item = static_cast<ToolBarItem *>(m_activeList->item(i));
1397 if (item->internalName() == internalName) {
1398 m_activeList->setCurrentItem(item);
1399 break;
1400 }
1401 }
1402}

References KDEPrivate::ToolBarItem::internalName(), and m_activeList.

◆ setupLayout()

void KisKEditToolBarWidgetPrivate::setupLayout ( )

Definition at line 999 of file kedittoolbar.cpp.

1000{
1001 // the toolbar name combo
1002 m_comboLabel = new QLabel(i18n("&Toolbar:"), m_widget);
1003 m_toolbarCombo = new QComboBox(m_widget);
1004 m_comboLabel->setBuddy(m_toolbarCombo);
1005 m_comboSeparator = new KSeparator(m_widget);
1006 QObject::connect(m_toolbarCombo, SIGNAL(activated(int)),
1007 m_widget, SLOT(slotToolBarSelected(int)));
1008
1009// QPushButton *new_toolbar = new QPushButton(i18n("&New"), this);
1010// new_toolbar->setPixmap(BarIcon("document-new", KisIconUtils::SizeSmall));
1011// new_toolbar->setEnabled(false); // disabled until implemented
1012// QPushButton *del_toolbar = new QPushButton(i18n("&Delete"), this);
1013// del_toolbar->setPixmap(BarIcon("edit-delete", KisIconUtils::SizeSmall));
1014// del_toolbar->setEnabled(false); // disabled until implemented
1015
1016 // our list of inactive actions
1017 QLabel *inactive_label = new QLabel(i18n("A&vailable actions:"), m_widget);
1019 m_inactiveList->setDragEnabled(true);
1021 m_inactiveList->setMinimumSize(180, 250);
1022 m_inactiveList->setDropIndicatorShown(false); // #165663
1023 inactive_label->setBuddy(m_inactiveList);
1024 QObject::connect(m_inactiveList, SIGNAL(itemSelectionChanged()),
1026 QObject::connect(m_inactiveList, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
1027 m_widget, SLOT(slotInsertButton()));
1028 QObject::connect(m_inactiveList, SIGNAL(dropped(ToolBarListWidget*,int,ToolBarItem*,bool)),
1030
1031 {
1033 if (scroller) {
1034 QObject::connect(scroller, &QScroller::stateChanged, m_widget, [&](QScroller::State state) {
1036 });
1037 }
1038 }
1039
1040 KListWidgetSearchLine *inactiveListSearchLine = new KListWidgetSearchLine(m_widget, m_inactiveList);
1041 inactiveListSearchLine->setPlaceholderText(i18nc("Filter as in showing only matching items", "Filter"));
1042
1043 // our list of active actions
1044 QLabel *active_label = new QLabel(i18n("Curr&ent actions:"), m_widget);
1046 m_activeList->setDragEnabled(true);
1048 // With Qt-4.1 only setting MiniumWidth results in a 0-width icon column ...
1049 m_activeList->setMinimumSize(m_inactiveList->minimumWidth(), 100);
1050 active_label->setBuddy(m_activeList);
1051
1052 QObject::connect(m_activeList, SIGNAL(itemSelectionChanged()),
1054 QObject::connect(m_activeList, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
1055 m_widget, SLOT(slotRemoveButton()));
1056 QObject::connect(m_activeList, SIGNAL(dropped(ToolBarListWidget*,int,ToolBarItem*,bool)),
1058 {
1060 if (scroller) {
1061 QObject::connect(scroller, &QScroller::stateChanged, m_widget, [&](QScroller::State state) {
1063 });
1064 }
1065 }
1066
1067 // Edit Icon Button under active actions
1068 m_changeIconAction = new QToolButton(m_widget);
1069 m_changeIconAction->setIcon(KisIconUtils::loadIcon(QStringLiteral("preferences-desktop-icons")));
1070 m_changeIconAction->setText(i18n("Change Icon..."));
1071 m_changeIconAction->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
1072 m_changeIconAction->setEnabled(false);
1073
1074 QObject::connect(m_changeIconAction, SIGNAL(clicked()), m_widget, SLOT(slotChangeIconButton()));
1075
1076 KListWidgetSearchLine *activeListSearchLine = new KListWidgetSearchLine(m_widget, m_activeList);
1077 activeListSearchLine->setPlaceholderText(i18n("Filter"));
1078
1079 // The buttons in the middle
1080
1081 m_upAction = new QToolButton(m_widget);
1082 m_upAction->setIcon(KisIconUtils::loadIcon(QStringLiteral("arrow-up")));
1083 m_upAction->setEnabled(false);
1084 m_upAction->setAutoRepeat(true);
1085 QObject::connect(m_upAction, SIGNAL(clicked()), m_widget, SLOT(slotUpButton()));
1086
1087 m_insertAction = new QToolButton(m_widget);
1088 m_insertAction->setIcon(KisIconUtils::loadIcon(QApplication::isRightToLeft() ? QStringLiteral("arrow-left") : QLatin1String("arrow-right")));
1089 m_insertAction->setEnabled(false);
1090 QObject::connect(m_insertAction, SIGNAL(clicked()), m_widget, SLOT(slotInsertButton()));
1091
1092 m_removeAction = new QToolButton(m_widget);
1093 m_removeAction->setIcon(KisIconUtils::loadIcon(QApplication::isRightToLeft() ? QStringLiteral("arrow-right") : QLatin1String("arrow-left")));
1094 m_removeAction->setEnabled(false);
1095 QObject::connect(m_removeAction, SIGNAL(clicked()), m_widget, SLOT(slotRemoveButton()));
1096
1097 m_downAction = new QToolButton(m_widget);
1098 m_downAction->setIcon(KisIconUtils::loadIcon(QStringLiteral("arrow-down")));
1099 m_downAction->setEnabled(false);
1100 m_downAction->setAutoRepeat(true);
1101 QObject::connect(m_downAction, SIGNAL(clicked()), m_widget, SLOT(slotDownButton()));
1102
1103 m_helpArea = new QLabel(m_widget);
1104 m_helpArea->setWordWrap(true);
1105
1106 // now start with our layouts
1107 QVBoxLayout *top_layout = new QVBoxLayout(m_widget);
1108 top_layout->setContentsMargins(0, 0, 0, 0);
1109
1110 QVBoxLayout *name_layout = new QVBoxLayout();
1111 QHBoxLayout *list_layout = new QHBoxLayout();
1112
1113 QVBoxLayout *inactive_layout = new QVBoxLayout();
1114 QVBoxLayout *active_layout = new QVBoxLayout();
1115
1116 QGridLayout *button_layout = new QGridLayout();
1117
1118 name_layout->addWidget(m_comboLabel);
1119 name_layout->addWidget(m_toolbarCombo);
1120// name_layout->addWidget(new_toolbar);
1121// name_layout->addWidget(del_toolbar);
1122
1123 button_layout->setSpacing(0);
1124 button_layout->setRowStretch(0, 10);
1125 button_layout->addWidget(m_upAction, 1, 1);
1126 button_layout->addWidget(m_removeAction, 2, 0);
1127 button_layout->addWidget(m_insertAction, 2, 2);
1128 button_layout->addWidget(m_downAction, 3, 1);
1129 button_layout->setRowStretch(4, 10);
1130
1131 inactive_layout->addWidget(inactive_label);
1132 inactive_layout->addWidget(inactiveListSearchLine);
1133 inactive_layout->addWidget(m_inactiveList, 1);
1134
1135 active_layout->addWidget(active_label);
1136 active_layout->addWidget(activeListSearchLine);
1137 active_layout->addWidget(m_activeList, 1);
1138 active_layout->addWidget(m_changeIconAction);
1139
1140 list_layout->addLayout(inactive_layout);
1141 list_layout->addLayout(button_layout);
1142 list_layout->addLayout(active_layout);
1143
1144 top_layout->addLayout(name_layout);
1145 top_layout->addWidget(m_comboSeparator);
1146 top_layout->addLayout(list_layout, 10);
1147 top_layout->addWidget(m_helpArea);
1148 top_layout->addWidget(new KSeparator(m_widget));
1149}
void slotDropped(ToolBarListWidget *list, int index, ToolBarItem *item, bool sourceIsActiveList)
void setActiveList(bool isActiveList)
QIcon loadIcon(const QString &name)
KRITAWIDGETUTILS_EXPORT void updateCursor(QWidget *source, QScroller::State state)
KRITAWIDGETUTILS_EXPORT QScroller * createPreconfiguredScroller(QAbstractScrollArea *target)

References KisKineticScroller::createPreconfiguredScroller(), KisIconUtils::loadIcon(), m_activeList, m_changeIconAction, m_comboLabel, m_comboSeparator, m_downAction, m_helpArea, m_inactiveList, m_insertAction, m_removeAction, m_toolbarCombo, m_upAction, m_widget, KDEPrivate::ToolBarListWidget::setActiveList(), slotActiveSelectionChanged(), slotChangeIconButton(), slotDownButton(), slotDropped(), slotInactiveSelectionChanged(), slotInsertButton(), slotRemoveButton(), slotToolBarSelected(), slotUpButton(), and KisKineticScroller::updateCursor().

◆ slotActiveSelectionChanged()

void KisKEditToolBarWidgetPrivate::slotActiveSelectionChanged ( )

Definition at line 1356 of file kedittoolbar.cpp.

1357{
1358 ToolBarItem *toolitem = 0;
1359 if (!m_activeList->selectedItems().isEmpty()) {
1360 toolitem = static_cast<ToolBarItem *>(m_activeList->selectedItems().first());
1361 }
1362
1363 m_removeAction->setEnabled(toolitem);
1364 m_changeIconAction->setEnabled(toolitem && !toolitem->isSeparator());
1365
1366 if (toolitem) {
1367 m_upAction->setEnabled(toolitem->index() != 0);
1368 m_downAction->setEnabled(toolitem->index() != toolitem->listWidget()->count() - 1);
1369
1370 QString statusText = toolitem->statusText();
1371 m_helpArea->setText(i18nc("@label Action tooltip in toolbar editor, below the action list", "%1", statusText));
1372 } else {
1373 m_upAction->setEnabled(false);
1374 m_downAction->setEnabled(false);
1375 m_helpArea->setText(QString());
1376 }
1377}
QString statusText() const

References KDEPrivate::ToolBarItem::index(), KDEPrivate::ToolBarItem::isSeparator(), m_activeList, m_changeIconAction, m_downAction, m_helpArea, m_removeAction, m_upAction, and KDEPrivate::ToolBarItem::statusText().

◆ slotChangeIconButton()

void KisKEditToolBarWidgetPrivate::slotChangeIconButton ( )

Definition at line 1535 of file kedittoolbar.cpp.

1536{
1537 ToolBarItem *toolitem = m_activeList->currentItem();
1538 KIS_SAFE_ASSERT_RECOVER_RETURN(toolitem && !toolitem->isSeparator());
1539
1540 QDomElement elem = findElementForToolBarItem(toolitem);
1541 KIS_SAFE_ASSERT_RECOVER_RETURN(!elem.isNull());
1542
1543 static bool iconsLoaded {false};
1544
1545 // Load all icons, also the icons that only get loaded when an image is created
1546 if (!iconsLoaded) {
1547
1548 QFileInfoList entryList = QDir(":/").entryInfoList(QDir::Files);
1549 entryList += QDir(":/pics/").entryInfoList(QDir::Files);
1550 const QStringList suffixes {"png", "svg", "svgz"};
1551
1552 foreach (const QFileInfo info, entryList) {
1553 if (suffixes.contains(info.suffix())) {
1554 QString basename = info.baseName();
1555 int i = basename.indexOf('_', 5);
1556 basename = basename.mid(i + 1);
1557 KisIconUtils::loadIcon(basename);
1558 }
1559 }
1560 iconsLoaded = true;
1561 }
1562
1564
1565 // Dialog UI
1566 QDialog dialog(m_widget);
1567 dialog.setWindowTitle(i18n("Choose Icon"));
1568 dialog.resize(480, 500);
1569
1570 QVBoxLayout *layout = new QVBoxLayout(&dialog);
1571
1572 // Filter input
1573 QLineEdit *filterEdit = new QLineEdit(&dialog);
1574 filterEdit->setPlaceholderText(i18n("Filter icons..."));
1575 layout->addWidget(filterEdit);
1576
1577 // Icon list
1578 QListWidget *list = new QListWidget(&dialog);
1579 list->setViewMode(QListView::ListMode); // icon + text side by side
1580 list->setIconSize(QSize(22, 22));
1581 list->setResizeMode(QListWidget::Adjust);
1582 list->setSelectionMode(QAbstractItemView::SingleSelection);
1583 QScroller *scroller = KisKineticScroller::createPreconfiguredScroller(list);
1584 if (scroller) {
1585 QObject::connect(scroller, &QScroller::stateChanged, m_widget, [&](QScroller::State state) {
1587 });
1588 }
1589
1590 // Fill the list
1591 for (const QString &iconName : loadedIcons) {
1592 QListWidgetItem *item = new QListWidgetItem(
1593 KisIconUtils::loadIcon(iconName),
1594 iconName,
1595 list
1596 );
1597 item->setData(Qt::UserRole, iconName);
1598 }
1599 layout->addWidget(list);
1600
1601 // OK/Cancel buttons
1602 QDialogButtonBox *backButton = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, &dialog);
1603 layout->addWidget(backButton);
1604
1605 QObject::connect(backButton, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
1606 QObject::connect(backButton, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
1607
1608 // Filter logic
1609 QObject::connect(filterEdit, &QLineEdit::textChanged, &dialog, [&list](const QString &text) {
1610 for (int i = 0; i < list->count(); ++i) {
1611 QListWidgetItem *item = list->item(i);
1612 bool match = item->text().contains(text, Qt::CaseInsensitive);
1613 item->setHidden(!match);
1614 }
1615 });
1616
1617 // Optional: preselect current icon
1618 QString currentIconName = elem.attribute(QStringLiteral("icon"));
1619 for (int i = 0; i < list->count(); ++i) {
1620 if (list->item(i)->data(Qt::UserRole).toString() == currentIconName) {
1621 list->setCurrentItem(list->item(i));
1622 break;
1623 }
1624 }
1625
1626 // Execute
1627 if (dialog.exec() == QDialog::Accepted && list->currentItem()) {
1628 QString chosenIconName = list->currentItem()->data(Qt::UserRole).toString();
1629
1630 toolitem->setIcon(KisIconUtils::loadIcon(chosenIconName));
1631
1632 // Update XML in the toolbar DOM
1633 // Ensure (ActionIconOverrides) exist
1634 QDomDocument doc = m_widget->domDocument();
1635 QDomElement root = doc.documentElement();
1636 QDomElement overridesElem = root.namedItem(QStringLiteral("ActionIconOverrides")).toElement();
1637 if (overridesElem.isNull()) {
1638 overridesElem = doc.createElement(QStringLiteral("ActionIconOverrides"));
1639 root.appendChild(overridesElem);
1640 }
1641
1642 // Find Action in overrides or create new
1643 QString actionName = toolitem->internalName();
1644 QDomElement overrideAction;
1645 for (QDomNode child = overridesElem.firstChild(); !child.isNull(); child = child.nextSibling()) {
1646 QDomElement childElement = child.toElement();
1647 if (childElement.attribute(QStringLiteral("name")) == actionName) {
1648 overrideAction = childElement;
1649 break;
1650 }
1651 }
1652 if (overrideAction.isNull()) {
1653 overrideAction = doc.createElement(QStringLiteral("Action"));
1654 overrideAction.setAttribute(QStringLiteral("name"), actionName);
1655 overridesElem.appendChild(overrideAction);
1656 }
1657
1658 // Set icon override
1659 overrideAction.setAttribute(QStringLiteral("icon"), chosenIconName);
1660
1661 // Mark document modified
1662 m_currentToolBarElem.setAttribute(QStringLiteral("noMerge"), QLatin1String("1"));
1665 m_activeList->update();
1666
1667 Q_EMIT m_widget->enableOk(true);
1668 }
1669}
ToolBarItem * currentItem() const
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
QStringList allUniqueLoadedIconNames()

References KisIconUtils::allUniqueLoadedIconNames(), KisKineticScroller::createPreconfiguredScroller(), KDEPrivate::ToolBarListWidget::currentItem(), KisKXMLGUIClient::domDocument(), KDEPrivate::KisKEditToolBarWidget::enableOk(), findElementForToolBarItem(), KDEPrivate::ToolBarItem::internalName(), KDEPrivate::ToolBarItem::isSeparator(), KIS_SAFE_ASSERT_RECOVER_RETURN, KisIconUtils::loadIcon(), m_activeList, m_currentToolBarElem, m_currentXmlData, KDEPrivate::XmlData::m_isModified, m_widget, KisKineticScroller::updateCursor(), and updateLocal().

◆ slotDownButton()

void KisKEditToolBarWidgetPrivate::slotDownButton ( )

Definition at line 1520 of file kedittoolbar.cpp.

1521{
1524
1525 // make sure we're not the bottom item already
1526 int newRow = item->listWidget()->row(item) + 1;
1527 KIS_SAFE_ASSERT_RECOVER_RETURN(newRow < item->listWidget()->count());
1528
1529 // we're modified, so let this change
1530 Q_EMIT m_widget->enableOk(true);
1531
1532 moveActive(item, static_cast<ToolBarItem *>(item->listWidget()->item(newRow)));
1533}
void moveActive(ToolBarItem *item, ToolBarItem *before)

References KDEPrivate::ToolBarListWidget::currentItem(), KDEPrivate::KisKEditToolBarWidget::enableOk(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_activeList, m_widget, and moveActive().

◆ slotDropped()

void KisKEditToolBarWidgetPrivate::slotDropped ( ToolBarListWidget * list,
int index,
ToolBarItem * item,
bool sourceIsActiveList )

Definition at line 1712 of file kedittoolbar.cpp.

1713{
1714 //qDebug() << "slotDropped list=" << (list==m_activeList?"activeList":"inactiveList")
1715 // << "index=" << index << "sourceIsActiveList=" << sourceIsActiveList;
1716 if (list == m_activeList) {
1717 ToolBarItem *after = index > 0 ? static_cast<ToolBarItem *>(list->item(index - 1)) : 0;
1718 //qDebug() << "after" << after->text() << after->internalTag();
1719 if (sourceIsActiveList) {
1720 // has been dragged within the active list (moved).
1721 moveActive(item, after);
1722 } else {
1723 // dragged from the inactive list to the active list
1724 insertActive(item, after, true);
1725 }
1726 } else if (list == m_inactiveList) {
1727 // has been dragged to the inactive list -> remove from the active list.
1728 removeActive(item);
1729 }
1730
1731 delete item; // not needed anymore. must be deleted before slotToolBarSelected clears the lists
1732
1733 // we're modified, so let this change
1734 Q_EMIT m_widget->enableOk(true);
1735
1736 slotToolBarSelected(m_toolbarCombo->currentIndex());
1737}
void insertActive(ToolBarItem *item, ToolBarItem *before, bool prepend=false)

References KDEPrivate::KisKEditToolBarWidget::enableOk(), insertActive(), m_activeList, m_inactiveList, m_toolbarCombo, m_widget, moveActive(), removeActive(), and slotToolBarSelected().

◆ slotInactiveSelectionChanged()

void KisKEditToolBarWidgetPrivate::slotInactiveSelectionChanged ( )

Definition at line 1344 of file kedittoolbar.cpp.

1345{
1346 if (m_inactiveList->selectedItems().count()) {
1347 m_insertAction->setEnabled(true);
1348 QString statusText = static_cast<ToolBarItem *>(m_inactiveList->selectedItems().first())->statusText();
1349 m_helpArea->setText(i18nc("@label Action tooltip in toolbar editor, below the action list", "%1", statusText));
1350 } else {
1351 m_insertAction->setEnabled(false);
1352 m_helpArea->setText(QString());
1353 }
1354}

References m_helpArea, m_inactiveList, and m_insertAction.

◆ slotInsertButton()

void KisKEditToolBarWidgetPrivate::slotInsertButton ( )

Definition at line 1379 of file kedittoolbar.cpp.

1380{
1381 QString internalName = static_cast<ToolBarItem *>(m_inactiveList->currentItem())->internalName();
1382
1384 // we're modified, so let this change
1385 Q_EMIT m_widget->enableOk(true);
1386
1387 slotToolBarSelected(m_toolbarCombo->currentIndex());
1388
1389 selectActiveItem(internalName);
1390}

References KDEPrivate::ToolBarListWidget::currentItem(), KDEPrivate::KisKEditToolBarWidget::enableOk(), insertActive(), m_activeList, m_inactiveList, m_toolbarCombo, m_widget, selectActiveItem(), and slotToolBarSelected().

◆ slotRemoveButton()

void KisKEditToolBarWidgetPrivate::slotRemoveButton ( )

◆ slotToolBarSelected()

void KisKEditToolBarWidgetPrivate::slotToolBarSelected ( int index)

Definition at line 1298 of file kedittoolbar.cpp.

1299{
1300 // We need to find the XmlData and toolbar element for this index
1301 // To do that, we do the same iteration as the one which filled in the combobox.
1302
1303 int toolbarNumber = 0;
1305 for (; xit != m_xmlFiles.end(); ++xit) {
1306
1307 // skip the merged one in favor of the local one,
1308 // so that we can change icons
1309 if ((*xit).type() == XmlData::Merged) {
1310 continue;
1311 }
1312
1313 // each xml file may have any number of toolbars
1314 ToolBarList::Iterator it = (*xit).barList().begin();
1315 for (; it != (*xit).barList().end(); ++it) {
1316
1317 // is this our toolbar?
1318 if (toolbarNumber == index) {
1319
1320 // save our current settings
1321 m_currentXmlData = & (*xit);
1323
1324 //qDebug() << "found toolbar" << m_currentXmlData->toolBarText(*it) << "m_currentXmlData set to";
1326
1327 // If this is a Merged xmldata, clicking the "change icon" button would assert...
1328 Q_ASSERT(m_currentXmlData->type() != XmlData::Merged);
1329
1330 // load in our values
1332
1333 if ((*xit).type() == XmlData::Part || (*xit).type() == XmlData::Shell) {
1334 m_widget->setDOMDocument((*xit).domDocument());
1335 }
1336 return;
1337 }
1338 ++toolbarNumber;
1339
1340 }
1341 }
1342}
void loadActions(const QDomElement &elem)
XmlType type() const
void setDOMDocument(const QDomDocument &document, bool merge=false)

References KDEPrivate::XmlData::dump(), loadActions(), m_currentToolBarElem, m_currentXmlData, m_widget, m_xmlFiles, KDEPrivate::XmlData::Merged, KDEPrivate::XmlData::Part, KisKXMLGUIClient::setDOMDocument(), KDEPrivate::XmlData::Shell, and KDEPrivate::XmlData::type().

◆ slotUpButton()

void KisKEditToolBarWidgetPrivate::slotUpButton ( )

Definition at line 1474 of file kedittoolbar.cpp.

1475{
1478
1479 int row = item->listWidget()->row(item) - 1;
1480 // make sure we're not the top item already
1482
1483 // we're modified, so let this change
1484 Q_EMIT m_widget->enableOk(true);
1485
1486 moveActive(item, static_cast<ToolBarItem *>(item->listWidget()->item(row - 1)));
1487}

References KDEPrivate::ToolBarListWidget::currentItem(), KDEPrivate::KisKEditToolBarWidget::enableOk(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_activeList, m_widget, and moveActive().

◆ updateLocal()

void KisKEditToolBarWidgetPrivate::updateLocal ( QDomElement & elem)

Definition at line 1671 of file kedittoolbar.cpp.

1672{
1674 for (; xit != m_xmlFiles.end(); ++xit) {
1675 if ((*xit).type() == XmlData::Merged) {
1676 continue;
1677 }
1678
1679 if ((*xit).type() == XmlData::Shell ||
1680 (*xit).type() == XmlData::Part) {
1681 if (m_currentXmlData->xmlFile() == (*xit).xmlFile()) {
1682 (*xit).m_isModified = true;
1683 return;
1684 }
1685
1686 continue;
1687 }
1688
1689 (*xit).m_isModified = true;
1690 const QLatin1String attrName("name");
1691 ToolBarList::Iterator it = (*xit).barList().begin();
1692 for (; it != (*xit).barList().end(); ++it) {
1693 QString name((*it).attribute(attrName));
1694 QString tag((*it).tagName());
1695 if ((tag != elem.tagName()) || (name != elem.attribute(attrName))) {
1696 continue;
1697 }
1698
1699 QDomElement toolbar = (*xit).domDocument().documentElement().toElement();
1700 toolbar.replaceChild(elem, (*it));
1701 return;
1702 }
1703
1704 // just append it
1705 QDomElement toolbar = (*xit).domDocument().documentElement().toElement();
1706 Q_ASSERT(!toolbar.isNull());
1707 toolbar.appendChild(elem);
1708 }
1709}
QString xmlFile() const

References m_currentXmlData, m_xmlFiles, KDEPrivate::XmlData::Merged, KDEPrivate::XmlData::Part, KDEPrivate::XmlData::Shell, and KDEPrivate::XmlData::xmlFile().

◆ xmlFile()

QString KDEPrivate::KisKEditToolBarWidgetPrivate::xmlFile ( const QString & xml_file) const
inline

Definition at line 470 of file kedittoolbar.cpp.

471 {
472 return xml_file.isEmpty() ? m_componentName + QStringLiteral("ui.xmlgui") : xml_file;
473 }

References m_componentName.

Member Data Documentation

◆ m_activeList

ToolBarListWidget* KDEPrivate::KisKEditToolBarWidgetPrivate::m_activeList {nullptr}

Definition at line 552 of file kedittoolbar.cpp.

552{nullptr};

◆ m_barList

ToolBarList KDEPrivate::KisKEditToolBarWidgetPrivate::m_barList

Definition at line 550 of file kedittoolbar.cpp.

◆ m_changeIconAction

QToolButton* KDEPrivate::KisKEditToolBarWidgetPrivate::m_changeIconAction {nullptr}

Definition at line 532 of file kedittoolbar.cpp.

532{nullptr};

◆ m_collection

KisKActionCollection* KDEPrivate::KisKEditToolBarWidgetPrivate::m_collection {nullptr}

Definition at line 535 of file kedittoolbar.cpp.

535{nullptr};

◆ m_comboLabel

QLabel* KDEPrivate::KisKEditToolBarWidgetPrivate::m_comboLabel {nullptr}

Definition at line 556 of file kedittoolbar.cpp.

556{nullptr};

◆ m_comboSeparator

KSeparator* KDEPrivate::KisKEditToolBarWidgetPrivate::m_comboSeparator {nullptr}

Definition at line 557 of file kedittoolbar.cpp.

557{nullptr};

◆ m_componentName

QString KDEPrivate::KisKEditToolBarWidgetPrivate::m_componentName

Definition at line 538 of file kedittoolbar.cpp.

◆ m_currentToolBarElem

QDomElement KDEPrivate::KisKEditToolBarWidgetPrivate::m_currentToolBarElem

Definition at line 543 of file kedittoolbar.cpp.

◆ m_currentXmlData

XmlData* KDEPrivate::KisKEditToolBarWidgetPrivate::m_currentXmlData {nullptr}

Definition at line 542 of file kedittoolbar.cpp.

542{nullptr};

◆ m_downAction

QToolButton* KDEPrivate::KisKEditToolBarWidgetPrivate::m_downAction {nullptr}

Definition at line 530 of file kedittoolbar.cpp.

530{nullptr};

◆ m_emptyIcon

QPixmap KDEPrivate::KisKEditToolBarWidgetPrivate::m_emptyIcon

Definition at line 540 of file kedittoolbar.cpp.

◆ m_factory

KisKXMLGUIFactory* KDEPrivate::KisKEditToolBarWidgetPrivate::m_factory {nullptr}

Definition at line 537 of file kedittoolbar.cpp.

537{nullptr};

◆ m_globalFile

QString KDEPrivate::KisKEditToolBarWidgetPrivate::m_globalFile

Definition at line 546 of file kedittoolbar.cpp.

◆ m_helpArea

QLabel* KDEPrivate::KisKEditToolBarWidgetPrivate::m_helpArea {nullptr}

Definition at line 558 of file kedittoolbar.cpp.

558{nullptr};

◆ m_inactiveList

ToolBarListWidget* KDEPrivate::KisKEditToolBarWidgetPrivate::m_inactiveList {nullptr}

Definition at line 551 of file kedittoolbar.cpp.

551{nullptr};

◆ m_insertAction

QToolButton* KDEPrivate::KisKEditToolBarWidgetPrivate::m_insertAction {nullptr}

Definition at line 529 of file kedittoolbar.cpp.

529{nullptr};

◆ m_loadedOnce

bool KDEPrivate::KisKEditToolBarWidgetPrivate::m_loadedOnce {false}

Definition at line 559 of file kedittoolbar.cpp.

559{false};

◆ m_localDoc

QDomDocument KDEPrivate::KisKEditToolBarWidgetPrivate::m_localDoc

Definition at line 548 of file kedittoolbar.cpp.

◆ m_rcFile

QString KDEPrivate::KisKEditToolBarWidgetPrivate::m_rcFile

Definition at line 547 of file kedittoolbar.cpp.

◆ m_removeAction

QToolButton* KDEPrivate::KisKEditToolBarWidgetPrivate::m_removeAction {nullptr}

Definition at line 528 of file kedittoolbar.cpp.

528{nullptr};

◆ m_toolbarCombo

QComboBox* KDEPrivate::KisKEditToolBarWidgetPrivate::m_toolbarCombo {nullptr}

Definition at line 525 of file kedittoolbar.cpp.

525{nullptr};

◆ m_upAction

QToolButton* KDEPrivate::KisKEditToolBarWidgetPrivate::m_upAction {nullptr}

Definition at line 527 of file kedittoolbar.cpp.

527{nullptr};

◆ m_widget

KisKEditToolBarWidget* KDEPrivate::KisKEditToolBarWidgetPrivate::m_widget {nullptr}

Definition at line 536 of file kedittoolbar.cpp.

536{nullptr};

◆ m_xmlFile

QString KDEPrivate::KisKEditToolBarWidgetPrivate::m_xmlFile

Definition at line 545 of file kedittoolbar.cpp.

◆ m_xmlFiles

QList<XmlData> KDEPrivate::KisKEditToolBarWidgetPrivate::m_xmlFiles

Definition at line 554 of file kedittoolbar.cpp.


The documentation for this class was generated from the following file: