"Fossies" - the Fresh Open Source Software Archive

Member "cutter-1.10.3/src/CutterApplication.h" (8 May 2020, 1626 Bytes) of package /linux/privat/cutter-1.10.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "CutterApplication.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.10.2_vs_1.10.3.

    1 #ifndef CUTTERAPPLICATION_H
    2 #define CUTTERAPPLICATION_H
    3 
    4 #include <QEvent>
    5 #include <QApplication>
    6 #include <QList>
    7 #include <QProxyStyle>
    8 
    9 #include "core/MainWindow.h"
   10 
   11 enum class AutomaticAnalysisLevel {
   12     Ask, None, AAA, AAAA
   13 };
   14 
   15 struct CutterCommandLineOptions {
   16     QStringList args;
   17     AutomaticAnalysisLevel analLevel = AutomaticAnalysisLevel::Ask;
   18     InitialOptions fileOpenOptions;
   19     QString pythonHome;
   20     bool outputRedirectionEnabled = true;
   21     bool enableCutterPlugins = true;
   22     bool enableR2Plugins = true;
   23 };
   24 
   25 class CutterApplication : public QApplication
   26 {
   27     Q_OBJECT
   28 
   29 public:
   30     CutterApplication(int &argc, char **argv);
   31     ~CutterApplication();
   32 
   33     MainWindow *getMainWindow()
   34     {
   35         return mainWindow;
   36     }
   37 
   38     void launchNewInstance(const QStringList &args = {});
   39 protected:
   40     bool event(QEvent *e);
   41 
   42 private:
   43     /**
   44      * @brief Load and translations depending on Language settings
   45      * @return true on success
   46      */
   47     bool loadTranslations();
   48     /**
   49      * @brief Parse commandline options and store them in a structure.
   50      * @return false if options have error
   51      */
   52     bool parseCommandLineOptions();
   53 private:
   54     bool m_FileAlreadyDropped;
   55     MainWindow *mainWindow;
   56     CutterCommandLineOptions clOptions;
   57 };
   58 
   59 
   60 /**
   61  * @brief CutterProxyStyle is used to force shortcuts displaying in context menu
   62  */
   63 class CutterProxyStyle : public QProxyStyle
   64 {
   65     Q_OBJECT
   66 public:
   67     /**
   68      * @brief it is enough to get notification about QMenu polishing to force shortcut displaying
   69      */
   70     void polish(QWidget *widget) override;
   71 };
   72 
   73 #endif // CUTTERAPPLICATION_H