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
4#ifndef BUDDYEDITOR_H
5#define BUDDYEDITOR_H
6
8
9#include <connectionedit_p.h>
10#include <QtCore/qpointer.h>
11#include <QtCore/qset.h>
12
14
15class QDesignerFormWindowInterface;
16
17class QLabel;
18
19namespace qdesigner_internal {
20
22{
24
25public:
27
28 QDesignerFormWindowInterface *formWindow() const;
29 void setBackground(QWidget *background) override;
31
32public slots:
34 void widgetRemoved(QWidget *w) override;
35 void autoBuddy();
36
37protected:
38 QWidget *widgetAt(const QPoint &pos) const override;
39 Connection *createConnection(QWidget *source, QWidget *destination) override;
40 void endConnection(QWidget *target, const QPoint &pos) override;
41 void createContextMenu(QMenu &menu) override;
42
43private:
44 QWidget *findBuddy(QLabel *l, const QWidgetList &existingBuddies) const;
45
46 QPointer<QDesignerFormWindowInterface> m_formWindow;
47 bool m_updating;
48};
49
50} // namespace qdesigner_internal
51
52QT_END_NAMESPACE
53
54#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:421
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)