editormanager: style

Change-Id: I3536ba31d8be8bcd8330fb7b4174a6ae3cd95cb5
Reviewed-on: http://codereview.qt.nokia.com/4214
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-09-02 19:11:10 +02:00
committed by hjk
parent 38298bf229
commit 9447f903ba
2 changed files with 272 additions and 270 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -105,7 +105,7 @@ public:
explicit EditorManager(ICore *core, QWidget *parent); explicit EditorManager(ICore *core, QWidget *parent);
virtual ~EditorManager(); virtual ~EditorManager();
void init(); void init();
static EditorManager *instance() { return m_instance; } static EditorManager *instance();
static EditorToolBar *createToolBar(QWidget *parent = 0); static EditorToolBar *createToolBar(QWidget *parent = 0);
@@ -140,7 +140,7 @@ public:
void activateEditor(IEditor *editor, OpenEditorFlags flags = 0); void activateEditor(IEditor *editor, OpenEditorFlags flags = 0);
void activateEditorForIndex(const QModelIndex &index, OpenEditorFlags = 0); void activateEditorForIndex(const QModelIndex &index, OpenEditorFlags = 0);
IEditor *activateEditorForFile(Core::Internal::EditorView *view, Core::IFile*file, OpenEditorFlags flags = 0); IEditor *activateEditorForFile(Internal::EditorView *view, IFile *file, OpenEditorFlags flags = 0);
OpenEditorsModel *openedEditorsModel() const; OpenEditorsModel *openedEditorsModel() const;
void closeEditor(const QModelIndex &index); void closeEditor(const QModelIndex &index);
@@ -248,30 +248,29 @@ private:
void restoreEditorState(IEditor *editor); void restoreEditorState(IEditor *editor);
IEditor *placeEditor(Core::Internal::EditorView *view, Core::IEditor *editor); IEditor *placeEditor(Internal::EditorView *view, IEditor *editor);
Core::IEditor *duplicateEditor(IEditor *editor); IEditor *duplicateEditor(IEditor *editor);
void setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory = false); void setCurrentEditor(IEditor *editor, bool ignoreNavigationHistory = false);
void setCurrentView(Core::Internal::SplitterOrView *view); void setCurrentView(Internal::SplitterOrView *view);
IEditor *activateEditor(Core::Internal::EditorView *view, Core::IEditor *editor, OpenEditorFlags flags = 0); IEditor *activateEditor(Internal::EditorView *view, IEditor *editor, OpenEditorFlags flags = 0);
void activateEditorForIndex(Internal::EditorView *view, const QModelIndex &index, OpenEditorFlags = 0); void activateEditorForIndex(Internal::EditorView *view, const QModelIndex &index, OpenEditorFlags = 0);
IEditor *openEditor(Core::Internal::EditorView *view, const QString &fileName, IEditor *openEditor(Internal::EditorView *view, const QString &fileName,
const QString &editorId = QString(), const QString &editorId = QString(),
OpenEditorFlags flags = 0, OpenEditorFlags flags = 0,
bool *newEditor = 0); bool *newEditor = 0);
Core::Internal::SplitterOrView *currentSplitterOrView() const; Internal::SplitterOrView *currentSplitterOrView() const;
void closeEditor(Core::IEditor *editor); void closeEditor(IEditor *editor);
void closeDuplicate(Core::IEditor *editor); void closeDuplicate(IEditor *editor);
void closeView(Core::Internal::EditorView *view); void closeView(Internal::EditorView *view);
void emptyView(Core::Internal::EditorView *view); void emptyView(Internal::EditorView *view);
Core::Internal::EditorView *currentEditorView() const; Internal::EditorView *currentEditorView() const;
IEditor *pickUnusedEditor() const; IEditor *pickUnusedEditor() const;
void addFileToRecentFiles(IFile *file); void addFileToRecentFiles(IFile *file);
void switchToPreferedMode(); void switchToPreferedMode();
void updateAutoSave(); void updateAutoSave();
static EditorManager *m_instance; EditorManagerPrivate *d;
EditorManagerPrivate *m_d;
friend class Core::Internal::SplitterOrView; friend class Core::Internal::SplitterOrView;
friend class Core::Internal::EditorView; friend class Core::Internal::EditorView;
@@ -281,4 +280,5 @@ private:
} // namespace Core } // namespace Core
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::EditorManager::OpenEditorFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(Core::EditorManager::OpenEditorFlags)
#endif // EDITORMANAGER_H #endif // EDITORMANAGER_H