Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdesigner_utils_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef QDESIGNER_UTILS_H
17#define QDESIGNER_UTILS_H
18
20
21#include <QtDesigner/abstractformwindow.h>
22
23#include <QtCore/qcompare.h>
24#include <QtCore/qmap.h>
25#include <QtCore/qhash.h>
26#include <QtCore/qvariant.h>
27#include <QtCore/qshareddata.h>
28#include <QtWidgets/qmainwindow.h>
29#include <QtGui/qicon.h>
30#include <QtGui/qpixmap.h>
31
32#include <algorithm>
33#include <map>
34#include <optional>
35
36QT_BEGIN_NAMESPACE
37
38class QDebug;
39
40namespace qdesigner_internal {
41class QDesignerFormWindowCommand;
42class DesignerIconCache;
43class FormWindowBase;
44
45
47
49
50QDESIGNER_SHARED_EXPORT void designerWarning(const QString &message);
51
52QDESIGNER_SHARED_EXPORT void reloadIconResources(DesignerIconCache *iconCache, QObject *object);
53
54/* Flag/Enumeration helpers for the property sheet: Enumeration or flag values are returned by the property sheet
55 * as a pair of meta type and integer value.
56 * The meta type carries all the information required for the property editor and serialization
57 * by the form builders (names, etc).
58 * Note that the property editor uses unqualified names ("Cancel") while the form builder serialization (uic)
59 * requires the whole string
60 * ("QDialogButtonBox::Cancel" or "org.qt-project.qt.gui.QDialogButtonBox.StandardButton.Cancel").*/
61
62/* --------- MetaEnum: Base class representing a QMetaEnum with lookup functions
63 * in both ways. Template of int type since unsigned is more suitable for flags.
64 * The keyToValue() is ignorant of scopes, it can handle fully qualified or unqualified names. */
65
66template <class IntType>
68{
69public:
71 Qualified }; // Qt pre 6.7 without enum name
72
74
75 MetaEnum(const QString &enumName, const QString &scope, const QString &separator);
76 MetaEnum() = default;
77 void addKey(IntType value, const QString &name);
78
79 std::optional<QString> valueToKey(IntType value) const;
80 // Ignorant of scopes.
81 std::optional<IntType> keyToValue(QStringView key) const;
82
83 const QString &enumName() const { return m_enumName; }
84 const QString &scope() const { return m_scope; }
85 const QString &separator() const { return m_separator; }
86
87 const QStringList &keys() const { return m_keys; }
88 const KeyToValueMap &keyToValueMap() const { return m_keyToValueMap; }
89
90protected:
91 void appendQualifiedName(const QString &key, SerializationMode sm, QString &target) const;
92
93 const KeyToValueMap &canonicalKeyToValueMap() const { return m_canonicalKeyToValueMap; }
94
95 // Trim the value as a whole and tell whether what remains is free of
96 // whitespace other than plain spaces. uic rejects newlines and tabs within
97 // a value since they would end up verbatim in the generated code, so
98 // accepting them here would load forms that fail to build.
99 static bool trimValue(QStringView *value);
100
101private:
102 QString m_enumName;
103 QString m_scope;
104 QString m_separator;
105 KeyToValueMap m_keyToValueMap;
106 KeyToValueMap m_canonicalKeyToValueMap;
107 QStringList m_keys;
108};
109
110template <class IntType>
111MetaEnum<IntType>::MetaEnum(const QString &enumName, const QString &scope, const QString &separator) :
113 m_scope(scope),
115{
116}
117
118template <class IntType>
119void MetaEnum<IntType>::addKey(IntType value, const QString &name)
120{
121 m_keyToValueMap.insert({name, value});
122 const bool singleBit = value != 0 && (value & (value - IntType(1))) == 0;
123 const auto &m = m_canonicalKeyToValueMap;
124 if (!singleBit
125 || std::none_of(m.cbegin(), m.cend(),
126 [value](const auto &e) { return e.second == value; })) {
127 m_canonicalKeyToValueMap.insert({name, value});
128 }
129 m_keys.append(name);
130}
131
132template <class IntType>
133std::optional<QString> MetaEnum<IntType>::valueToKey(IntType value) const
134{
135 for (auto it = m_keyToValueMap.begin(), end = m_keyToValueMap.end(); it != end; ++it) {
136 if (it->second == value)
137 return it->first;
138 }
139 return std::nullopt;
140}
141
142template <class IntType>
143std::optional<IntType> MetaEnum<IntType>::keyToValue(QStringView key) const
144{
145 key = key.trimmed(); // Spaces around the flag separator
146 const auto lastSep = key.lastIndexOf(m_separator);
147 if (lastSep != -1)
148 key = key.sliced(lastSep + m_separator.size());
149 const auto it = m_keyToValueMap.find(key);
150 if (it == m_keyToValueMap.end())
151 return std::nullopt;
152 return it->second;
153}
154
155template <class IntType>
156bool MetaEnum<IntType>::trimValue(QStringView *value)
157{
158 *value = value->trimmed();
159 return std::none_of(value->cbegin(), value->cend(),
160 [](QChar c) { return c.isSpace() && c != u' '; });
161}
162
163template <class IntType>
164void MetaEnum<IntType>::appendQualifiedName(const QString &key, SerializationMode sm,
165 QString &target) const
166{
167 if (!m_scope.isEmpty()) {
168 target += m_scope;
169 target += m_separator;
170 }
171 if (sm == FullyQualified)
172 target += m_enumName + m_separator;
173 target += key;
174}
175
176// -------------- DesignerMetaEnum: Meta type for enumerations
177
179{
180public:
182 DesignerMetaEnum() = default;
183
185
187 QString messageParseFailed(const QString &s) const;
188
189 // parse a string (ignorant of scopes)
190 std::optional<int> parseEnum(const QString &s) const;
191};
192
193// -------------- DesignerMetaFlags: Meta type for flags.
194// Note that while the handling of flags is done using unsigned integers, the actual values returned
195// by the property system are integers.
196
198{
199public:
200 explicit DesignerMetaFlags(const QString &enumName, const QString &scope,
201 const QString &separator);
202 DesignerMetaFlags() = default;
203
205 QStringList flags(int value) const;
206
207 QString messageParseFailed(const QString &s) const;
208 // parse a string (ignorant of scopes)
209 std::optional<int> parseFlags(const QString &s) const;
210};
211
212// -------------- EnumValue: Returned by the property sheet for enumerations
213
222
223// -------------- FlagValue: Returned by the property sheet for flags
224
226{
227 PropertySheetFlagValue(int v, const DesignerMetaFlags &mf);
229
230 int value{0};
232};
233
234// -------------- PixmapValue: Returned by the property sheet for pixmaps
236{
237public:
238 PropertySheetPixmapValue(const QString &path);
239 PropertySheetPixmapValue();
240
241 // Check where a pixmap comes from
242 enum PixmapSource { LanguageResourcePixmap , ResourcePixmap, FilePixmap };
243 static PixmapSource getPixmapSource(QDesignerFormEditorInterface *core, const QString & path);
244
245 PixmapSource pixmapSource(QDesignerFormEditorInterface *core) const { return getPixmapSource(core, m_path); }
246
247 QString path() const;
248 void setPath(const QString &path); // passing the empty path resets the pixmap
249
250private:
251 friend size_t qHash(const PropertySheetPixmapValue &p, size_t seed = 0) noexcept
252 {
253 return qHash(p.m_path, seed);
254 }
255 friend bool comparesEqual(const PropertySheetPixmapValue &lhs,
256 const PropertySheetPixmapValue &rhs) noexcept
257 {
258 return lhs.m_path == rhs.m_path;
259 }
260 Q_DECLARE_EQUALITY_COMPARABLE(PropertySheetPixmapValue)
261
262 QString m_path;
263};
264
265// -------------- IconValue: Returned by the property sheet for icons
266
267class PropertySheetIconValueData;
268
270{
271 public:
272 explicit PropertySheetIconValue(const PropertySheetPixmapValue &pixmap);
273 PropertySheetIconValue();
274 ~PropertySheetIconValue();
275 PropertySheetIconValue(const PropertySheetIconValue &) noexcept;
276 PropertySheetIconValue &operator=(const PropertySheetIconValue &);
277 PropertySheetIconValue(PropertySheetIconValue &&) noexcept;
278 PropertySheetIconValue &operator=(PropertySheetIconValue &&) noexcept;
279
280 bool isEmpty() const;
281
282 QString theme() const;
283 void setTheme(const QString &);
284
285 int themeEnum() const;
286 void setThemeEnum(int e);
287
288 PropertySheetPixmapValue pixmap(QIcon::Mode mode, QIcon::State state) const;
289 void setPixmap(QIcon::Mode mode, QIcon::State state, const PropertySheetPixmapValue &path); // passing the empty path resets the pixmap
290
291 uint mask() const;
292 uint compare(const PropertySheetIconValue &other) const;
293 void assign(const PropertySheetIconValue &other, uint mask);
294
295 // Convenience accessors to get themed/unthemed icons.
296 PropertySheetIconValue themed() const;
297 PropertySheetIconValue unthemed() const;
298
299 using ModeStateKey = std::pair<QIcon::Mode, QIcon::State>;
300 using ModeStateToPixmapMap = QMap<ModeStateKey, PropertySheetPixmapValue>;
301
302 const ModeStateToPixmapMap &paths() const;
303
304private:
306 size_t qHash(const PropertySheetIconValue &p, size_t seed) noexcept;
307 friend size_t qHash(const PropertySheetIconValue &p) noexcept
308 { return qHash(p, 0); }
310 bool comparesEqual(const PropertySheetIconValue &lhs,
311 const PropertySheetIconValue &rhs) noexcept;
312 Q_DECLARE_EQUALITY_COMPARABLE(PropertySheetIconValue)
313
314 QSharedDataPointer<PropertySheetIconValueData> m_data;
315};
316
317QDESIGNER_SHARED_EXPORT QDebug operator<<(QDebug, const PropertySheetIconValue &);
318
320{
321 Q_OBJECT
322public:
323 DesignerPixmapCache(QObject *parent = nullptr);
324 QPixmap pixmap(const PropertySheetPixmapValue &value) const;
325 void clear();
326signals:
327 void reloaded();
328private:
329 mutable QHash<PropertySheetPixmapValue, QPixmap> m_cache;
330 friend class FormWindowBase;
331};
332
334{
335 Q_OBJECT
336public:
337 explicit DesignerIconCache(DesignerPixmapCache *pixmapCache, QObject *parent = nullptr);
338 QIcon icon(const PropertySheetIconValue &value) const;
339 void clear();
340signals:
341 void reloaded();
342private:
343 mutable QHash<PropertySheetIconValue, QIcon> m_cache;
344 DesignerPixmapCache *m_pixmapCache;
345 friend class FormWindowBase;
346};
347
348// -------------- PropertySheetTranslatableData: Base class for translatable properties.
350{
351protected:
352 PropertySheetTranslatableData(bool translatable = true,
353 const QString &disambiguation = QString(),
354 const QString &comment = QString());
355
356public:
357 bool translatable() const { return m_translatable; }
358 void setTranslatable(bool translatable) { m_translatable = translatable; }
359 QString disambiguation() const { return m_disambiguation; }
360 void setDisambiguation(const QString &d) { m_disambiguation = d; }
361 QString comment() const { return m_comment; }
362 void setComment(const QString &comment) { m_comment = comment; }
363 QString id() const { return m_id; }
364 void setId(const QString &id) { m_id = id; }
365
366private:
367 friend bool comparesEqual(const PropertySheetTranslatableData &lhs,
368 const PropertySheetTranslatableData &rhs) noexcept
369 {
370 return lhs.m_translatable == rhs.m_translatable
371 && lhs.m_disambiguation == rhs.m_disambiguation
372 && lhs.m_comment == rhs.m_comment
373 && lhs.m_id == rhs.m_id;
374 }
375 Q_DECLARE_EQUALITY_COMPARABLE(PropertySheetTranslatableData)
376
377 bool m_translatable;
378 QString m_disambiguation;
379 QString m_comment;
380 QString m_id;
381};
382
383// -------------- StringValue: Returned by the property sheet for strings
384class QDESIGNER_SHARED_EXPORT PropertySheetStringValue : public PropertySheetTranslatableData
385{
386public:
387 PropertySheetStringValue(const QString &value = QString(), bool translatable = true,
388 const QString &disambiguation = QString(), const QString &comment = QString());
389
390 QString value() const;
391 void setValue(const QString &value);
392
393private:
394 friend bool comparesEqual(const PropertySheetStringValue &lhs,
395 const PropertySheetStringValue &rhs) noexcept
396 {
397 const PropertySheetTranslatableData &upLhs = lhs;
398 const PropertySheetTranslatableData &upRhs = rhs;
399 return lhs.m_value == rhs.m_value && upLhs == upRhs;
400 }
401 Q_DECLARE_EQUALITY_COMPARABLE(PropertySheetStringValue)
402
403 QString m_value;
404};
405
406// -------------- StringValue: Returned by the property sheet for string lists
407class QDESIGNER_SHARED_EXPORT PropertySheetStringListValue : public PropertySheetTranslatableData
408{
409public:
410 PropertySheetStringListValue(const QStringList &value = QStringList(),
411 bool translatable = true,
412 const QString &disambiguation = QString(),
413 const QString &comment = QString());
414
415 QStringList value() const;
416 void setValue(const QStringList &value);
417
418private:
419 friend bool comparesEqual(const PropertySheetStringListValue &lhs,
420 const PropertySheetStringListValue &rhs) noexcept
421 {
422 const PropertySheetTranslatableData &upLhs = lhs;
423 const PropertySheetTranslatableData &upRhs = rhs;
424 return lhs.m_value == rhs.m_value && upLhs == upRhs;
425 }
426 Q_DECLARE_EQUALITY_COMPARABLE(PropertySheetStringListValue)
427
428 QStringList m_value;
429};
430
431// -------------- StringValue: Returned by the property sheet for strings
432class QDESIGNER_SHARED_EXPORT PropertySheetKeySequenceValue : public PropertySheetTranslatableData
433{
434public:
435 PropertySheetKeySequenceValue(const QKeySequence &value = QKeySequence(),
436 bool translatable = true,
437 const QString &disambiguation = QString(),
438 const QString &comment = QString());
439 PropertySheetKeySequenceValue(const QKeySequence::StandardKey &standardKey,
440 bool translatable = true,
441 const QString &disambiguation = QString(),
442 const QString &comment = QString());
443
444 QKeySequence value() const;
445 void setValue(const QKeySequence &value);
446 QKeySequence::StandardKey standardKey() const;
447 void setStandardKey(const QKeySequence::StandardKey &standardKey);
448 bool isStandardKey() const;
449
450private:
451 friend bool comparesEqual(const PropertySheetKeySequenceValue &lhs,
452 const PropertySheetKeySequenceValue &rhs) noexcept
453 {
454 const PropertySheetTranslatableData &upLhs = lhs;
455 const PropertySheetTranslatableData &upRhs = rhs;
456 return lhs.m_value == rhs.m_value && lhs.m_standardKey == rhs.m_standardKey
457 && upLhs == upRhs;
458 }
459 Q_DECLARE_EQUALITY_COMPARABLE(PropertySheetKeySequenceValue)
460
461 QKeySequence m_value;
462 QKeySequence::StandardKey m_standardKey;
463};
464
465} // namespace qdesigner_internal
466
468
469
470// NOTE: Do not move this code, needed for GCC 3.3
472Q_DECLARE_METATYPE(qdesigner_internal::PropertySheetFlagValue)
473Q_DECLARE_METATYPE(qdesigner_internal::PropertySheetPixmapValue)
474Q_DECLARE_METATYPE(qdesigner_internal::PropertySheetIconValue)
475Q_DECLARE_METATYPE(qdesigner_internal::PropertySheetStringValue)
476Q_DECLARE_METATYPE(qdesigner_internal::PropertySheetStringListValue)
477Q_DECLARE_METATYPE(qdesigner_internal::PropertySheetKeySequenceValue)
478
479
480QT_BEGIN_NAMESPACE
481
482namespace qdesigner_internal {
483
484
485// Create a command to change a text property (that is, create a reset property command if the text is empty)
487
488// Returns preferred task menu action for managed widget
490
491enum class UicLanguage
492{
495};
496
497// Convenience to run UIC
498QDESIGNER_SHARED_EXPORT bool runUIC(const QString &fileName, UicLanguage language,
499 QByteArray& ba, QString &errorMessage);
500
501// Find a suitable variable name for a class.
503
504/* UpdateBlocker: Blocks the updates of the widget passed on while in scope.
505 * Does nothing if the incoming widget already has updatesEnabled==false
506 * which is important to avoid side-effects when putting it into QStackedLayout. */
507
510
511public:
513 ~UpdateBlocker();
514
515private:
517 const bool m_enabled;
518};
519
520// QPalette helpers: Mask for a single color role/group
521QDESIGNER_SHARED_EXPORT quint64 paletteResolveMask(QPalette::ColorGroup colorGroup,
522 QPalette::ColorRole colorRole);
523// Mask for the colors of a role in all groups (Active/Inactive/Disabled)
524QDESIGNER_SHARED_EXPORT quint64 paletteResolveMask(QPalette::ColorRole colorRole);
525
526namespace Utils {
527
528inline int valueOf(const QVariant &value, bool *ok = nullptr)
529{
530 if (value.canConvert<PropertySheetEnumValue>()) {
531 if (ok)
532 *ok = true;
533 return qvariant_cast<PropertySheetEnumValue>(value).value;
534 }
535 if (value.canConvert<PropertySheetFlagValue>()) {
536 if (ok)
537 *ok = true;
538 return qvariant_cast<PropertySheetFlagValue>(value).value;
539 }
540 return value.toInt(ok);
541}
542
543inline bool isObjectAncestorOf(QObject *ancestor, QObject *child)
544{
545 QObject *obj = child;
546 while (obj != nullptr) {
547 if (obj == ancestor)
548 return true;
549 obj = obj->parent();
550 }
551 return false;
552}
553
554inline bool isCentralWidget(QDesignerFormWindowInterface *fw, QWidget *widget)
555{
556 if (! fw || ! widget)
557 return false;
558
559 if (widget == fw->mainContainer())
560 return true;
561
562 // ### generalize for other containers
563 if (auto *mw = qobject_cast<QMainWindow*>(fw->mainContainer()))
564 return mw->centralWidget() == widget;
565
566 return false;
567}
568
569} // namespace Utils
570
571} // namespace qdesigner_internal
572
573QT_END_NAMESPACE
574
575#endif // QDESIGNER_UTILS_H
static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form)
static QString buddy(QLabel *label, QDesignerFormEditorInterface *core)
static constexpr auto buddyPropertyC
#define QT_BUDDYEDITOR_EXPORT
The QDesignerMetaDataBaseItemInterface class provides an interface to individual items in \QD's meta ...
friend class QWidget
Definition qpainter.h:432
void init(QWidget *parentWidget, QAction *action, QAction *beforeAction=nullptr, bool update=true)
ActionInsertionCommand(const QString &text, QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
AddMenuActionCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
AddStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void init(QStackedWidget *stackedWidget, InsertionMode mode)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
void init(QTabWidget *tabWidget, InsertionMode mode)
AddTabPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
AddToolBarCommand(QDesignerFormWindowInterface *formWindow)
void init(QMainWindow *mainWindow, Qt::ToolBarArea area)
void undo() override
Reverts a change to the document.
AddToolBoxPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QToolBox *toolBox, InsertionMode mode)
void undo() override
Reverts a change to the document.
void setBackground(QWidget *background) override
QDesignerFormWindowInterface * formWindow() const
void endConnection(QWidget *target, const QPoint &pos) override
void widgetRemoved(QWidget *w) override
QWidget * widgetAt(const QPoint &pos) const override
Connection * createConnection(QWidget *source, QWidget *destination) override
void createContextMenu(QMenu &menu) override
CreateMenuBarCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
CreateStatusBarCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void init(QDesignerMenu *menu, QAction *action, QObject *m_objectToSelect=nullptr)
CreateSubmenuCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void restore(QDesignerFormWindowInterface *formWindow) const
void save(const QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
DeleteMenuBarCommand(QDesignerFormWindowInterface *formWindow)
DeleteStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
DeleteTabPageCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
DeleteToolBarCommand(QDesignerFormWindowInterface *formWindow)
DeleteToolBoxPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
DockWidgetCommand(const QString &description, QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
InsertActionIntoCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QAction *action, QAction *actionBefore, QWidget *associatedWidget, QWidget *objectToSelect)
MenuActionCommand(const QString &text, QDesignerFormWindowInterface *formWindow)
const KeyToValueMap & keyToValueMap() const
const KeyToValueMap & canonicalKeyToValueMap() const
const QStringList & keys() const
const QString & scope() const
static bool trimValue(QStringView *value)
void addKey(IntType value, const QString &name)
std::optional< QString > valueToKey(IntType value) const
const QString & enumName() const
std::optional< IntType > keyToValue(QStringView key) const
void appendQualifiedName(const QString &key, SerializationMode sm, QString &target) const
const QString & separator() const
MetaEnum(const QString &enumName, const QString &scope, const QString &separator)
void init(QStackedWidget *stackedWidget, QWidget *page, int newIndex)
MoveStackedWidgetCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
MoveTabPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QTabWidget *tabWidget, QWidget *page, const QIcon &icon, const QString &label, int index, int newIndex)
MoveToolBoxPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QToolBox *toolBox, QWidget *page, int newIndex)
void undo() override
Reverts a change to the document.
RemoveActionFromCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
RemoveMenuActionCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
StackedWidgetCommand(QDesignerFormWindowInterface *formWindow)
void init(QStackedWidget *stackedWidget)
TabWidgetCommand(QDesignerFormWindowInterface *formWindow)
ToolBoxCommand(QDesignerFormWindowInterface *formWindow)
Combined button and popup list for selecting options.
int valueOf(const QVariant &value, bool *ok=nullptr)
bool isObjectAncestorOf(QObject *ancestor, QObject *child)
bool isCentralWidget(QDesignerFormWindowInterface *fw, QWidget *widget)
Auxiliary methods to store/retrieve settings.
QDESIGNER_SHARED_EXPORT void getFormLayoutItemPosition(const QFormLayout *formLayout, int index, int *rowPtr, int *columnPtr=nullptr, int *rowspanPtr=nullptr, int *colspanPtr=nullptr)
static QUndoCommand * createBuddyCommand(QDesignerFormWindowInterface *fw, QLabel *label, QWidget *buddy)
QDESIGNER_SHARED_EXPORT void formLayoutAddWidget(QFormLayout *formLayout, QWidget *w, const QRect &r, bool insert)
QDESIGNER_SHARED_EXPORT void designerWarning(const QString &message)
QDESIGNER_SHARED_EXPORT void reloadIconResources(DesignerIconCache *iconCache, QObject *object)
QDESIGNER_SHARED_EXPORT bool runUIC(const QString &fileName, UicLanguage language, QByteArray &ba, QString &errorMessage)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2620
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosQpa::enums::kit::ShareKit::systemShare::SelectionMode))
#define QDESIGNER_SHARED_EXPORT