mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
添加Openssl,Gmssl加密库
This commit is contained in:
53
src/qt/MainApp.h
Normal file
53
src/qt/MainApp.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#include <QMainWindow>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class LabelPair
|
||||
{
|
||||
public:
|
||||
LabelPair(QWidget* parent, int x, int y, int w, int h)
|
||||
{
|
||||
title.setParent(parent);
|
||||
value.setParent(&title);
|
||||
|
||||
title.setGeometry(x, y, w, h);
|
||||
value.setGeometry(80, 0, w-80, h);
|
||||
|
||||
title.show();
|
||||
value.show();
|
||||
}
|
||||
|
||||
void setTitle(std::string text)
|
||||
{
|
||||
title.setText(text.c_str());
|
||||
}
|
||||
|
||||
void setValue(std::string text)
|
||||
{
|
||||
value.setText(text.c_str());
|
||||
}
|
||||
|
||||
QLabel title;
|
||||
QLabel value;
|
||||
};
|
||||
|
||||
class MainApp : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainApp();
|
||||
|
||||
void setMyLayout();
|
||||
|
||||
struct {
|
||||
std::shared_ptr<LabelPair> weburl {};
|
||||
} ui;
|
||||
|
||||
struct {
|
||||
std::shared_ptr<QGridLayout> main;
|
||||
} layout;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user