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
connectdialog_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
4#ifndef CONNECTDIALOG_H
5#define CONNECTDIALOG_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "ui_connectdialog.h"
19#include <QtWidgets/qdialog.h>
20
21QT_BEGIN_NAMESPACE
22
23class QDesignerFormWindowInterface;
24class QPushButton;
25
26namespace qdesigner_internal {
27
28class ConnectDialog : public QDialog
29{
31public:
33
34 QString signal() const;
35 QString slot() const;
36
37 void setSignalSlot(const QString &signal, const QString &slot);
38
39 bool showAllSignalsSlots() const;
40 void setShowAllSignalsSlots(bool showIt);
41
42private slots:
43 void populateLists();
44 void selectSignal(QListWidgetItem *item);
45 void selectSlot(QListWidgetItem *item);
46 void populateSignalList();
47 void populateSlotList(const QString &signal = QString());
48 void editSignals();
49 void editSlots();
50
51private:
52 enum WidgetMode { NormalWidget, MainContainer, PromotedWidget };
53
54 static WidgetMode widgetMode(QWidget *w, QDesignerFormWindowInterface *formWindow);
55 QPushButton *okButton();
56 void setOkButtonEnabled(bool);
57 void editSignalsSlots(QWidget *w, WidgetMode mode, int signalSlotDialogMode);
58
59 QWidget *m_source;
60 QWidget *m_destination;
61 const WidgetMode m_sourceMode;
62 const WidgetMode m_destinationMode;
63 QDesignerFormWindowInterface *m_formWindow;
64 QT_PREPEND_NAMESPACE(Ui)::ConnectDialog m_ui;
65};
66
67}
68
69QT_END_NAMESPACE
70
71#endif // CONNECTDIALOG_H
void setSignalSlot(const QString &signal, const QString &slot)
static QString widgetLabel(QDesignerFormEditorInterface *core, QWidget *widget)
static QString realClassName(QDesignerFormEditorInterface *core, QWidget *widget)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.