4#ifndef SIGNALSLOTEDITOR_P_H
5#define SIGNALSLOTEDITOR_P_H
18#include <QtCore/qstring.h>
19#include <QtCore/qstringlist.h>
20#include <QtCore/qlist.h>
21#include <QtCore/qpointer.h>
22#include <QtCore/qabstractitemmodel.h>
24#include <connectionedit_p.h>
28class QDesignerFormWindowInterface;
29class QDesignerFormEditorInterface;
39 explicit SignalSlotConnection(ConnectionEdit *edit, QWidget *source =
nullptr, QWidget *target =
nullptr);
42 void setSlot(
const QString &slot);
49 DomConnection *
toUi()
const;
60 QString m_signal, m_slot;
70 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
72 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
73 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
75 bool setData(
const QModelIndex &index,
const QVariant &data,
int role =
Qt::
DisplayRole)
override;
88 void connectionRemoved(
int idx);
90 void aboutToAddConnection(
int idx);
94 QPointer<SignalSlotEditor> m_editor;
bool showAllSignalsSlots() const
void setShowAllSignalsSlots(bool showIt)
static QString columnText(const SignalSlotConnection *con, int column)
QModelIndex parent(const QModelIndex &child) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Returns the index of the item in the model specified by the given row, column and parent index.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
const SignalSlotConnection * connectionAt(const QModelIndex &index) const
QModelIndex connectionToIndex(Connection *con) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns the data for the given role and section in the header with the specified orientation.
void setEditor(SignalSlotEditor *editor=nullptr)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
bool setData(const QModelIndex &index, const QVariant &data, int role=Qt::DisplayRole) override
Sets the role data for the item at index to value.
Connection * indexToConnection(const QModelIndex &index) const
void redo() override
Applies a change to the document.
ModifyConnectionCommand(QDesignerFormWindowInterface *form, SignalSlotConnection *conn, const QString &newSignal, const QString &newSlot)
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.
SetMemberCommand(SignalSlotConnection *con, EndPoint::Type type, const QString &member, SignalSlotEditor *editor)
void setSignal(const QString &signal)
void updateVisibility() override
SignalSlotConnection(ConnectionEdit *edit, QWidget *source=nullptr, QWidget *target=nullptr)
void setSlot(const QString &slot)
DomConnection * toUi() const
State isValid(const QWidget *background) const
virtual void setSlot(SignalSlotConnection *con, const QString &member)
virtual void setSignal(SignalSlotConnection *con, const QString &member)
void addEmptyConnection()
void setTarget(Connection *con, const QString &obj_name) override
void setSource(Connection *con, const QString &obj_name) override
Connection * createConnection(QWidget *source, QWidget *destination) override
DomConnections * toUi() const
void fromUi(const DomConnections *connections, QWidget *parent)
QWidget * widgetAt(const QPoint &pos) const override
QObject * objectByName(QWidget *topLevel, const QString &name) const
void modifyConnection(Connection *con) override
QDesignerFormWindowInterface * formWindow() const
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static bool skipWidget(const QWidget *w)
#define QT_SIGNALSLOTEDITOR_EXPORT