Marble::AbstractFloatItem

Search for usage in LXR

#include <AbstractFloatItem.h>

Inheritance diagram for Marble::AbstractFloatItem:

Public Slots

void hide ()
 
void setPositionLocked (bool lock)
 
void show ()
 
- Public Slots inherited from Marble::RenderPlugin
QActionaction () const
 
void restoreDefaultSettings ()
 
void setEnabled (bool enabled)
 
bool setSetting (const QString &key, const QVariant &value)
 
QVariant setting (const QString &key) const
 
QStringList settingKeys () const
 
void setUserCheckable (bool isUserCheckable)
 
void setVisible (bool visible)
 

Public Member Functions

 AbstractFloatItem (const MarbleModel *marbleModel, const QPointF &point=QPointF(10.0, 10.0), const QSizeF &size=QSizeF(150.0, 50.0))
 
QFont font () const
 
QPen pen () const
 
bool positionLocked () const
 
MARBLE_DEPRECATED bool render (GeoPainter *painter, ViewportParams *viewport, const QString &renderPos=QLatin1String("FLOAT_ITEM"), GeoSceneLayer *layer=nullptr) override
 
QString renderPolicy () const override
 
MARBLE_DEPRECATED QStringList renderPosition () const override
 
RenderType renderType () const override
 
void setFont (const QFont &font)
 
void setPen (const QPen &pen)
 
void setSettings (const QHash< QString, QVariant > &settings) override
 
QHash< QString, QVariantsettings () const override
 
void setVisible (bool visible)
 
bool visible () const
 
- Public Member Functions inherited from Marble::RenderPlugin
 RenderPlugin (const MarbleModel *marbleModel)
 
virtual const QList< QActionGroup * > * actionGroups () const
 
bool enabled () const
 
virtual QString guiString () const =0
 
bool isUserCheckable () const
 
const MarbleModelmarbleModel () const
 
virtual RenderPluginnewInstance (const MarbleModel *marbleModel) const =0
 
RenderState renderState () const override
 
QString runtimeTrace () const override
 
virtual const QList< QActionGroup * > * toolbarActionGroups () const
 
bool visible () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Public Member Functions inherited from Marble::RenderPluginInterface
virtual QStringList backendTypes () const =0
 
virtual void initialize ()=0
 
virtual bool isInitialized () const =0
 
- Public Member Functions inherited from Marble::PluginInterface
virtual QString aboutDataText () const
 
virtual QString copyrightYears () const =0
 
virtual QString description () const =0
 
virtual QIcon icon () const =0
 
virtual QString name () const =0
 
virtual QString nameId () const =0
 
virtual QVector< PluginAuthor > pluginAuthors () const =0
 
virtual QString version () const =0
 

Protected Member Functions

QMenucontextMenu ()
 
virtual void contextMenuEvent (QWidget *w, QContextMenuEvent *e)
 
bool eventFilter (QObject *object, QEvent *e) override
 
virtual void toolTipEvent (QHelpEvent *e)
 
- Protected Member Functions inherited from Marble::RenderPlugin
bool eventFilter (QObject *, QEvent *) override
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Types inherited from Marble::RenderPlugin
enum  RenderType {
  UnknownRenderType , TopLevelRenderType , PanelRenderType , OnlineRenderType ,
  ThemeRenderType
}
 
- Properties inherited from Marble::RenderPlugin
QString description
 
bool enabled
 
QString name
 
QString nameId
 
bool userCheckable
 
QString version
 
bool visible
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from Marble::RenderPlugin
void actionGroupsChanged ()
 
void enabledChanged (bool enable)
 
void repaintNeeded (const QRegion &dirtyRegion=QRegion())
 
void settingsChanged (const QString &nameId)
 
void userCheckableChanged (bool isUserCheckable)
 
void visibilityChanged (bool visible, const QString &nameId)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

The abstract class for float item plugins.

Float Item is a variant of Marble render plugins It keeps floating on top of the map at a given screen position

Good examples are Overview Map, License

Definition at line 39 of file AbstractFloatItem.h.

Constructor & Destructor Documentation

◆ AbstractFloatItem()

Marble::AbstractFloatItem::AbstractFloatItem ( const MarbleModel * marbleModel,
const QPointF & point = QPointF( 10.0, 10.0 ),
const QSizeF & size = QSizeF( 150.0, 50.0 ) )
explicit

Definition at line 51 of file AbstractFloatItem.cpp.

◆ ~AbstractFloatItem()

Marble::AbstractFloatItem::~AbstractFloatItem ( )
override

Definition at line 63 of file AbstractFloatItem.cpp.

Member Function Documentation

◆ contextMenu()

QMenu * Marble::AbstractFloatItem::contextMenu ( )
protected

Definition at line 229 of file AbstractFloatItem.cpp.

◆ contextMenuEvent()

void Marble::AbstractFloatItem::contextMenuEvent ( QWidget * w,
QContextMenuEvent * e )
protectedvirtual

Definition at line 198 of file AbstractFloatItem.cpp.

◆ eventFilter()

bool Marble::AbstractFloatItem::eventFilter ( QObject * object,
QEvent * e )
overrideprotectedvirtual

