2015-09-28 17:05:05 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QApplication>
|
2015-09-29 14:55:20 +02:00
|
|
|
#include <QHBoxLayout>
|
2015-09-29 02:13:48 +02:00
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QStatusBar>
|
2015-09-28 17:05:05 +02:00
|
|
|
|
|
|
|
#include "qrwidget.h"
|
|
|
|
|
2015-09-29 02:13:48 +02:00
|
|
|
class MainWindow : public QMainWindow
|
2015-09-28 17:05:05 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
MainWindow() :
|
2015-09-29 02:13:48 +02:00
|
|
|
QMainWindow()
|
2015-09-28 17:05:05 +02:00
|
|
|
{
|
2015-09-29 14:55:20 +02:00
|
|
|
layout = new QHBoxLayout;
|
2015-09-28 17:05:05 +02:00
|
|
|
|
2015-09-29 14:55:20 +02:00
|
|
|
_qrWidget = new QRWidget;
|
2015-09-29 02:13:48 +02:00
|
|
|
layout->addWidget(_qrWidget);
|
2015-09-28 17:05:05 +02:00
|
|
|
|
2015-09-29 02:13:48 +02:00
|
|
|
QWidget* window = new QWidget;
|
|
|
|
window->setLayout(layout);
|
|
|
|
|
|
|
|
setCentralWidget(window);
|
2015-09-28 17:05:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
MainWindow(const MainWindow&);
|
|
|
|
MainWindow& operator =(const MainWindow&);
|
|
|
|
|
2015-09-29 02:13:48 +02:00
|
|
|
void setQRCode(const std::string &str)
|
2015-09-28 17:05:05 +02:00
|
|
|
{
|
|
|
|
_qrWidget->setQRData(str);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2015-09-29 14:55:20 +02:00
|
|
|
QHBoxLayout* layout = { nullptr };
|
2015-09-28 17:05:05 +02:00
|
|
|
QRWidget* _qrWidget = { nullptr };
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|