]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiApplication.h
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiApplication.h
index c580f4a3eba2c33129fef5665a6d1a417c189384..57b37836c6a40c3e857a459549b8099819e78c30 100644 (file)
@@ -30,6 +30,10 @@ class BufferView;
 class ColorCache;
 class KeySymbol;
 
+namespace support {
+class FileName;
+}
+
 namespace frontend {
 
 class GuiView;
@@ -42,7 +46,7 @@ class Toolbars;
 /// The Qt main application class
 /**
 There should be only one instance of this class. No Qt object
-initialisation should be done before the instanciation of this class.
+initialisation should be done before the instantiation of this class.
 */
 class GuiApplication : public QApplication, public Application
 {
@@ -67,7 +71,6 @@ public:
        void registerSocketCallback(int fd, SocketCallback func);
        void unregisterSocketCallback(int fd);
        bool searchMenu(FuncRequest const & func, docstring_list & names) const;
-       docstring iconName(FuncRequest const & f, bool unknown);
        void handleKeyFunc(FuncCode action);
        //@}
 
@@ -118,7 +121,7 @@ public:
        void setCurrentView(GuiView * view) { current_view_ = view; }
        ///
        QList<int> viewIds() const;
-       
+
        /// Clear all session information.
        void clearSession();
 
@@ -166,6 +169,14 @@ public:
        ///             not the current buffer
        void gotoBookmark(unsigned int idx, bool openFile, bool switchToBuffer);
 
+       /// Start a long operation with some cancel possibility (button or ESC)
+       void startLongOperation();
+       /// This needs to be periodically called to avoid freezing the GUI
+       bool longOperationCancelled();
+       /// Stop the long operation mode (i.e., release the GUI)
+       void stopLongOperation();
+       /// A started long operation is still in progress ?
+       bool longOperationStarted();
 private Q_SLOTS:
        ///
        void execBatchCommands();
@@ -179,11 +190,23 @@ private Q_SLOTS:
        void slotProcessFuncRequestQueue() { processFuncRequestQueue(); }
 
 private:
+       ///
+       void validateCurrentView();
+       ///
+       void updateCurrentView(FuncRequest const & cmd, DispatchResult & dr);
        ///
        bool closeAllViews();
        /// read the given ui (menu/toolbar) file
        bool readUIFile(QString const & name, bool include = false);
        ///
+       enum ReturnValues {
+               ReadOK,
+               ReadError,
+               FormatMismatch
+       };
+       ///
+       ReturnValues readUIFile(support::FileName);
+       ///
        void setGuiLanguage();
        ///
        void reconfigure(std::string const & option);