Reimplemented from QObject.

Definition at line 167 of file AbstractFloatItem.cpp.

◆ font()

QFont Marble::AbstractFloatItem::font ( ) const

current font for rendering

Returns
font

Definition at line 113 of file AbstractFloatItem.cpp.

◆ hide

void Marble::AbstractFloatItem::hide ( )
slot

Hide the item.

If the item was shown this function will hide it

Definition at line 224 of file AbstractFloatItem.cpp.

◆ pen()

QPen Marble::AbstractFloatItem::pen ( ) const

current pen for rendering

Returns
pen

Definition at line 102 of file AbstractFloatItem.cpp.

◆ positionLocked()

bool Marble::AbstractFloatItem::positionLocked ( ) const

Check is position locked.

Float Item position can be locked. If it is, the item can't be moved with the cursor (in the UI)

To set it use

See also
setPositionLocked
Returns
position locked or not

Definition at line 162 of file AbstractFloatItem.cpp.

◆ render()

bool Marble::AbstractFloatItem::render ( GeoPainter * painter,
ViewportParams * viewport,
const QString & renderPos = QLatin1String("FLOAT_ITEM"),
GeoSceneLayer * layer = nullptr )
override

Paints the float item on the map.

Deprecated
Do not override this method since it won't be called any longer. Override one of FrameGraphicsItem's paint methods instead.

Definition at line 208 of file AbstractFloatItem.cpp.

◆ renderPolicy()

QString Marble::AbstractFloatItem::renderPolicy ( ) const
overridevirtual

Return how the plugin settings should be used.

FIXME: Document this

Possible Values: "ALWAYS" – the plugin renders at the preferred position no matter what got specified in the DGML file. "SPECIFIED" – renders only in case it got specified in the DGML file. "SPECIFIED_ALWAYS" – In case it got specified in the DGML file render according to the specification otherwise choose the preferred position

Implements Marble::RenderPluginInterface.

Definition at line 124 of file AbstractFloatItem.cpp.

◆ renderPosition()

QStringList Marble::AbstractFloatItem::renderPosition ( ) const
override

Returns the rendering position of this float item.

Deprecated
The return value of method is ignored. The float item's rendering position will always be "FLOAT_ITEM".

Definition at line 129 of file AbstractFloatItem.cpp.

◆ renderType()

RenderPlugin::RenderType Marble::AbstractFloatItem::renderType ( ) const
overridevirtual

Render type of the plugin.

Function for returning the type of plugin this is for. This affects where in the menu tree the action() is placed.

See also
RenderType
Returns
: The type of render plugin this is

Reimplemented from Marble::RenderPlugin.

Definition at line 97 of file AbstractFloatItem.cpp.

◆ setFont()

void Marble::AbstractFloatItem::setFont ( const QFont & font)

setting current font for rendering

Parameters
font

Definition at line 118 of file AbstractFloatItem.cpp.

◆ setPen()

void Marble::AbstractFloatItem::setPen ( const QPen & pen)

setting current pen for rendering

Parameters
pen

Definition at line 107 of file AbstractFloatItem.cpp.

◆ setPositionLocked

void Marble::AbstractFloatItem::setPositionLocked ( bool lock)
slot

Set is position locked.

Parameters
lockis locked?

Float Item position can be locked. If it is, item can't be moved with cursor (in UI)

To check it use

See also
positionLocked

Definition at line 148 of file AbstractFloatItem.cpp.

◆ setSettings()

void Marble::AbstractFloatItem::setSettings ( const QHash< QString, QVariant > & settings)
overridevirtual

Set the settings of the plugin.

Usually this is called at startup to restore saved settings.

Parameters
newplugin's settings
See also
settings

Reimplemented from Marble::RenderPlugin.

Definition at line 79 of file AbstractFloatItem.cpp.

◆ settings()

QHash< QString, QVariant > Marble::AbstractFloatItem::settings ( ) const
overridevirtual

Settings of the plugin.

Settings is the map (hash table) of plugin's settings This method is called to determine the current settings of the plugin for serialization, e.g. when closing the application.

Returns
plugin's settings
See also
setSettings

Reimplemented from Marble::RenderPlugin.

Definition at line 68 of file AbstractFloatItem.cpp.

◆ setVisible()

void Marble::AbstractFloatItem::setVisible ( bool visible)

Set visibility of the float item.

Float items can be visible or invisible. It's possible to check visibility with

See also
visible
Parameters
visiblevisibility of the item

Definition at line 134 of file AbstractFloatItem.cpp.

◆ show

void Marble::AbstractFloatItem::show ( )
slot

Show the item.

If the item was hidden this function will show it

Definition at line 219 of file AbstractFloatItem.cpp.

◆ toolTipEvent()

void Marble::AbstractFloatItem::toolTipEvent ( QHelpEvent * e)
protectedvirtual

Definition at line 203 of file AbstractFloatItem.cpp.

◆ visible()

bool Marble::AbstractFloatItem::visible ( ) const

Check visibility of the float item.

Float items can be visible or invisible. It's possible to set visibility with

See also
setVisible
Returns
visible or not

Definition at line 141 of file AbstractFloatItem.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:18 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.