2017-03-29 10:18:37 +00:00
|
|
|
#ifndef NEWFILEDIALOG_H
|
|
|
|
#define NEWFILEDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QListWidgetItem>
|
2017-10-02 09:41:28 +00:00
|
|
|
#include <memory>
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-04-09 19:55:06 +00:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class NewFileDialog;
|
2017-03-29 10:18:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class NewFileDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit NewFileDialog(QWidget *parent = 0);
|
|
|
|
~NewFileDialog();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_loadFileButton_clicked();
|
2017-10-21 19:20:10 +00:00
|
|
|
void on_selectFileButton_clicked();
|
|
|
|
void on_createButton_clicked();
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-10-21 19:20:10 +00:00
|
|
|
void on_selectProjectsDirButton_clicked();
|
|
|
|
void on_loadProjectButton_clicked();
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-10-21 19:20:10 +00:00
|
|
|
void on_cancelButton_clicked();
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-10-21 19:20:10 +00:00
|
|
|
void on_recentsListWidget_itemClicked(QListWidgetItem *item);
|
|
|
|
void on_recentsListWidget_itemDoubleClicked(QListWidgetItem *item);
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-10-21 19:20:10 +00:00
|
|
|
void on_projectsListWidget_itemSelectionChanged();
|
|
|
|
void on_projectsListWidget_itemDoubleClicked(QListWidgetItem *item);
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
void on_actionRemove_item_triggered();
|
|
|
|
void on_actionClear_all_triggered();
|
|
|
|
|
|
|
|
private:
|
2017-10-02 09:41:28 +00:00
|
|
|
std::unique_ptr<Ui::NewFileDialog> ui;
|
2017-04-01 11:20:13 +00:00
|
|
|
|
2017-10-21 19:20:10 +00:00
|
|
|
/*!
|
|
|
|
* @return true if list is not empty
|
|
|
|
*/
|
|
|
|
bool fillRecentFilesList();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* @return true if list is not empty
|
|
|
|
*/
|
|
|
|
bool fillProjectsList();
|
|
|
|
|
|
|
|
void loadFile(const QString &filename);
|
|
|
|
void loadProject(const QString &project);
|
|
|
|
|
2017-04-01 11:20:13 +00:00
|
|
|
static const int MaxRecentFiles = 5;
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NEWFILEDIALOG_H
|