Layout for the preset and settings tables added
parent
0887f01bd4
commit
aa7c2910b2
|
|
@ -2,7 +2,7 @@ QT += core gui
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
TARGET = DofperPockerQt
|
TARGET = DofperPocketQT
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,31 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
|
||||||
mainWindow::mainWindow(QWidget *parent) : QMainWindow(parent)
|
mainWindow::mainWindow(QWidget *parent) :
|
||||||
|
QMainWindow(parent),
|
||||||
|
_presets(new QTableWidget),
|
||||||
|
_presetSettings(new QTableWidget)
|
||||||
{
|
{
|
||||||
|
QWidget *mainWidget = new QWidget(this);
|
||||||
|
QHBoxLayout *mainLayout = new QHBoxLayout(mainWidget);
|
||||||
|
|
||||||
|
_presets->setRowCount(128);
|
||||||
|
_presets->setColumnCount(1);
|
||||||
|
// _presets->setHorizontalHeaderLabels(c_str('Preset'));
|
||||||
|
_presets->horizontalHeader()->setVisible(false);
|
||||||
|
|
||||||
|
QStringList settingsList;
|
||||||
|
settingsList << "Channel" << "Description"<< "Type" << "Parameter";
|
||||||
|
_presetSettings->setRowCount(16);
|
||||||
|
_presetSettings->setColumnCount(4);
|
||||||
|
_presetSettings->setHorizontalHeaderLabels(settingsList);
|
||||||
|
|
||||||
|
|
||||||
|
mainLayout->addWidget(_presets);
|
||||||
|
mainLayout->addWidget(_presetSettings);
|
||||||
|
|
||||||
|
mainWidget->setLayout(mainLayout);
|
||||||
|
setCentralWidget(mainWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow::~mainWindow()
|
mainWindow::~mainWindow()
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,16 @@
|
||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
#include <QtWidgets>
|
||||||
|
#include <QTableWidget>
|
||||||
class mainWindow : public QMainWindow
|
class mainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
mainWindow(QWidget *parent = 0);
|
mainWindow(QWidget *parent = 0);
|
||||||
|
QTableWidget* _presets;
|
||||||
|
QTableWidget* _presetSettings;
|
||||||
|
|
||||||
~mainWindow();
|
~mainWindow();
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue