00001 /**************************************************************************** 00002 ** $Id: amenubar.h,v 1.5 2008/07/05 12:19:39 app Exp $ 00003 ** 00004 ** Header file of the Ananas Menu bar of Ananas 00005 ** Designer and Engine applications 00006 ** 00007 ** Created : 20031201 00008 ** 00009 ** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved. 00010 ** 00011 ** This file is part of the Library of the Ananas 00012 ** automation accounting system. 00013 ** 00014 ** This file may be distributed and/or modified under the terms of the 00015 ** GNU General Public License version 2 as published by the Free Software 00016 ** Foundation and appearing in the file LICENSE.GPL included in the 00017 ** packaging of this file. 00018 ** 00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00021 ** 00022 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru 00023 ** See http://www.leaderit.ru/gpl/ for GPL licensing information. 00024 ** 00025 ** Contact org@leaderit.ru if any conditions of this licensing are 00026 ** not clear to you. 00027 ** 00028 **********************************************************************/ 00029 00030 /**************************************************************************** 00031 ****************************************************************************/ 00032 00033 #ifndef AMENUBAR_H 00034 #define AMENUBAR_H 00035 00036 #include <qmenubar.h> 00037 #include <qpopupmenu.h> 00038 #include <qapplication.h> 00039 #include "acfg.h" 00040 00041 class ANANAS_EXPORT AMenuBar : public QMenuBar 00042 { 00043 Q_OBJECT 00044 00045 private: 00046 aCfg *md; 00047 00048 00049 public: 00050 AMenuBar( QWidget* parent = 0, const char* name = 0 ); 00051 AMenuBar( aCfg *cfg, QWidget* parent = 0, const char* name = 0 ); 00052 ~AMenuBar(); 00053 00054 void ReadMenu( aCfgItem obj ); 00055 void ReadMenu( QPopupMenu *parent, aCfgItem obj ); 00056 00057 public slots: 00058 void on_Item(){}; 00059 int insertItem ( const QString & text, QPopupMenu * popup, int id = -1, int index = -1 ); 00060 /* 00061 int insertItem ( const QString & text, const QObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 ); 00062 int insertItem ( const QPixmap & pixmap, const QObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 ); 00063 int insertItem ( const QIconSet & icon, const QPixmap & pixmap, const QObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 ); 00064 int insertItem ( const QString & text, int id = -1, int index = -1 ); 00065 int insertItem ( const QIconSet & icon, const QString & text, int id = -1, int index = -1 ); 00066 int insertItem ( const QIconSet & icon, const QString & text, QPopupMenu * popup, int id = -1, int index = -1 ); 00067 int insertItem ( const QPixmap & pixmap, int id = -1, int index = -1 ); 00068 int insertItem ( const QIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 ); 00069 int insertItem ( const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 ); 00070 int insertItem ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 ); 00071 int insertItem ( QWidget * widget, int id = -1, int index = -1 ); 00072 int insertItem ( const QIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 ); 00073 int insertItem ( QCustomMenuItem * custom, int id = -1, int index = -1 ); 00074 int insertSeparator ( int index = -1 ); 00075 */ 00076 private: 00077 QIntDict <aCfgItem> cfgItems; 00078 00079 }; 00080 00081 00082 #endif // AMENUBAR_H