cutter/src/dialogs/NewFileDialog.h

66 lines
1.4 KiB
C
Raw Normal View History

#ifndef NEWFILEDIALOG_H
#define NEWFILEDIALOG_H
#include <QDialog>
#include <QListWidgetItem>
2017-10-02 09:41:28 +00:00
#include <memory>
2018-03-21 20:32:32 +00:00
namespace Ui {
class NewFileDialog;
}
class NewFileDialog : public QDialog
{
2018-03-21 20:32:32 +00:00
Q_OBJECT
public:
explicit NewFileDialog(QWidget *parent = nullptr);
~NewFileDialog();
private slots:
void on_loadFileButton_clicked();
void on_selectFileButton_clicked();
void on_selectProjectsDirButton_clicked();
void on_loadProjectButton_clicked();
void on_aboutButton_clicked();
void on_recentsListWidget_itemClicked(QListWidgetItem *item);
void on_recentsListWidget_itemDoubleClicked(QListWidgetItem *item);
void on_projectsListWidget_itemSelectionChanged();
void on_projectsListWidget_itemDoubleClicked(QListWidgetItem *item);
void on_actionRemove_item_triggered();
void on_actionClear_all_triggered();
void on_actionRemove_project_triggered();
2018-07-07 08:47:46 +00:00
void on_tabWidget_currentChanged(int index);
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
private:
2017-10-02 09:41:28 +00:00
std::unique_ptr<Ui::NewFileDialog> ui;
2017-04-01 11:20:13 +00:00
/*!
* @return true if list is not empty
*/
bool fillRecentFilesList();
/*!
* @return true if list is not empty
*/
bool fillProjectsList();
2018-07-07 09:27:13 +00:00
void fillIOPluginsList();
void loadFile(const QString &filename);
void loadProject(const QString &project);
2017-04-01 11:20:13 +00:00
static const int MaxRecentFiles = 5;
};
#endif // NEWFILEDIALOG_H