cutter/src/dialogs/NewFileDialog.h
nico fc6159c6b3 Remove the close button and put the About one under the cutter logo fix #289 (#313)
* removed cancelButton_clicked()
* removed NewFileDialog::on_cancelButton_clicked()
* removed cancel button and moved about button
2018-02-04 21:54:54 +01:00

63 lines
1.3 KiB
C++

#ifndef NEWFILEDIALOG_H
#define NEWFILEDIALOG_H
#include <QDialog>
#include <QListWidgetItem>
#include <memory>
namespace Ui
{
class NewFileDialog;
}
class NewFileDialog : public QDialog
{
Q_OBJECT
public:
explicit NewFileDialog(QWidget *parent = 0);
~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();
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
private:
std::unique_ptr<Ui::NewFileDialog> ui;
/*!
* @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);
static const int MaxRecentFiles = 5;
};
#endif // NEWFILEDIALOG_H