1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-11-05 16:43:52 +01:00
doorlockd-mirror/doorlockd/client/mainwindow.h

45 lines
775 B
C
Raw Normal View History

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QApplication>
2015-09-29 02:13:48 +02:00
#include <QMainWindow>
#include <QStatusBar>
#include <QHBoxLayout>
#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()
{
_qrWidget = new QRWidget;
2015-09-29 02:13:48 +02:00
statusBar()->showMessage(tr("Boofar"));
2015-09-29 02:13:48 +02:00
QHBoxLayout *layout = new QHBoxLayout;
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:
QRWidget* _qrWidget = { nullptr };
};
#endif