Konsole
Konsole::ViewContainer Class Reference
#include <ViewContainer.h>

Detailed Description
An interface for container widgets which can hold one or more views.The container widget typically displays a list of the views which it has and provides a means of switching between them.
Subclasses should reimplement the addViewWidget() and removeViewWidget() functions to actually add or remove view widgets from the container widget, as well as updating any navigation aids.
Definition at line 70 of file ViewContainer.h.
Member Enumeration Documentation
Enum describing extra UI features which can be provided by the container.
- Enumerator:
-
QuickNewView Provides a button which can be clicked to create new views quickly. When the button is clicked, a newViewRequest() signal is emitted.
QuickCloseView Provides a button which can be clicked to close views quickly.
Definition at line 225 of file ViewContainer.h.
This enum describes the directions in which views can be re-arranged within the container using the moveActiveView() method.
Definition at line 206 of file ViewContainer.h.
This enum describes the options for showing or hiding the container's navigation widget.
- Enumerator:
Definition at line 114 of file ViewContainer.h.
This enum describes the options for positioning the container's navigation widget.
- Enumerator:
Definition at line 80 of file ViewContainer.h.
Constructor & Destructor Documentation
ViewContainer::ViewContainer | ( | NavigationPosition | position, | |
QObject * | parent | |||
) |
Constructs a new view container with the specified parent.
- Parameters:
-
position The initial position of the navigation widget parent The parent object of the container
Definition at line 60 of file ViewContainer.cpp.
ViewContainer::~ViewContainer | ( | ) | [virtual] |
Called when the ViewContainer is destroyed.
When reimplementing this in subclasses, use object->deleteLater() to delete any widgets or other objects instead of 'delete object'.
Definition at line 66 of file ViewContainer.cpp.
Member Function Documentation
void ViewContainer::activateNextView | ( | ) |
void ViewContainer::activatePreviousView | ( | ) |
virtual QWidget* Konsole::ViewContainer::activeView | ( | ) | const [pure virtual] |
Returns the view which currently has the focus or 0 if none of the child views have the focus.
Implemented in Konsole::TabbedViewContainer, Konsole::TabbedViewContainerV2, Konsole::StackedViewContainer, and Konsole::ListViewContainer.
void Konsole::ViewContainer::activeViewChanged | ( | QWidget * | view | ) | [signal] |
Emitted when the active view changes.
void ViewContainer::addView | ( | QWidget * | view, | |
ViewProperties * | navigationItem, | |||
int | index = -1 | |||
) |
virtual void Konsole::ViewContainer::addViewWidget | ( | QWidget * | view, | |
int | index | |||
) | [protected, pure virtual] |
Performs the task of adding the view widget to the container widget.
Implemented in Konsole::TabbedViewContainer, Konsole::TabbedViewContainerV2, Konsole::StackedViewContainer, and Konsole::ListViewContainer.
void Konsole::ViewContainer::closeRequest | ( | QWidget * | activeView | ) | [signal] |
Emitted when the user requests to close a view.
virtual QWidget* Konsole::ViewContainer::containerWidget | ( | ) | const [pure virtual] |
Returns the widget which contains the view widgets.
Implemented in Konsole::TabbedViewContainer, Konsole::TabbedViewContainerV2, Konsole::StackedViewContainer, and Konsole::ListViewContainer.
void Konsole::ViewContainer::destroyed | ( | ViewContainer * | container | ) | [signal] |
Emitted when the container is deleted.
void Konsole::ViewContainer::duplicateRequest | ( | ViewProperties * | properties | ) | [signal] |
Emitted when the user requests to duplicate a view.
void Konsole::ViewContainer::empty | ( | ViewContainer * | container | ) | [signal] |
Emitted when the container has no more children.
ViewContainer::Features ViewContainer::features | ( | ) | const |
Returns a bitwise-OR of enabled extra UI features.
See setFeatures()
Definition at line 78 of file ViewContainer.cpp.
void ViewContainer::moveActiveView | ( | MoveDirection | direction | ) |
Moves the active view within the container and updates the order in which the views are shown in the container's navigation widget.
The default implementation does nothing.
Definition at line 80 of file ViewContainer.cpp.
void Konsole::ViewContainer::moveViewRequest | ( | int | index, | |
int | id, | |||
bool & | success | |||
) | [signal] |
Emitted when the user requests to move a view from another container into this container.
If 'success' is set to true by a connected slot then the original view will be removed.
- Parameters:
-
index Index at which to insert the new view in the container or -1 to append it. This index should be passed to addView() when the new view has been created. id The identifier of the view. success The slot handling this signal should set this to true if the new view was successfully created.
void ViewContainer::moveViewWidget | ( | int | fromIndex, | |
int | toIndex | |||
) | [protected, virtual] |
Rearranges the order of widgets in the container.
- Parameters:
-
fromIndex Current index of the widget to move toIndex New index for the widget
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 75 of file ViewContainer.cpp.
ViewContainer::NavigationDisplayMode ViewContainer::navigationDisplayMode | ( | ) | const |
Returns the current mode for controlling the visibility of the the view container's navigation widget.
Definition at line 126 of file ViewContainer.cpp.
virtual void Konsole::ViewContainer::navigationDisplayModeChanged | ( | NavigationDisplayMode | ) | [inline, protected, virtual] |
Called when the navigation display mode changes.
See setNavigationDisplayMode
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 306 of file ViewContainer.h.
ViewContainer::NavigationPosition ViewContainer::navigationPosition | ( | ) | const |
Returns the position of the navigation widget with respect to the main content area.
Definition at line 109 of file ViewContainer.cpp.
virtual void Konsole::ViewContainer::navigationPositionChanged | ( | NavigationPosition | ) | [inline, protected, virtual] |
Called when the navigation position changes to re-layout the container and place the navigation widget in the specified position.
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 313 of file ViewContainer.h.
void Konsole::ViewContainer::newViewRequest | ( | ) | [signal] |
Emitted when the user requests to open a new view.
void ViewContainer::removeView | ( | QWidget * | view | ) |
virtual void Konsole::ViewContainer::removeViewWidget | ( | QWidget * | view | ) | [protected, pure virtual] |
Performs the task of removing the view widget from the container widget.
Implemented in Konsole::TabbedViewContainer, Konsole::TabbedViewContainerV2, Konsole::StackedViewContainer, and Konsole::ListViewContainer.
virtual void Konsole::ViewContainer::setActiveView | ( | QWidget * | widget | ) | [pure virtual] |
Changes the focus to the specified view and updates navigation aids to reflect the change.
Implemented in Konsole::TabbedViewContainer, Konsole::TabbedViewContainerV2, Konsole::StackedViewContainer, and Konsole::ListViewContainer.
void ViewContainer::setFeatures | ( | Features | features | ) | [virtual] |
Sets which additional features are enabled in this container.
The default implementation does thing. Sub-classes should re-implement this to hide or show the relevant parts of their UI
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 76 of file ViewContainer.cpp.
void ViewContainer::setNavigationDisplayMode | ( | NavigationDisplayMode | mode | ) |
Definition at line 104 of file ViewContainer.cpp.
void ViewContainer::setNavigationPosition | ( | NavigationPosition | position | ) |
Sets the position of the navigation widget with respect to the main content area.
Depending on the ViewContainer subclass, not all positions from the NavigationPosition enum may be supported. A list of supported positions can be obtained by calling supportedNavigationPositions()
ViewContainer sub-classes should re-implement the navigationPositionChanged() method to respond to changes of this property.
Definition at line 113 of file ViewContainer.cpp.
virtual void Konsole::ViewContainer::setNewViewMenu | ( | QMenu * | menu | ) | [inline, virtual] |
Sets the menu to be shown when the new view button is clicked.
Only valid if the QuickNewView feature is enabled. The default implementation does nothing.
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 249 of file ViewContainer.h.
virtual Features Konsole::ViewContainer::supportedFeatures | ( | ) | const [inline, virtual] |
Returns a bitwise-OR of supported extra UI features.
The default implementation returns 0 (no extra features)
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 244 of file ViewContainer.h.
QList< ViewContainer::NavigationPosition > ViewContainer::supportedNavigationPositions | ( | ) | const [virtual] |
Returns the list of supported navigation positions.
The supported positions will depend upon the type of the navigation widget used by the ViewContainer subclass.
The base implementation returns one item, NavigationPositionTop
Reimplemented in Konsole::TabbedViewContainerV2.
Definition at line 122 of file ViewContainer.cpp.
void Konsole::ViewContainer::viewAdded | ( | QWidget * | view, | |
ViewProperties * | properties | |||
) | [signal] |
Emitted when a view is added to the container.
ViewProperties * ViewContainer::viewProperties | ( | QWidget * | view | ) |
Returns the ViewProperties instance associated with a particular view in the container.
Definition at line 221 of file ViewContainer.cpp.
void Konsole::ViewContainer::viewRemoved | ( | QWidget * | view | ) | [signal] |
Emitted when a view is removed from the container.
QList< QWidget * > ViewContainer::widgetsForItem | ( | ViewProperties * | item | ) | const [protected] |
Returns the widgets which are associated with a particular navigation item.
Definition at line 228 of file ViewContainer.cpp.
The documentation for this class was generated from the following files: