Provides the base interface for Logger Application gui components. More...
Inheritance diagram for MAKLogger::DtLgrGuiComponent:
Collaboration diagram for MAKLogger::DtLgrGuiComponent:Public Slots | |
| virtual void | update ()=0 |
| Called repeatedly by the host application in the GUI thread. | |
Public Member Functions | |
| virtual | ~DtLgrGuiComponent () |
| Default Destructor. | |
| virtual void | startTimer (QObject *parent) |
| Called to start the update timer. | |
| virtual void | stopTimer () |
| Called to stop the update timer. | |
| virtual QWidget * | initialize (QWidget *parent)=0 |
| This method is called when the logger Gui has been initialized. | |
| virtual void | activate ()=0 |
| This method is called when the component is shown. | |
| virtual void | deactivate ()=0 |
| This method is called when the component is hidden. | |
| virtual bool | canExit () const |
| This method provides a way for components to control whether the application can quit. | |
| virtual bool | canCloseFile () const |
| This method provides a way for components to control whether the application can close a file. | |
| virtual double | updateTime ()=0 |
| Returns the desired times between updates in seconds. | |
| virtual QWidget * | container () |
| Get the container widget. | |
| virtual void | setContainer (QWidget *widget) |
| Sets the container. | |
| virtual const QIcon & | iconSet () const |
| Get an optional icon set. By default returns null QIconSet. | |
| virtual void | setIconSet (const QIcon &iconSet) |
| virtual QString | name () const |
| Get the component name. | |
| virtual QKeySequence | shortcut () const |
| Get the component's accelerator. | |
| virtual void | setKeySequence (const QKeySequence &sequence) |
| Set the key sequence of the view component menu item. | |
| virtual DtLgrZoomableWidget * | zoomComponent ()=0 |
| Access component as zoom component, return NULL if component is not a zoom component. | |
Protected Member Functions | |
| DtLgrGuiComponent (QString name) | |
Protected Attributes | |
| QWidget * | myContainer |
| QTimer * | myTimer |
| QString | myName |
| QIcon | myIconSet |
| QKeySequence | mySequence |
Provides the base interface for Logger Application gui components.
class SimpleComponent : public DtLgrGuiComponent, public DtZoomComponent, public DtTimeComponent { virtual DtZoomComponent* zoomComponent() { return this; } virtual DtTimeComponent* timeComponent() { return this; } }
| virtual bool MAKLogger::DtLgrGuiComponent::canCloseFile | ( | ) | const [virtual] |
This method provides a way for components to control whether the application can close a file.
| true | The component allows the file to be closed. |
| false | The component does not want the file closed. |
Reimplemented in MAKLogger::DtLgrAnnotationComponent, and MAKLogger::DtStateObserverView.
| virtual bool MAKLogger::DtLgrGuiComponent::canExit | ( | ) | const [virtual] |
This method provides a way for components to control whether the application can quit.
The mainWindow calls canQuit for all components and all components must return true for the program to quit.
| true | The component can quit. |
| false | The component does not want to quit. |
Reimplemented in MAKLogger::DtLgrAnnotationComponent.
| virtual QWidget* MAKLogger::DtLgrGuiComponent::container | ( | ) | [virtual] |
Get the container widget.
Components are placed inside widgets.
This method is called when the logger Gui has been initialized.
Returns the components main widget
Implemented in MAKLogger::DtStateObserverView, MAKLogger::DtLgrAnnotationComponent, and MAKLogger::DtLgrDataViewComponent.
| virtual void MAKLogger::DtLgrGuiComponent::update | ( | ) | [pure virtual, slot] |
Called repeatedly by the host application in the GUI thread.
The time between calls is controlled by updateTime.
Implemented in MAKLogger::DtStateObserverView, MAKLogger::DtLgrAnnotationComponent, and MAKLogger::DtLgrDataViewComponent.
| virtual double MAKLogger::DtLgrGuiComponent::updateTime | ( | ) | [pure virtual] |
Returns the desired times between updates in seconds.
If updateTime returns 1.0 the component will be updated every second, if it is 0.5 the component will be updated every 30 seconds. Return -1 if update should not be called.
Implemented in MAKLogger::DtStateObserverView, MAKLogger::DtLgrAnnotationComponent, and MAKLogger::DtLgrDataViewComponent.
| virtual DtLgrZoomableWidget* MAKLogger::DtLgrGuiComponent::zoomComponent | ( | ) | [pure virtual] |
Access component as zoom component, return NULL if component is not a zoom component.
This interface will be used to automatically connect and disconnect the zoom component slots.
Implemented in MAKLogger::DtLgrAnnotationComponent, MAKLogger::DtStateObserverView, and MAKLogger::DtLgrDataViewComponent.