Home · All Classes · Main Classes · Deprecated
Public Types | Public Member Functions | Properties

MAction Class Reference

MAction implements an extension of the QAction for libmeegotouch. More...

Inheritance diagram for MAction:
Inheritance graph
[legend]
Collaboration diagram for MAction:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Location {
  NoLocation = 0x0000, ToolBarPortraitLocation = 0x0001, ToolBarLandscapeLocation = 0x0002, ToolBarLocation = 0x0003,
  ApplicationMenuLocation = 0x0004, ObjectMenuLocation = 0x0008, EveryLocation = 0xffff
}

Public Member Functions

 MAction (QObject *parent)
 MAction (const QString &text, QObject *parent)
 MAction (const QString &iconID, const QString &text, QObject *parent)
virtual ~MAction ()
QString iconID () const
void setIconID (const QString &id)
Locations location () const
void setLocation (Locations location)
void setStyleAction (bool styleAction)
bool isStyleAction () const

Properties

QString iconID

Detailed Description

MAction implements an extension of the QAction for libmeegotouch.

Definition at line 33 of file corelib/core/maction.h.


Member Enumeration Documentation

Possible locations for an action to reside in. An action may stay in different locations on the screen, but will have preferred ones. This information is useful if actions should be shifted from one location to another automatically.

Enumerator:
NoLocation 

No location.

ToolBarPortraitLocation 

In the tool bar, if in portrait orientation.

ToolBarLandscapeLocation 

In the tool bar, if in landscape orientation.

ToolBarLocation 

In the tool bar, regardless of the orientation.

ApplicationMenuLocation 

In the application menu.

ObjectMenuLocation 

In the object menu.

EveryLocation 

In all possible locations.

Definition at line 52 of file corelib/core/maction.h.


Constructor & Destructor Documentation

MAction::MAction ( QObject parent  )  [explicit]

Default constructor.

Parameters:
parent Parent object

Definition at line 55 of file maction.cpp.

    : QAction(parent),
      d_ptr(new MActionPrivate)
{
    Q_D(MAction);
    d->q_ptr = this;
}

MAction::MAction ( const QString text,
QObject parent 
)

Constructor.

Parameters:
text Text to be used as label for action button
parent Parent object This overloaded constructor is provided for convenience.

Definition at line 71 of file maction.cpp.

    : QAction(text, parent),
      d_ptr(new MActionPrivate)
{
    Q_D(MAction);
    d->q_ptr = this;
}

MAction::MAction ( const QString iconID,
const QString text,
QObject parent 
)

Constructor.

Parameters:
iconID Identifier for icon to be shown on action button
text Text to be used as label for action button
parent Parent object This overloaded constructor is provided for convenience.

Definition at line 79 of file maction.cpp.

    : QAction(text, parent),
      d_ptr(new MActionPrivate)
{
    Q_D(MAction);
    d->iconID = iconID;
    d->q_ptr = this;
}

MAction::~MAction (  )  [virtual]

Destructor for an action.

Definition at line 88 of file maction.cpp.

{
    delete d_ptr;
}


Member Function Documentation

QString MAction::iconID (  )  const

Returns the logical ID associated with this action's icon.

bool MAction::isStyleAction (  )  const

Return whether this action is a style action or not.

Definition at line 134 of file maction.cpp.

{
    Q_D(const MAction);
    return d->styleAction;
}

MAction::Locations MAction::location (  )  const

Return the possible locations this action may reside in.

Definition at line 109 of file maction.cpp.

{
    Q_D(const MAction);
    return d->location;
}

void MAction::setIconID ( const QString id  ) 

Sets the logical ID associated with this action's icon to id.

Definition at line 99 of file maction.cpp.

{
    Q_D(MAction);
    if (d->iconID == iconID)
        return;

    d->iconID = iconID;
    d->sendDataChanged();
}

void MAction::setLocation ( Locations  location  ) 

Set the locations this action may reside in.

Parameters:
location value of possible locations
void MAction::setStyleAction ( bool  styleAction  ) 

sets the action as style action, which can be used to set the style/order/presentation of the contents of the view.

Definition at line 125 of file maction.cpp.

{
    Q_D(MAction);
    if (d->styleAction != styleAction) {
        d->styleAction = styleAction;
        d->sendDataChanged();
    }
}


Property Documentation

QString MAction::iconID [read, write]

Logical ID of the action icon.

Definition at line 40 of file corelib/core/maction.h.


Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:14:23 (PDT)
Doxygen 1.7.1
MeeGo Touch