CuteLogger
Fast and simple logging solution for Qt based applications
newprojectfolder.h
1/*
2 * Copyright (c) 2018-2020 Meltytech, LLC
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef NEWPROJECTFOLDER_H
19#define NEWPROJECTFOLDER_H
20
21#include <QWidget>
22#include <QModelIndex>
23#include <QStandardItemModel>
24#include <QMenu>
25#include <QString>
26
27namespace Ui {
28class NewProjectFolder;
29}
30
31class QAction;
32class QActionGroup;
33
34class NewProjectFolder : public QWidget
35{
36 Q_OBJECT
37
38public:
39 explicit NewProjectFolder(QWidget *parent = 0);
40 ~NewProjectFolder();
41
42protected:
43 void showEvent(QShowEvent *);
44 void hideEvent(QHideEvent *);
45 bool event(QEvent *event);
46
47public slots:
48 void updateRecentProjects();
49
50private slots:
51 void on_projectsFolderButton_clicked();
52
53 void on_videoModeButton_clicked();
54
55 void onProfileTriggered(QAction *action);
56
57 void on_actionAddCustomProfile_triggered();
58
59 void on_actionProfileRemove_triggered();
60
61 void on_startButton_clicked();
62
63 void on_projectNameLineEdit_textChanged(const QString &arg1);
64
65 void on_recentListView_clicked(const QModelIndex &index);
66
67 void on_recentListView_doubleClicked(const QModelIndex &index);
68
69private:
70 void setColors();
71 void setProjectFolderButtonText(const QString &text);
72
73 Ui::NewProjectFolder *ui;
74 QActionGroup *m_profileGroup;
75 QMenu m_videoModeMenu;
76 QMenu *m_customProfileMenu;
77 QString m_profile;
78 QStandardItemModel m_model;
79 QString m_projectName;
80 bool m_isOpening;
81};
82
83#endif // NEWPROJECTFOLDER_H