36 #include <QMainWindow>
37 #include <QItemDelegate>
38 #include <QTextBrowser>
39 #include <QListWidget>
45 #include <vici/test.h>
60 bool doneRegistration;
106 std::list< GTHWindowWidget *> widgets;
107 std::list< WidgetMgrClient * > clients;
146 virtual void showEvent ( QShowEvent * event );
150 VMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
165 virtual void showEvent ( QShowEvent * event );
168 VDialog(QWidget *parent = 0, Qt::WindowFlags f = 0 ) : QDialog(parent, f) {}
189 mutable bool editing;
196 const QStyleOptionViewItem &option,
197 const QModelIndex &index)
const;
200 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
203 void setModelData(QWidget *editor, QAbstractItemModel *model,
204 const QModelIndex &index)
const;
208 const QModelIndex & index )
const;
214 void commitAndCloseEditor();
235 explicit VEditList( QWidget *parent = 0 );
236 void append(
const std::vector< std::string > & );
237 std::vector< std::string >
getVals()
const;
240 virtual void addBlank(QListWidgetItem *);
241 virtual void changed(QListWidgetItem *it, QListWidgetItem *);
258 static int pixelsPerM;
261 static int ppm(
int m = 1);
277 std::unique_ptr< std::thread> thread;
306 void setText(
csr progName,
csr descr);
316 void openLink(
const QUrl & link );
Builds on QListWidget to provide better editing ability.
Definition: libgui.h:231
AboutDialog(QWidget *parent, csr progName, csr description)
Constructor.
Definition: libgui.cpp:438
void widgetsRealised()
Emitted when the widgets have been made visible.
A dialog class that automatically registers itself.
Definition: libgui.h:161
~VDialog()
Destructor.
Definition: libgui.h:171
void append(const std::vector< std::string > &)
Add list of strings.
Definition: libgui.cpp:310
virtual void startUp()
This is called to do things that require the widgets to have been realized.
Definition: libgui.h:140
Provide the interface between the GUI applications and the GUI Test Harness.
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
Notification that the shape of the owner has changed.
Definition: libgui.cpp:216
void setEditorData(QWidget *editor, const QModelIndex &index) const
Copy the data from the model to the editor.
Definition: libgui.cpp:194
A main window class that automatically registers itself.
Definition: libgui.h:131
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Create a QLineEdit for editing the item.
Definition: libgui.cpp:180
A standard About Vici dialog for the project.
Definition: libgui.h:300
WidgetType
List the types of widgets that we can interact with during testing.
Definition: gth.h:43
virtual void RegnFn(std::function< void(void *, gth::WidgetType, csr)> reg)
This may be called by the test harness to get pointers to the individual widgets. ...
Definition: libgui.cpp:466
void notifySignal()
This signal is emitted when an operating signal arrives.
VMainWindow(QWidget *parent=0, Qt::WindowFlags flags=0)
Constructor.
Definition: libgui.cpp:140
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Copy the data from the editor to the model.
Definition: libgui.cpp:203
virtual void changed(QListWidgetItem *it, QListWidgetItem *)
Called if a row has been changed.
Definition: libgui.cpp:284
VEditList(QWidget *parent=0)
Constructor.
Definition: libgui.cpp:239
void validationError(const QModelIndex &) const
This signal can be emitted if there is a validation error.
static int ppm(int m=1)
return the number of pixels for something m ems wide.
Definition: libgui.cpp:349
virtual void showEvent(QShowEvent *event)
Called when the dialog is shown.
Definition: libgui.cpp:164
A class to encapsulate measurements.
Definition: libgui.h:255
bool hasEditor() const
Check if delegate is in edit mode.
Definition: libgui.h:211
An item delegate that uses QLineEdit for editing list and table entries.
Definition: libgui.h:185
VDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
Definition: libgui.h:168
virtual void addBlank(QListWidgetItem *)
Add a blank row at the end.
Definition: libgui.cpp:258
const std::string & csr
short cut for string constants
Definition: vici.h:80
virtual void showEvent(QShowEvent *event)
Called when the window gets shown.
Definition: libgui.cpp:147
void emitSignal()
Called by signal handler when a signal arrives.
Definition: libgui.cpp:418
std::vector< std::string > getVals() const
Get the rows as std::strings.
Definition: libgui.cpp:327
ItemDelegate(QObject *parent=0)
Constructor.
Definition: libgui.cpp:173
A class to convert operating system signals into Qt signals.
Definition: libgui.h:273