OfficeAssistant_Win10/OfficeAssistant_msvc/addapp.h

65 lines
1.1 KiB
C
Raw Normal View History

2023-08-18 19:09:55 +08:00
#pragma once
2023-08-13 12:16:22 +08:00
#include <QDialog>
#include <QLineEdit>
#include <QString>
#include <QPushButton>
#include <QFormLayout>
#include <QCheckBox>
#include <QLabel>
struct Record2;
#include "ui_addapp.h"
class AddApp : public QDialog
{
Q_OBJECT
public:
2023-08-18 19:09:55 +08:00
AddApp(bool isEdit = false, Record2 *row=nullptr,QWidget* parent = nullptr);
2023-08-13 12:16:22 +08:00
~AddApp();
QString get_exe_path()
{
return path_str;
}
QString get_orig_name()
{
return orig_name_str;
}
QString get_name()
{
return name_str;
}
QString get_sort()
{
return sort_str;
}
bool *get_categories()
{
return categories;
}
bool changed = false;
private:
Ui::AddAppClass ui;
QFormLayout *form;
bool *categories;
QPushButton *path;
QPushButton* submit_btn;
QLineEdit *name;
QLabel *name_label;
QLineEdit *orig_name;
QLineEdit *sort;
QMap<int,QCheckBox*> categories_list;
QString sort_str;
QString name_str;
QString orig_name_str;
QString path_str;
QVBoxLayout* layout_inner;
2023-08-15 20:12:36 +08:00
Record2 *row;
2023-08-13 12:16:22 +08:00
bool isEdit;
private slots:
void broswer_exe();
void submit();
};