CuteLogger
Fast and simple logging solution for Qt based applications
newprojectfolder.h
1 /*
2  * Copyright (c) 2018-2019 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 
27 namespace Ui {
28 class NewProjectFolder;
29 }
30 
31 class QAction;
32 class QActionGroup;
33 
34 class NewProjectFolder : public QWidget
35 {
36  Q_OBJECT
37 
38 public:
39  explicit NewProjectFolder(QWidget* parent = 0);
40  ~NewProjectFolder();
41 
42 protected:
43  void showEvent(QShowEvent*);
44  void hideEvent(QHideEvent*);
45  bool event(QEvent* event);
46 
47 private slots:
48  void on_projectsFolderButton_clicked();
49 
50  void on_videoModeButton_clicked();
51 
52  void onProfileTriggered(QAction* action);
53 
54  void on_actionAddCustomProfile_triggered();
55 
56  void on_actionProfileRemove_triggered();
57 
58  void on_startButton_clicked();
59 
60  void on_projectNameLineEdit_textChanged(const QString& arg1);
61 
62  void on_recentListView_clicked(const QModelIndex& index);
63 
64  void on_recentListView_doubleClicked(const QModelIndex& index);
65 
66 private:
67  void setColors();
68  void setProjectFolderButtonText(const QString& text);
69 
70  Ui::NewProjectFolder *ui;
71  QActionGroup* m_profileGroup;
72  QMenu m_videoModeMenu;
73  QMenu* m_customProfileMenu;
74  QString m_profile;
75  QStandardItemModel m_model;
76  QString m_projectName;
77 };
78 
79 #endif // NEWPROJECTFOLDER_H