33 lines
1 KiB
C
33 lines
1 KiB
C
|
#pragma once
|
||
|
#include <QWidget>
|
||
|
#include <QTextBrowser>
|
||
|
#include <string>
|
||
|
#include <QListView>
|
||
|
#include <QAbstractListModel>
|
||
|
#include <QList>
|
||
|
#include <QBoxLayout>
|
||
|
#include <QSplitter>
|
||
|
#include <QLabel>
|
||
|
#include <license.hpp>
|
||
|
|
||
|
class LicenseModel : public QAbstractListModel {
|
||
|
Q_OBJECT;
|
||
|
std::vector<LicenseData> licenseData;
|
||
|
public:
|
||
|
~LicenseModel() override;
|
||
|
Q_INVOKABLE Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||
|
Q_INVOKABLE QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
||
|
Q_INVOKABLE QModelIndex parent(const QModelIndex &child) const override;
|
||
|
Q_INVOKABLE int rowCount(const QModelIndex &parent) const override;
|
||
|
Q_INVOKABLE int columnCount(const QModelIndex &parent) const override;
|
||
|
Q_INVOKABLE QVariant data(const QModelIndex &index, int role) const override;
|
||
|
LicenseModel();
|
||
|
};
|
||
|
class AboutWindow : public QWidget {
|
||
|
Q_OBJECT;
|
||
|
public:
|
||
|
QListView *license_list;
|
||
|
QTextBrowser *license_text;
|
||
|
public:
|
||
|
AboutWindow();
|
||
|
};
|