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
buddyeditor.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#ifndef BUDDYEDITOR_H
6#define BUDDYEDITOR_H
7
9
10#include <connectionedit_p.h>
11#include <QtCore/qpointer.h>
12#include <QtCore/qset.h>
13
15
16class QDesignerFormWindowInterface;
17
18class QLabel;
19
20namespace qdesigner_internal {
21
23{
25
26public:
28
29 QDesignerFormWindowInterface *formWindow() const;
30 void setBackground(QWidget *background) override;
32
33public slots:
35 void widgetRemoved(QWidget *w) override;
36 void autoBuddy();
37
38protected:
39 QWidget *widgetAt(const QPoint &pos) const override;
40 Connection *createConnection(QWidget *source, QWidget *destination) override;
41 void endConnection(QWidget *target, const QPoint &pos) override;
42 void createContextMenu(QMenu &menu) override;
43
44private:
45 QWidget *findBuddy(QLabel *l, const QWidgetList &existingBuddies) const;
46
47 QPointer<QDesignerFormWindowInterface> m_formWindow;
48 bool m_updating;
49};
50
51} // namespace qdesigner_internal
52
53QT_END_NAMESPACE
54
55#endif
static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form)
static QString buddy(QLabel *label, QDesignerFormEditorInterface *core)
static constexpr auto buddyPropertyC
#define QT_BUDDYEDITOR_EXPORT
friend class QWidget
Definition qpainter.h:432
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
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static QUndoCommand * createBuddyCommand(QDesignerFormWindowInterface *fw, QLabel *label, QWidget *buddy)