12#ifndef PLUGINIFDEMO_MAIN_H_
13#define PLUGINIFDEMO_MAIN_H_
17#include <QAbstractButton>
19#include <QAbstractListModel>
20#include <QSortFilterProxyModel>
21#include <QStandardItemModel>
46 QString
label()
const;
84 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
92 QVariant
data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const;
95 QList<PluginIfType> m_pluginIfTypes;
118 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const;
163 void on_buttonBox_clicked(QAbstractButton *button);
166 void on_btnSendButtonText_clicked();
169 void on_btnSendText_clicked();
172 void on_btnSendUpdateItem_clicked();
179 void on_chkTestCheckbox_stateChanged(
int newState);
186 void on_tabInterfaceTypes_currentChanged(
int newTab);
189 void on_btnAddItem_clicked();
192 void on_btnRemoveItem_clicked();
195 void on_btnSendList_clicked();
201 void on_cmbElements_currentTextChanged(
const QString &newText);
208 void on_lstItems_clicked(
const QModelIndex &idx);
211 void on_btnEnable_clicked();
214 void on_btnDisable_clicked();
220 void logChanged(QString message);
226 Ui::PluginIFDemo_Main *ui;
230 QStandardItemModel *listModel;
231 QStandardItemModel *indexModel;
Main dialog for the Plugin Interface Demo, providing interactive controls for exercising all ext_tool...
Definition pluginifdemo_main.h:136
~PluginIFDemo_Main()
Destroys the dialog and releases all associated resources.
Definition pluginifdemo_main.cpp:119
void setToolbar(ext_toolbar_t *&toolbar)
Associates an external toolbar with this dialog so that demo actions can drive toolbar state.
Definition pluginifdemo_main.cpp:124
Represents a single toolbar item type with an associated display label.
Definition pluginifdemo_main.h:33
QString label() const
Returns the display label for this item type.
Definition pluginifdemo_main.cpp:28
ext_toolbar_item_t itemType() const
Returns the toolbar item type constant for this entry.
Definition pluginifdemo_main.cpp:29
List model that exposes a collection of PluginIfType entries to Qt views.
Definition pluginifdemo_main.h:64
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows (entries) in the model.
Definition pluginifdemo_main.cpp:43
QVariant data(const QModelIndex &idx, int role=Qt::DisplayRole) const
Returns data for the given index and role.
Definition pluginifdemo_main.cpp:48
void addPluginIfType(const PluginIfType &pluginIfType)
Appends a PluginIfType entry to the model.
Definition pluginifdemo_main.cpp:36
Sort/filter proxy that restricts a PluginIfTypeModel to a single item type.
Definition pluginifdemo_main.h:103
void setFilterElement(ext_toolbar_item_t filterType)
Sets the item type to filter on; only rows matching this type will be shown.
Definition pluginifdemo_main.cpp:70
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
Determines whether the given source row should be included in the filtered view.
Definition pluginifdemo_main.cpp:83
ext_toolbar_item_t
Specifies the widget type for a toolbar control item.
Definition plugin_if.h:114