Commit 97444004 authored by Kai Koehne's avatar Kai Koehne

CppEditor: Beautify names in API

Rename method[Overview] to outline
parent df037e1f
This diff is collapsed.
......@@ -167,8 +167,8 @@ public:
bool isOutdated() const;
SemanticInfo semanticInfo() const;
CPlusPlus::OverviewModel *overviewModel() const;
QModelIndex overviewModelIndex();
CPlusPlus::OverviewModel *outlineModel() const;
QModelIndex outlineModelIndex();
virtual void paste(); // reimplemented from BaseTextEditor
virtual void cut(); // reimplemented from BaseTextEditor
......@@ -181,12 +181,12 @@ public:
bool isObjCEnabled() const;
Q_SIGNALS:
void overviewModelIndexChanged(const QModelIndex &index);
void outlineModelIndexChanged(const QModelIndex &index);
public Q_SLOTS:
virtual void setFontSettings(const TextEditor::FontSettings &);
virtual void setTabSettings(const TextEditor::TabSettings &);
void setSortedMethodOverview(bool sort);
void setSortedOutline(bool sort);
void switchDeclarationDefinition();
void jumpToDefinition();
void renameSymbolUnderCursor();
......@@ -221,11 +221,11 @@ protected:
private Q_SLOTS:
void updateFileName();
void jumpToMethod(int index);
void jumpToOutlineElement(int index);
void updateOutlineNow();
void updateMethodBoxIndex();
void updateMethodBoxIndexNow();
void updateMethodBoxToolTip();
void updateOutlineIndex();
void updateOutlineIndexNow();
void updateOutlineToolTip();
void updateUses();
void updateUsesNow();
void onDocumentUpdated(CPlusPlus::Document::Ptr doc);
......@@ -242,7 +242,7 @@ private:
void setShowWarningMessage(bool showWarningMessage);
void markSymbols(CPlusPlus::Symbol *canonicalSymbol, const SemanticInfo &info);
bool sortedMethodOverview() const;
bool sortedOutline() const;
CPlusPlus::Symbol *findDefinition(CPlusPlus::Symbol *symbol, const CPlusPlus::Snapshot &snapshot);
virtual void indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar);
virtual void indent(QTextDocument *doc, const QTextCursor &cursor, QChar typedChar);
......@@ -272,13 +272,13 @@ private:
CppTools::CppModelManagerInterface *m_modelManager;
QComboBox *m_methodCombo;
CPlusPlus::OverviewModel *m_overviewModel;
QModelIndex m_overviewModelIndex;
QComboBox *m_outlineCombo;
CPlusPlus::OverviewModel *m_outlineModel;
QModelIndex m_outlineModelIndex;
QSortFilterProxyModel *m_proxyModel;
QAction *m_sortAction;
QTimer *m_updateOutlineTimer;
QTimer *m_updateMethodBoxTimer;
QTimer *m_updateOutlineIndexTimer;
QTimer *m_updateUsesTimer;
QTextCharFormat m_occurrencesFormat;
QTextCharFormat m_occurrencesUnusedFormat;
......
......@@ -58,7 +58,7 @@ CppOutlineWidget::CppOutlineWidget(CPPEditor *editor) :
TextEditor::IOutlineWidget(),
m_editor(editor),
m_treeView(new CppOutlineTreeView(this)),
m_model(m_editor->overviewModel()),
m_model(m_editor->outlineModel()),
m_proxyModel(new CppOutlineFilterModel(m_model, this)),
m_enableCursorSync(true),
m_blockCursorSync(false)
......@@ -74,7 +74,7 @@ CppOutlineWidget::CppOutlineWidget(CPPEditor *editor) :
connect(m_model, SIGNAL(modelReset()), this, SLOT(modelUpdated()));
modelUpdated();
connect(m_editor, SIGNAL(overviewModelIndexChanged(QModelIndex)),
connect(m_editor, SIGNAL(outlineModelIndexChanged(QModelIndex)),
this, SLOT(updateSelectionInTree(QModelIndex)));
connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(updateSelectionInText(QItemSelection)));
......@@ -84,7 +84,7 @@ void CppOutlineWidget::setCursorSynchronization(bool syncWithCursor)
{
m_enableCursorSync = syncWithCursor;
if (m_enableCursorSync)
updateSelectionInTree(m_editor->overviewModelIndex());
updateSelectionInTree(m_editor->outlineModelIndex());
}
void CppOutlineWidget::modelUpdated()
......
......@@ -135,7 +135,7 @@ CppPlugin *CppPlugin::m_instance = 0;
CppPlugin::CppPlugin() :
m_actionHandler(0),
m_sortedMethodOverview(false),
m_sortedOutline(false),
m_renameSymbolUnderCursorAction(0),
m_findUsagesAction(0),
m_updateCodeModelAction(0)
......@@ -176,19 +176,19 @@ void CppPlugin::initializeEditor(CPPEditor *editor)
this, SLOT(quickFix(TextEditor::ITextEditable*)));
// method combo box sorting
connect(this, SIGNAL(methodOverviewSortingChanged(bool)),
editor, SLOT(setSortedMethodOverview(bool)));
connect(this, SIGNAL(outlineSortingChanged(bool)),
editor, SLOT(setSortedOutline(bool)));
}
void CppPlugin::setSortedMethodOverview(bool sorted)
void CppPlugin::setSortedOutline(bool sorted)
{
m_sortedMethodOverview = sorted;
emit methodOverviewSortingChanged(sorted);
m_sortedOutline = sorted;
emit outlineSortingChanged(sorted);
}
bool CppPlugin::sortedMethodOverview() const
bool CppPlugin::sortedOutline() const
{
return m_sortedMethodOverview;
return m_sortedOutline;
}
CppQuickFixCollector *CppPlugin::quickFixCollector() const
......@@ -308,12 +308,12 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
void CppPlugin::readSettings()
{
m_sortedMethodOverview = Core::ICore::instance()->settings()->value("CppTools/SortedMethodOverview", false).toBool();
m_sortedOutline = Core::ICore::instance()->settings()->value("CppTools/SortedMethodOverview", false).toBool();
}
void CppPlugin::writeSettings()
{
Core::ICore::instance()->settings()->setValue("CppTools/SortedMethodOverview", m_sortedMethodOverview);
Core::ICore::instance()->settings()->setValue("CppTools/SortedMethodOverview", m_sortedOutline);
}
void CppPlugin::extensionsInitialized()
......
......@@ -65,15 +65,15 @@ public:
// Connect editor to settings changed signals.
void initializeEditor(CPPEditor *editor);
bool sortedMethodOverview() const;
bool sortedOutline() const;
CppQuickFixCollector *quickFixCollector() const;
signals:
void methodOverviewSortingChanged(bool sort);
void outlineSortingChanged(bool sort);
public slots:
void setSortedMethodOverview(bool sorted);
void setSortedOutline(bool sorted);
private slots:
void switchDeclarationDefinition();
......@@ -93,7 +93,7 @@ private:
static CppPlugin *m_instance;
TextEditor::TextEditorActionHandler *m_actionHandler;
bool m_sortedMethodOverview;
bool m_sortedOutline;
QAction *m_renameSymbolUnderCursorAction;
QAction *m_findUsagesAction;
QAction *m_updateCodeModelAction;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment