| Home · All Classes · Main Classes · Deprecated |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of libmeegotouch. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef MACTION_H 00021 #define MACTION_H 00022 00023 #include "mexport.h" 00024 00025 #include <QAction> 00026 00027 class MActionPrivate; 00028 00033 class M_CORE_EXPORT MAction : public QAction 00034 { 00035 Q_OBJECT 00036 00040 Q_PROPERTY(QString iconID READ iconID WRITE setIconID) 00041 00042 Q_FLAGS(Locations) 00043 00044 public: 00045 00052 enum Location { 00053 NoLocation = 0x0000, 00054 ToolBarPortraitLocation = 0x0001, 00055 ToolBarLandscapeLocation = 0x0002, 00056 ToolBarLocation = 0x0003, 00057 ApplicationMenuLocation = 0x0004, 00058 ObjectMenuLocation = 0x0008, 00059 EveryLocation = 0xffff 00060 }; 00061 00062 Q_DECLARE_FLAGS(Locations, Location) 00063 00064 00068 explicit MAction(QObject *parent); 00069 00076 MAction(const QString &text, QObject *parent); 00077 00085 MAction(const QString &iconID, const QString &text, QObject *parent); 00086 00090 virtual ~MAction(); 00091 00095 QString iconID() const; 00096 00100 void setIconID(const QString &id); 00101 00105 Locations location() const; 00106 00111 void setLocation(Locations location); 00112 00117 void setStyleAction(bool styleAction); 00118 00122 bool isStyleAction() const; 00123 00124 protected: 00126 MActionPrivate *const d_ptr; 00127 MAction(MActionPrivate &dd, QObject *parent = 0); 00130 private: 00131 Q_DISABLE_COPY(MAction) 00132 Q_DECLARE_PRIVATE(MAction) 00133 00134 #ifdef UNIT_TEST 00135 friend class Ut_MAction; 00136 #endif 00137 }; 00138 00139 #endif
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:14:19 (PDT) Doxygen 1.7.1 |
MeeGo Touch |