Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/executablefileopendialog_p.h
Show All 30 Lines | |||||
31 | { | 31 | { | ||
32 | Q_OBJECT | 32 | Q_OBJECT | ||
33 | 33 | | |||
34 | public: | 34 | public: | ||
35 | enum ReturnCode { | 35 | enum ReturnCode { | ||
36 | OpenFile = 42, ExecuteFile | 36 | OpenFile = 42, ExecuteFile | ||
37 | }; | 37 | }; | ||
38 | 38 | | |||
39 | | ||||
40 | enum Mode { | ||||
41 | // For executable scripts | ||||
42 | OpenOrExecute, | ||||
43 | // For native binary executables | ||||
44 | OnlyExecute, | ||||
45 | // For *.exe files, open with WINE is like execute the file | ||||
46 | // In this case, openAsExecute is true, we hide "Open" button and connect | ||||
47 | // "Execute" button to OpenFile action. | ||||
48 | OpenAsExecute | ||||
49 | }; | ||||
50 | | ||||
51 | explicit ExecutableFileOpenDialog(Mode mode, QWidget* parent = nullptr); | ||||
39 | explicit ExecutableFileOpenDialog(QWidget* parent = nullptr); | 52 | explicit ExecutableFileOpenDialog(QWidget* parent = nullptr); | ||
40 | 53 | | |||
41 | bool isDontAskAgainChecked() const; | 54 | bool isDontAskAgainChecked() const; | ||
42 | 55 | | |||
43 | private: | 56 | private: | ||
44 | QCheckBox *m_dontAskAgain; | 57 | QCheckBox *m_dontAskAgain; | ||
45 | }; | 58 | }; | ||
46 | 59 | | |||
47 | #endif // EXECUTABLEFILEOPENDIALOG_H | 60 | #endif // EXECUTABLEFILEOPENDIALOG_H |