various small code cleanups and improvements
Largely refactoring work to make the code somewhat nicer to work with.
This commit is contained in:
+23
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user