Use "tool view" over "toolview" in UI/comments, CamelCase term in code

parent b1793437
......@@ -33,7 +33,7 @@ Platform consists of
- common plugins, ie those that could be useful for other applications than just KDevelop
.
- outputview
- allows plugins to easily implement toolviews that show line-by-line output. for example make build output.
- allows plugins to easily implement tool views that show line-by-line output. for example make build output.
.
- vcs
- central & distributed version control library
......@@ -284,24 +284,24 @@ If KDevelop::Language object for given mimetype already exists, it is used and n
KDevelop::UiController is closely connected to the Sublime UI and basically is an subclass of
\ref Sublime::Controller which will be explained later.
The main job of UiController is to allow plugins to manager their views and toolviews. Currently only
toolviews can be added and removed.
The main job of UiController is to allow plugins to manager their views and tool views. Currently only
tool views can be added and removed.
Sublime UI wants plugins to add and remove not actual toolviews, but factories to create them.
This is because user can request from Sublime UI to show a new toolview at any time. For example,
it is possible to have more than one Konsole toolviews. The user just have to ask for them.
Automatically factory will be used only once, when UI controller is asked to add a toolview.
This means for example that only one Konsole toolview will be opened automatically.
Sublime UI wants plugins to add and remove not actual tool views, but factories to create them.
This is because user can request from Sublime UI to show a new tool view at any time. For example,
it is possible to have more than one Konsole tool views. The user just have to ask for them.
Automatically factory will be used only once, when UI controller is asked to add a tool view.
This means for example that only one Konsole tool view will be opened automatically.
To create a factory, a plugin needs to subclass KDevelop::IToolViewFactory and implement two methods:
- virtual QWidget* KDevelop::IToolViewFactory::create(QWidget *parent = 0)
where the actual toolview widget will be created
where the actual tool view widget will be created
- virtual Qt::DockWidgetArea KDevelop::IToolViewFactory::defaultPosition(const QString &areaName)
which will give the UI a hint on where to place the toolview
which will give the UI a hint on where to place the tool view
.
Once the factory is ready, it has to be added to the UiController using IUiController::addToolView() method.
It is not absolutely necessary for a plugin to remove or delete toolview factory. UiController will
It is not absolutely necessary for a plugin to remove or delete the tool view factory. UiController will
delete them all upon unload.
NOTE: temporarily IUiController has KDevelop::IUiController::openUrl() method which is the only
......@@ -352,7 +352,7 @@ way to open files in KDevelop until DocumentController is ported.
- user interface design area \n
(like Qt designer)
- Area configuration includes code editor windows (unlike eclipse)
- Each area can be displayed in usual Qt mainwindow with toolviews in dockwidgets
- Each area can be displayed in usual Qt mainwindow with tool views in dockwidgets
- Areas are shown in separate mainwindows so that multiple-monitor setups become the best supported
- One area can be shown in two and more mainwindows by "cloning" the area \n
(unlike Eclipse that pretends that two mainwindows show the same area)
......@@ -360,7 +360,7 @@ way to open files in KDevelop until DocumentController is ported.
(like in Eclipse), but this mode of operation is currently not implemented. \n
Also Sublime was not optimized for this use-case. See wiki pages for a detailed discussion and
explanation of possible problems.
- It is possible to open as many similar toolviews as necessary (for example, several konsole's)
- It is possible to open as many similar tool views as necessary (for example, several konsole's)
- It is possible to open several views for the same file in code editor view (unlike KDevelop 3.x)
- Instead of tabs for editor windows a "switcher" is provided. \n
Currently the switcher is a combobox but that will change for sure.
......@@ -373,9 +373,9 @@ documents, and controlls mainwindows. \n
Sublime::Controller::showArea() is the only way to show an area in the mainwindow.
Sublime::MainWindow is just a KParts::MainWindow which knows how to "reconstruct" the area
and react on area changes. Additionally it knows which view and toolview is "active" (i.e. last focused).
and react on area changes. Additionally it knows which view and tool view is "active" (i.e. last focused).
Sublime::Area is the object that controls views, toolviews, and defines their placement
Sublime::Area is the object that controls views, tool views, and defines their placement
inside the mainwindow. Provides various view management (e.g. add/remove/etc.) methods and signals.
Also Area is responsible for storing and restoring the view layout (on-disk storage is not
implemented currently).
......
......@@ -44,8 +44,8 @@ public:
**/
enum TestJobVerbosity
{
Silent, ///< No toolview is raised by the job
Verbose ///< The job raises an output toolview
Silent, ///< No tool view is raised by the job
Verbose ///< The job raises an output tool view
};
/**
......
......@@ -43,29 +43,29 @@ class KDEVPLATFORMINTERFACES_EXPORT IToolViewFactory {
public:
virtual ~IToolViewFactory() {}
/**
* called to create a new widget for this toolview
* called to create a new widget for this tool view
* @param parent the parent to use as parent for the widget
* @returns the new widget for the toolview
* @returns the new widget for the tool view
*/
virtual QWidget* create(QWidget *parent = nullptr) = 0;
/**
* @returns the identifier of this toolview. The identifier
* @returns the identifier of this tool view. The identifier
* is used to remember which areas the tool view should appear
* in, and must never change.
*/
virtual QString id() const = 0;
/**
* @returns the default position where this toolview should appear
* @returns the default position where this tool view should appear
*/
virtual Qt::DockWidgetArea defaultPosition() = 0;
/**
* Fetch a list of actions to add to the toolbar of the toolview @p view
* Fetch a list of actions to add to the toolbar of the tool view @p view
* @param viewWidget the view to which the actions should be added
* @returns a list of actions to be added to the toolbar
*/
virtual QList<QAction*> toolBarActions( QWidget* viewWidget ) const { return viewWidget->actions(); }
/**
* Fetch a list of actions to be shown in the context menu of the toolview @p view.
* Fetch a list of actions to be shown in the context menu of the tool view @p view.
* The default implementation will return all actions of @p viewWidget.
*
* @param viewWidget the view for which the context menu should be shown
......@@ -87,7 +87,7 @@ public:
/**
*
* Allows to access various parts of the user-interface, like the toolviews or the mainwindow
* Allows to access various parts of the user-interface, like the tool views or the mainwindow
*/
class KDEVPLATFORMINTERFACES_EXPORT IUiController {
public:
......@@ -115,7 +115,7 @@ public:
virtual QWidget* findToolView(const QString& name, IToolViewFactory *factory, FindFlags flags = CreateAndRaise) = 0;
/**
* Makes sure that the toolview that contains the widget @p toolViewWidget is visible to the user.
* Makes sure that the tool view that contains the widget @p toolViewWidget is visible to the user.
*/
virtual void raiseToolView(QWidget* toolViewWidget) = 0;
......
......@@ -62,8 +62,8 @@ public:
enum ViewType
{
OneView = 0 /**< there's only one outputview, newly registered outputs will replace existing ones */,
HistoryView = 1 /**< The toolview will have a history with forward/backward buttons */,
MultipleView = 2 /**< show multiples outputs in a toolview at the same time */
HistoryView = 1 /**< The tool view will have a history with forward/backward buttons */,
MultipleView = 2 /**< show multiples outputs in a tool view at the same time */
};
enum StandardToolView
......@@ -78,22 +78,22 @@ public:
virtual ~IOutputView();
/**
* fetch the identifier for one of the standard toolviews
* This will automatically create the toolview if it doesn't exist yet
* @param view the standard toolview to get the identifier for
* @returns the identifier for the standard toolview
* Fetch the identifier for one of the standard tool views.
* This will automatically create the tool view if it doesn't exist yet
* @param view the standard tool view to get the identifier for
* @returns the identifier for the standard tool view
*/
virtual int standardToolView( StandardToolView view ) = 0;
/**
* Register a new toolview for output with the given title, behaviour and type
* If there already exists a toolview with this title and type return the existing id
* @param title the Title to be displayed on the toolview
* Register a new tool view for output with the given title, behaviour and type.
* If there already exists a tool view with this title and type return the existing id
* @param title the Title to be displayed on the tool view
* @param type the type of view that should be created
* @param icon the icon of the toolview
* @param option the options of the toolview
* @param icon the icon of the tool view
* @param option the options of the tool view
* @param actionList list of actions adding to the toolbar
* @returns an toolview id that identifies the new view and is used in the other
* @returns an tool view id that identifies the new view and is used in the other
* methods
*/
virtual int registerToolView( const QString& title, ViewType type = OneView,
......@@ -101,14 +101,14 @@ public:
const QList<QAction*>& actionList = QList<QAction*>()) = 0;
/**
* Register a new output view in a given toolview. How this new view is created depends
* on the type of the toolview.
* @param toolviewId the id of the toolview, created by registerToolView
* @param title the title to use for the new output in the toolview
* Register a new output view in a given tool view. How this new view is created depends
* on the type of the tool view.
* @param toolViewId the id of the tool view, created by registerToolView
* @param title the title to use for the new output in the tool view
* @param behaviour the Behaviour of the output
* @returns the id of the output to supply to the other methods
*/
virtual int registerOutputInToolView( int toolviewId, const QString& title,
virtual int registerOutputInToolView( int toolViewId, const QString& title,
Behaviours behaviour = AllowUserClose ) = 0;
/**
......@@ -141,14 +141,14 @@ public:
virtual void setTitle( int outputId, const QString& title ) = 0;
/**
* remove a toolview, don't forget to emit toolViewRemoved when you implement this
* Remove a tool view, don't forget to emit toolViewRemoved when you implement this.
*
* @param toolviewId identifies the view to remove
* @param toolViewId identifies the view to remove
*/
virtual void removeToolView( int toolviewId ) = 0;
virtual void removeToolView(int toolViewId) = 0;
/**
* remove an output view from a toolview. Don't forget to emit outputRemoved
* Remove an output view from a tool view. Don't forget to emit outputRemoved
* when you implement this.
* @param outputId the id of the outputview to remove
*/
......@@ -156,19 +156,19 @@ public:
Q_SIGNALS:
/**
* emitted after a toolview was removed
* Emitted after a tool view was removed.
*
* @param toolviewId identifies the removed toolview
* @param toolViewId identifies the removed tool view
*/
void toolViewRemoved( int toolviewId );
void toolViewRemoved(int toolViewId);
/**
* emitted after a toolview was removed
* Emitted after a tool view was removed.
*
* @param toolviewId identifies the removed toolview
* @param toolViewId identifies the removed tool view
* @param outputId identifies the removed output
*/
void outputRemoved( int toolviewId, int outputId );
void outputRemoved(int toolViewId, int outputId);
};
} // namespace KDevelop
......
......@@ -350,7 +350,7 @@ void OutputExecuteJob::childProcessError( QProcess::ProcessError processError )
break;
}
// Show the toolview if it's hidden for the user to be able to diagnose errors.
// Show the tool view if it's hidden for the user to be able to diagnose errors.
if( !d->m_outputStarted ) {
d->m_outputStarted = true;
startOutput();
......
......@@ -53,7 +53,7 @@ AreaDisplay::AreaDisplay(KDevelop::MainWindow* parent)
m_button = new QToolButton(this);
m_button->setToolTip(i18n(
"Execute actions to change the area.<br />"
"An area is a toolview configuration for a specific use case. "
"An area is a tool view configuration for a specific use case. "
"From here you can also navigate back to the default code area."));
m_button->setAutoRaise(true);
m_button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
......
......@@ -56,7 +56,7 @@ public:
void initialize();
void cleanup();
/// Must be called by debugger plugin that needs debugger actions and toolviews.
/// Must be called by debugger plugin that needs debugger actions and tool views.
void initializeUi() override;
void addSession(IDebugSession* session) override;
......
......@@ -222,13 +222,13 @@ void KDevelop::DocumentationController::showDocumentation(const IDocumentation::
{
QWidget* w = ICore::self()->uiController()->findToolView(i18n("Documentation"), m_factory, KDevelop::IUiController::CreateAndRaise);
if(!w) {
qCWarning(SHELL) << "Could not add documentation toolview";
qCWarning(SHELL) << "Could not add documentation tool view";
return;
}
DocumentationView* view = dynamic_cast<DocumentationView*>(w);
if( !view ) {
qCWarning(SHELL) << "Could not cast toolview" << w << "to DocumentationView class!";
qCWarning(SHELL) << "Could not cast tool view" << w << "to DocumentationView class!";
return;
}
view->showDocumentation(doc);
......
......@@ -68,7 +68,7 @@ class ToolViewFactory;
/**
* This HACK is required to massage the KTextEditor plugin API into the
* GUI concepts we apply in KDevelop. Kate does not allow the user to
* delete toolviews and then readd them. We do. To support our use case
* delete tool views and then readd them. We do. To support our use case
* we prevent the widget we return to KTextEditor plugins from
* MainWindow::createToolView from getting destroyed. This widget class
* unsets the parent of the so called container in its dtor. The
......@@ -159,7 +159,7 @@ private:
KeepAliveWidget::~KeepAliveWidget()
{
// if the container is still valid, unparent it to prevent it from getting deleted
// this happens when the user removes a toolview
// this happens when the user removes a tool view
// on shutdown, the container does get deleted, thus we must guard against that.
if (m_factory->container()) {
Q_ASSERT(m_factory->container()->parentWidget() == this);
......
......@@ -117,7 +117,7 @@ public:
private:
QPointer<KTextEditor::Plugin> m_plugin;
// view objects and toolviews that should get deleted when the plugin gets unloaded
// view objects and tool views that should get deleted when the plugin gets unloaded
KDevelop::ObjectListTracker *m_tracker;
};
......
......@@ -131,19 +131,19 @@ void TestKTextEditorPluginIntegration::testMainWindow()
// we reuse the same view
QWidget parent;
auto kdevToolview = makeQPointer(factory->create(&parent));
QCOMPARE(kdevToolview->parentWidget(), &parent);
QCOMPARE(toolView->parentWidget(), kdevToolview.data());
auto kdevToolView = makeQPointer(factory->create(&parent));
QCOMPARE(kdevToolView->parentWidget(), &parent);
QCOMPARE(toolView->parentWidget(), kdevToolView.data());
// the children are kept alive when the toolview gets destroyed
delete kdevToolview;
// the children are kept alive when the tool view gets destroyed
delete kdevToolView;
QVERIFY(toolView);
kdevToolview = factory->create(&parent);
// and we reuse the ktexteditor toolview for the new kdevelop toolview
QCOMPARE(toolView->parentWidget(), kdevToolview.data());
kdevToolView = factory->create(&parent);
// and we reuse the ktexteditor tool view for the new kdevelop tool view
QCOMPARE(toolView->parentWidget(), kdevToolView.data());
delete toolView;
delete kdevToolview;
delete kdevToolView;
delete plugin;
QVERIFY(!findToolView(id));
......
......@@ -205,7 +205,7 @@ private Q_SLOTS:
void addNewToolViewByDoubleClick(const QModelIndex& index)
{
QListWidgetItem *item = itemFromIndex(index);
// Disable item so that the toolview can not be added again.
// Disable item so that the tool view can not be added again.
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
emit addNewToolView(m_mw, item);
}
......@@ -448,7 +448,7 @@ void UiController::selectNewToolViewToAdd(MainWindow *mw)
ViewSelectorItem *item = new ViewSelectorItem(it.value()->title(), list);
item->factory = it.key();
if (!item->factory->allowMultiple() && toolViewPresent(it.value(), mw->area())) {
// Disable item if the toolview is already present.
// Disable item if the tool view is already present.
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
}
list->addItem(item);
......@@ -615,7 +615,7 @@ void UiController::loadAllAreas(const KSharedConfigPtr& config)
QList<Sublime::Area*> changedAreas;
/* Offer all toolviews to the default areas. */
/* Offer all tool views to the default areas. */
foreach (Sublime::Area *area, defaultAreas())
{
QHash<IToolViewFactory*, Sublime::ToolDocument*>::const_iterator i, e;
......@@ -658,7 +658,7 @@ void UiController::loadAllAreas(const KSharedConfigPtr& config)
loadArea(area, areaConfig);
}
// At this point we know which toolviews the area wants.
// At this point we know which tool views the area wants.
// Tender all tool views we have.
QHash<IToolViewFactory*, Sublime::ToolDocument*>::const_iterator i, e;
for (i = d->factoryDocuments.constBegin(),
......
......@@ -121,7 +121,7 @@ Area::Area(const Area &area)
{
setObjectName(area.objectName());
//clone toolviews
//clone tool views
d->toolViews.clear();
foreach (View *view, area.toolViews())
addToolView(view->document()->createView(), area.toolViewPosition(view));
......
......@@ -39,7 +39,7 @@ class View;
/**
@short Area - the universal view container
Area contains views and toolviews, knows about their positions
Area contains views and tool views, knows about their positions
and provides functionality to add new (tool)views and remove existing.
Area takes care of all placement/configuration details so that
......@@ -138,20 +138,20 @@ public:
method will never return 0.*/
RootAreaIndex *rootIndex() const;
/**Adds the toolview to the area. Area will use its configuration and restore
the proper position for the toolview when necessary. If it has no configuration
/**Adds the tool view to the area. Area will use its configuration and restore
the proper position for the tool view when necessary. If it has no configuration
for this view, it will use @p defaultPosition.*/
void addToolView(View *toolView, Position defaultPosition);
/**Removes the toolview from the area.*/
/**Removes the tool view from the area.*/
View* removeToolView(View *toolView);
/**Moves the toolview to a different position. */
/**Moves the tool view to a different position. */
void moveToolView(View *toolView, Position newPosition);
/**Raise tool view.*/
void raiseToolView(View *toolView);
/**@return the list of toolviews in the area. No particular sort order is guaranteed.*/
/**@return the list of tool views in the area. No particular sort order is guaranteed.*/
QList<View*> &toolViews() const;
/**@return the current position of @p toolView in the area.*/
Position toolViewPosition(View *toolView) const;
......@@ -183,7 +183,7 @@ public:
/**Walker mode to determine the behavior of area walkers.*/
enum WalkerMode {
StopWalker, /**< Stop after processing this area index or toolview */
StopWalker, /**< Stop after processing this area index or tool view */
ContinueWalker /**< Continue walking */
};
......@@ -209,7 +209,7 @@ public:
template <typename Operator>
void walkViews(Operator &op, AreaIndex *index);
/**Walks the list of toolviews. The order in which toolviews are walked is not specified.
/**Walks the list of tool views. The order in which tool views are walked is not specified.
Operator should be the class with <i>bool operator()(View *view, Sublime::Position position)</i>
method. That method should return Area::StopWalker if the walker has to stop at current index
......@@ -250,13 +250,13 @@ Q_SIGNALS:
void aboutToRemoveView(Sublime::AreaIndex*, Sublime::View*);
/**Emitted when a view was removed from the area.*/
void viewRemoved(Sublime::AreaIndex*, Sublime::View*);
/**Emitted when a new toolview is added to the area.*/
/**Emitted when a new tool view is added to the area.*/
void toolViewAdded(Sublime::View*, Sublime::Position);
/**Emitted when a toolview is requesting to be raised.*/
/**Emitted when a tool view is requesting to be raised.*/
void requestToolViewRaise(Sublime::View*);
/**Emitted when a toolview is going to be removed from the area.*/
/**Emitted when a tool view is going to be removed from the area.*/
void aboutToRemoveToolView(Sublime::View*, Sublime::Position);
/**Emitted when a toolview is moved to a different position.*/
/**Emitted when a tool view is moved to a different position.*/
void toolViewMoved(Sublime::View*, Sublime::Position);
/**Emitted before the working-set is changed.*/
void changingWorkingSet(Sublime::Area* area, QString from, QString to);
......
......@@ -296,10 +296,10 @@ Area* Controller::areaForView(View* view) const
return nullptr;
}
/*We need this to catch activation of views and toolviews
so that we can always tell what view and toolview is active.
/*We need this to catch activation of views and tool views
so that we can always tell what view and tool view is active.
"Active" doesn't mean focused. It means that it is focused now
or was focused before and no other view/toolview wasn't focused
or was focused before and no other view/tool view wasn't focused
after that."*/
//implementation is based upon KParts::PartManager::eventFilter
bool Controller::eventFilter(QObject *obj, QEvent *ev)
......@@ -349,7 +349,7 @@ bool Controller::eventFilter(QObject *obj, QEvent *ev)
return false;
}
//find this widget in toolviews
//find this widget in tool views
ToolWidgetFinder toolFinder(w);
area->walkToolViews(toolFinder, Sublime::AllPositions);
if (toolFinder.view && toolFinder.view != mw->activeToolView())
......
......@@ -45,8 +45,8 @@ on the following assumptions:
and be able to switch each main window between those "area types". For
example, to switch main window between "Code" and "Debug"
2. It's also desirable to save the state of area -- like the set of toolviews,
position of toolviews, etc. This need to be done per-main window, so that
2. It's also desirable to save the state of area -- like the set of tool views,
position of tool views, etc. This need to be done per-main window, so that
"code" area of one window is allowed to be different from "code" area
of another window.
......
......@@ -44,7 +44,7 @@ Example1Main::Example1Main()
Sublime::Document *doc2 = new Sublime::UrlDocument(m_controller, QUrl::fromLocalFile(QStringLiteral("~/boo.cpp")));
Sublime::Document *doc3 = new Sublime::UrlDocument(m_controller, QUrl::fromLocalFile(QStringLiteral("~/moo.cpp")));
//documents for toolviews
//documents for tool views
Sublime::Document *tool1 = new Sublime::ToolDocument(QStringLiteral("ListView"), m_controller,
new Sublime::SimpleToolWidgetFactory<QListView>(QStringLiteral("ListView")));
Sublime::Document *tool2 = new Sublime::ToolDocument(QStringLiteral("TextEdit"), m_controller,
......
......@@ -51,7 +51,7 @@ public:
setToolTip(i18n("Toggle '%1' tool view.", title));
setText(title);
//restore toolview shortcut config
//restore tool view shortcut config
KConfigGroup config = KSharedConfig::openConfig()->group("UI");
QStringList shortcutStrings = config.readEntry(QStringLiteral("Shortcut for %1").arg(title), QStringList());
setShortcuts({ QKeySequence::fromString(shortcutStrings.value(0)), QKeySequence::fromString(shortcutStrings.value(1)) });
......
......@@ -81,7 +81,7 @@ IdealController::IdealController(Sublime::MainWindow* mainWindow):
void IdealController::addView(Qt::DockWidgetArea area, View* view)
{
IdealDockWidget *dock = new IdealDockWidget(this, m_mainWindow);
// dock object name is used to store toolview settings
// dock object name is used to store tool view settings
QString dockObjectName = view->document()->title();
// support different configuration for same docks opened in different areas
if (m_mainWindow->area())
......@@ -155,7 +155,7 @@ void IdealController::dockLocationChanged(Qt::DockWidgetArea area)
// this event can happen even when dock changes its location within the same area
// usecases:
// 1) user drags to the same area
// 2) user rearranges toolviews inside the same area
// 2) user rearranges tool views inside the same area
// 3) state restoration shows the dock widget
// in 3rd case we need to show dock if we don't want it to be shown
......@@ -187,7 +187,7 @@ void IdealController::dockLocationChanged(Qt::DockWidgetArea area)
}
lastDockWidget[area] = dock;
// after drag, the toolview loses focus, so focus it again
// after drag, the tool view loses focus, so focus it again
dock->setFocus(Qt::ShortcutFocusReason);
m_docks->addAction(action);
......@@ -233,10 +233,10 @@ void IdealController::raiseView(View* view, RaiseMode mode)
/// @todo GroupWithOtherViews is disabled for now by forcing "mode = HideOtherViews".
/// for the release of KDevelop 4.3.
/// Reason: Inherent bugs which need significant changes to be fixed.
/// Example: Open two equal toolviews (for example 2x konsole),
/// Example: Open two equal tool views (for example 2x konsole),
/// activate one, switch area, switch back, -> Both are active instead of one.
/// The problem is that views are identified purely by their factory-id, which is equal
/// for toolviews of the same type.
/// for tool views of the same type.
mode = HideOtherViews;
QAction* action = m_view_to_action.value(view);
......@@ -247,7 +247,7 @@ void IdealController::raiseView(View* view, RaiseMode mode)
action->setProperty("raise", mode);
action->setChecked(true);
// TODO: adymo: hack: focus needs to stay inside the previously
// focused widget (setChecked will focus the toolview)
// focused widget (setChecked will focus the tool view)
if (focusWidget)
focusWidget->setFocus(Qt::ShortcutFocusReason);
}
......@@ -330,7 +330,7 @@ void IdealController::removeView(View* view, bool nondestructive)
QWidget *viewParent = view->widget()->parentWidget();
IdealDockWidget *dock = qobject_cast<IdealDockWidget *>(viewParent);
if (!dock) { // toolviews with a toolbar live in a QMainWindow which lives in a Dock
if (!dock) { // tool views with a toolbar live in a QMainWindow which lives in a Dock
Q_ASSERT(qobject_cast<QMainWindow*>(viewParent));
viewParent = viewParent->parentWidget();
dock = qobject_cast<IdealDockWidget*>(viewParent);
......@@ -405,7 +405,7 @@ void IdealController::showDock(Qt::DockWidgetArea area, bool show)
if (!show) {
hideDocks(bar);
} else {
// open the last opened toolview (or the first one) and focus it
// open the last opened tool view (or the first one) and focus it
if (lastDock) {
if (QAction *action = m_dockwidget_to_action.value(lastDock))
action->setChecked(show);
......
......@@ -111,14 +111,14 @@ void IdealDockWidget::contextMenuRequested(const QPoint &point)
}
/// start position menu
QMenu* positionMenu = menu.addMenu(i18n("Toolview Position"));
QMenu* positionMenu = menu.addMenu(i18n("Tool View Position"));
QActionGroup* g = new QActionGroup(positionMenu);
QAction *left = new QAction(i18nc("toolview position", "Left"), g);
QAction *bottom = new QAction(i18nc("toolview position", "Bottom"), g);
QAction *right = new QAction(i18nc("toolview position", "Right"), g);
QAction *detach = new QAction(i18nc("toolview position", "Detached"), g);
QAction *left = new QAction(i18nc("tool view position", "Left"), g);
QAction *bottom = new QAction(i18nc("tool view position", "Bottom"), g);
QAction *right = new QAction(i18nc("tool view position", "Right"), g);
QAction *detach = new QAction(i18nc("tool view position", "Detached"), g);
for (auto action : {left, bottom, right, detach}) {
positionMenu->addAction(action);
......@@ -137,10 +137,10 @@ void IdealDockWidget::contextMenuRequested(const QPoint &point)
menu.addSeparator();
QAction *setShortcut = menu.addAction(QIcon::fromTheme(QStringLiteral("configure-shortcuts")), i18n("Assign Shortcut..."));
setShortcut->setToolTip(i18n("Use this shortcut to trigger visibility of the toolview."));
setShortcut->setToolTip(i18n("Use this shortcut to trigger visibility of the tool view."));
menu.addSeparator();
QAction* remove = menu.addAction(QIcon::fromTheme(QStringLiteral("dialog-close")), i18n("Remove Toolview"));
QAction* remove = menu.addAction(QIcon::fromTheme(QStringLiteral("dialog-close")), i18n("Remove Tool View"));
QAction* triggered = menu.exec(senderWidget->mapToGlobal(point));
......
......@@ -146,7 +146,7 @@ void MainWindow::setArea(Area *area)
void MainWindow::initializeStatusBar()
{
//nothing here, reimplement in the subclasses if you want to have status bar
//inside the bottom toolview buttons row
//inside the bottom tool view buttons row
}
void MainWindow::resizeEvent(QResizeEvent* event)
......
......@@ -37,7 +37,7 @@ class MainWindowOperator;
/**
@short Sublime Main Window
The area-enabled mainwindow to show Sublime views and toolviews.
The area-enabled mainwindow to show Sublime views and tool views.
To use, a controller and constructed areas are necessary:
@code
......@@ -52,7 +52,7 @@ public:
explicit MainWindow(Controller *controller, Qt::WindowFlags flags = {});
~MainWindow() override;
/**@return the list of dockwidgets that contain area's toolviews.*/
/**@return the list of dockwidgets that contain area's tool views.*/
QList<View*> toolDocks() const;
/**@return area which mainwindow currently shows or 0 if no area has been set.*/
Area *area() const;
......@@ -61,7 +61,7 @@ public:
/**@return active view inside this mainwindow.*/
View *activeView() const;
/**@return active toolview inside this mainwindow.*/
/**@return active tool view inside this mainwindow.*/
View *activeToolView() const;
/**Enable saving of per-area UI settings (like toolbar properties
......@@ -121,7 +121,7 @@ Q_SIGNALS:
void areaChanged(Sublime::Area*);
/**Emitted when the active view is changed.*/
void activeViewChanged(Sublime::View*);
/**Emitted when the active toolview is changed.*/
/**Emitted when the active tool view is changed.*/
void activeToolViewChanged(Sublime::View*);
/**Emitted when the user interface settings have changed.*/
void settingsLoaded();
......@@ -162,7 +162,7 @@ private:
void clearArea();
/**Sets the active view.*/
void setActiveView(Sublime::View* view, bool focus = true);
/**Sets the active toolview and focuses it.*/
/**Sets the active tool view and focuses it.*/
void setActiveToolView(View *view);
void resizeEvent(QResizeEvent* event) override;
......
......@@ -466,7 +466,7 @@ void MainWindowPrivate::clearArea()
if(m_leftTabbarCornerWidget)
m_leftTabbarCornerWidget->setParent(nullptr);
//reparent toolview widgets to 0 to prevent their deletion together with dockwidgets
//reparent tool view widgets to nullptr to prevent their deletion together with dockwidgets
foreach (View *view, area->toolViews())
{
// FIXME should we really delete here??
......
......@@ -42,7 +42,7 @@ protected:
/**Sets the active view for the mainwindow and focuses it.*/
void setActiveView(MainWindow *w, View *view);
/**Sets the active toolview for the mainwindow and focuses it.*/
/**Sets the active tool view for the mainwindow and focuses it.*/
void setActiveToolView(MainWindow *w, View *view);
};
......
......@@ -31,15 +31,15 @@
namespace Sublime {
/**Positions for toolviews in Sublime UI. To combine them, use
/**Positions for tool views in Sublime UI. To combine them, use
Positions class (QFlags based).*/
enum Position
{
Left = 1 /**< left toolview position */,
Right = 2 /**< right toolview position */,
Top = 4 /**< top toolview position */,
Bottom = 8 /**< bottom toolview position */,
AllPositions = Left|Right|Top|Bottom /**< all toolview positions */
Left = 1 /**< left tool view position */,
Right = 2 /**< right tool view position */,
Top = 4 /**< top tool view position */,
Bottom = 8 /**< bottom tool view position */,
AllPositions = Left|Right|Top|Bottom /**< all tool view positions */
};