You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.1 KiB
C++

#ifndef CMAINWINDOW_H
#define CMAINWINDOW_H
#include "csplashscreen.h"
#include <QMainWindow>
#include <QCloseEvent>
#include <QStandardItemModel>
#include <QMimeDatabase>
QT_BEGIN_NAMESPACE
namespace Ui { class cMainWindow; }
QT_END_NAMESPACE
class cMainWindow : public QMainWindow
{
Q_OBJECT
public:
cMainWindow(cSplashScreen* lpSplashScreen, QWidget *parent = nullptr);
~cMainWindow();
private:
Ui::cMainWindow* ui;
cSplashScreen* m_lpSplashScreen; /*!< TODO: describe */
QStandardItemModel* m_lpFileListModel;
QMimeDatabase m_mimeDB;
void initUI();
void createActions();
void createFileActions();
void createContextActions();
void addPath(const QString& path);
void addFile(const QString& file);
bool isInList(const QString& file);
private slots:
void onAddFile();
void onAddFolder();
void onRemoveSelected();
void onClearList();
void onConvert();
void onAddEntry(const QString& file);
protected:
void closeEvent(QCloseEvent* event);
};
#endif // CMAINWINDOW_H