Documentation for OpenFLUID 2.2.2
Loading...
Searching...
No Matches
WareSrcExplorer.hpp
Go to the documentation of this file.
1/*
2
3 This file is part of OpenFLUID software
4 Copyright(c) 2021-2026, INRAE
5
6
7 == GNU General Public License Usage ==
8
9 OpenFLUID is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OpenFLUID is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21
22
23 == Other Usage ==
24
25 Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26 license, and requires a written agreement between You and INRA.
27 Licensees for Other Usage of OpenFLUID may use this file in accordance
28 with the terms contained in the written agreement between You and INRA.
29
30 */
31
32/**
33 @file WareSrcExplorer.hpp
34 @brief Header of ...
35
36 @author Aline LIBRES <aline.libres@gmail.com>
37 */
38
39
40#ifndef __OPENFLUID_UIWARESDEV_WARESRCEXPLORER_HPP__
41#define __OPENFLUID_UIWARESDEV_WARESRCEXPLORER_HPP__
42
43
44#include <QTreeView>
45#include <QContextMenuEvent>
46
48
49
50namespace openfluid { namespace ui { namespace waresdev {
51
52
53class WareSrcExplorerModel;
54
55
56class OPENFLUID_API WareSrcExplorer: public QTreeView
57{
58 Q_OBJECT
59
60
61 private slots:
62
63 void onDoubleClicked(const QModelIndex& Index);
64
65 void onClicked(const QModelIndex& Index);
66
67 void onCurrentChanged(const QModelIndex& Current);
68
69 void createFragment(std::string WarePath, std::string FragmentID, bool IsFileCreation);
70
71 void onOpenExplorerAsked();
72
73 void onOpenTerminalAsked();
74
75 void onOpenExternalToolAsked();
76
77 void onCopyFullPathAsked();
78
79 void onCopyRelativePathAsked();
80
81 void scrollToCurrent();
82
83 void onCustomContextMenuRequested(const QPoint& Point);
84
85 void onNewFileAsked();
86
87 void onNewFolderAsked();
88
89 void onNewFragmentAsked();
90
91 void onRemoteFragmentAsked();
92
93 void onFragmentRemovalAsked();
94
95 void onDeleteFolderAsked();
96
97 void onDeleteFileAsked();
98
99 void onGitInitAsked();
100
101 void onGitStatusAsked();
102
103 void onGitLogAsked();
104
105
106 private:
107
108 WareSrcExplorerModel* mp_Model;
109
110 QString m_TopDirectoryPath;
111
112 QString getCurrentDir();
113
114
115 signals:
116
117 void doubleClicked(const QString& FilePath);
118
119 void clicked(const QString& FilePath);
120
121 void fileOpeningAsked(const QString& FilePath);
122
123 void currentChanged(const QString& FilePath);
124
125 void openExplorerAsked(const QString& FilePath);
126
127 void openTerminalAsked(const QString& FilePath);
128
129 void openExternalToolAsked(const QString& FilePath, const QString& Command);
130
131 void openPathAsked(const QString& FilePath);
132
134
136
137 void fileDeleted(const QString& Path);
138
139 void folderDeleted(const QString& WarePath, const QString& FolderPath, const bool Confirm);
140
141 void wareChanged(const QString& WarePath);
142
143
144 public:
145
146 explicit WareSrcExplorer(QWidget* Parent = nullptr);
147
149
150 void configure(const QString& TopDirectoryPath, bool WithContextMenu);
151
152 bool setCurrentPath(const QString& Path);
153
154 QString getCurrentPath();
155
156 QString getWarePath();
157
158 void updateExplorerModel(const QString& Path);
159
160};
161
162
163} } } // namespaces
164
165
166#endif /* __OPENFLUID_UIWARESDEV_WARESRCEXPLORER_HPP__ */
Definition WareSrcExplorerModel.hpp:57
Definition WareSrcExplorer.hpp:57
void openExternalToolAsked(const QString &FilePath, const QString &Command)
void clicked(const QString &FilePath)
void updateExplorerModel(const QString &Path)
void configure(const QString &TopDirectoryPath, bool WithContextMenu)
void fileOpeningAsked(const QString &FilePath)
bool setCurrentPath(const QString &Path)
WareSrcExplorer(QWidget *Parent=nullptr)
void openExplorerAsked(const QString &FilePath)
void folderDeleted(const QString &WarePath, const QString &FolderPath, const bool Confirm)
void wareChanged(const QString &WarePath)
void currentChanged(const QString &FilePath)
void openTerminalAsked(const QString &FilePath)
void fileDeleted(const QString &Path)
void doubleClicked(const QString &FilePath)
void openPathAsked(const QString &FilePath)
#define OPENFLUID_API
Definition dllexport.hpp:86
Definition ApplicationException.hpp:47