various small code cleanups and improvements

Largely refactoring work to make the code somewhat nicer to work with.
This commit is contained in:
itsmattkc
2019-12-26 19:00:08 +11:00
parent 83077c939e
commit 61c60e00d6
87 changed files with 596 additions and 567 deletions
+23 -9
View File
@@ -30,6 +30,7 @@
#include "window/mainwindow/mainwindow.h"
#include "task/task.h"
#include "tool/tool.h"
#include "undo/undostack.h"
/**
* @brief The main central Olive application instance
@@ -51,6 +52,13 @@ public:
*/
Core();
/**
* @brief Core object accessible from anywhere in the code
*
* Use this to access Core functions.
*/
static Core* instance();
/**
* @brief Start Olive Core
*
@@ -74,6 +82,11 @@ public:
*/
MainWindow* main_window();
/**
* @brief Retrieve UndoStack object
*/
UndoStack* undo_stack();
/**
* @brief Import a list of files
*
@@ -290,18 +303,19 @@ private:
*/
QTimer autorecovery_timer_;
/**
* @brief Application-wide undo stack instance
*/
UndoStack undo_stack_;
/**
* @brief Static singleton core instance
*/
static Core instance_;
private slots:
void SaveAutorecovery();
};
namespace olive {
/**
* @brief Core object accessible from anywhere in the code
*
* Use this to access Core functions.
*/
extern Core core;
}
#endif // CORE_H