#ifndef QWIZARDREPORT_H#define QWIZARDREPORT_H#include <QWizard>#include <QtGui>#include "qtreecheckable.h"class QWizardReport : public QWizard{Q_OBJECTpublic: explicit QWizardReport(QWidget *parent = 0); QWizardReport(QWidget *parent, QStringList tables_list, QStringList objects_list, QStringList fields_list); QWizardPage* createIntroPage(); QWizardPage* createSelectTablePage(); QStringList tablesList; QStringList objectsList; QStringList fieldsList; QStringList outObjectsList; QStringList outFieldsList; QStringList outTablesList; QStringList outAverageList; QStringList outOrderList; QStringList queues; QTreeCheckable * fieldsTree; QTreeCheckable * averageTree; QTreeCheckable* criterionTree; QPushButton* clearButton; QString outQueue; QGroupBox *createFieldsGroup(); QGroupBox *createStatisticGroup(); QGroupBox *createOrderGroup(); QGroupBox* fieldsBox; QGroupBox* statisticsBox; QGroupBox* orderBox; void saveSQL(QString query, QString path);signals: void refreshLists();public slots: void createWidgets(); void setObjectList(QStringList list); void setFieldsList(QStringList list); void setTablesList(QStringList list); void refreshListSlot(); void createQueue();};#endif // QWIZARDREPORT_H
void QWizardReport::createWidgets(){ clearButton = new QPushButton; fieldsTree = new QTreeCheckable; averageTree = new QTreeCheckable; criterionTree = new QTreeCheckable; fieldsBox = new QGroupBox; statisticsBox = new QGroupBox; orderBox = new QGroupBox; clearButton->setText("Clear");}
QTreeWidget::~QTreeWidget(){}
#ifndef QWIZARDREPORT_H#define QWIZARDREPORT_H#include <QWizard>#include <QtGui>#include "qtreecheckable.h"class QWizardReport : public QWizard
#include <QtGui> #include "window.h" Window::Window(QWidget *parent) : QWidget(parent) { QGridLayout *grid = new QGridLayout; grid->addWidget(createFirstExclusiveGroup(), 0, 0); grid->addWidget(createSecondExclusiveGroup(), 1, 0); grid->addWidget(createNonExclusiveGroup(), 0, 1); grid->addWidget(createPushButtonGroup(), 1, 1); setLayout(grid); setWindowTitle(tr("Group Boxes")); resize(480, 320); } QGroupBox *Window::createFirstExclusiveGroup() { QGroupBox *groupBox = new QGroupBox(tr("Exclusive Radio Buttons")); QRadioButton *radio1 = new QRadioButton(tr("&Radio button 1")); QRadioButton *radio2 = new QRadioButton(tr("R&adio button 2")); QRadioButton *radio3 = new QRadioButton(tr("Ra&dio button 3")); radio1->setChecked(true); QVBoxLayout *vbox = new QVBoxLayout; vbox->addWidget(radio1); vbox->addWidget(radio2); vbox->addWidget(radio3); vbox->addStretch(1); groupBox->setLayout(vbox); return groupBox; }