1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-11-09 09:46:18 +01:00
doorlockd-mirror/doorlockd/client/mainwindow.h

43 lines
751 B
C
Raw Normal View History

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