]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiApplication.h
Fix handling of the add branch textfield in GuiBranches
[lyx.git] / src / frontends / qt4 / GuiApplication.h
index cd4f1caa79bbd287d212f3d10a42997d2890449e..d1a10784b8bf4c476e04590919a30ade0468aaa5 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();
 
@@ -144,10 +147,21 @@ public:
        /// return the status bar state string
        docstring viewStatusMessage();
 
-       /// add a func request to the queue for later procession
-       void addtoFuncRequestQueue(FuncRequest const &);
-       /// process the func request in the queue asynchronously
+       /// \name Methods to process FuncRequests
+       //@{
+       /// process the func request
+       void processFuncRequest(FuncRequest const &);
+       /// add a func request to the queue and process it asynchronously
+       /// \note As a side-effect this will also process the
+       /// func requests that were added to the queue before.
+       void processFuncRequestAsync(FuncRequest const &);
+       /// process the func requests in the queue
+       void processFuncRequestQueue();
+       /// process the func requests in the queue asynchronously
        void processFuncRequestQueueAsync();
+       /// add a func request to the queue for later processing
+       void addToFuncRequestQueue(FuncRequest const &);
+       //@}
 
        /// goto a bookmark
        /// openFile: whether or not open a file if the file is not opened
@@ -165,19 +179,27 @@ private Q_SLOTS:
        ///
        void onLastWindowClosed();
        ///
-       void processFuncRequestQueue();
+       void slotProcessFuncRequestQueue() { processFuncRequestQueue(); }
 
 private:
+       ///
+       void validateCurrentView();
        ///
        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);
-       /// add a func request to the queue and process it asynchronously
-       void dispatchDelayed(FuncRequest const &);
 
        /// This GuiView is the one receiving Clipboard and Selection
        /// events