Ananas Library 0.9.5
amenubar.h
1/****************************************************************************
2** $Id: amenubar.h,v 1.5 2008/07/05 12:19:39 app Exp $
3**
4** Header file of the Ananas Menu bar of Ananas
5** Designer and Engine applications
6**
7** Created : 20031201
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10**
11** This file is part of the Library of the Ananas
12** automation accounting system.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21**
22** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
23** See http://www.leaderit.ru/gpl/ for GPL licensing information.
24**
25** Contact org@leaderit.ru if any conditions of this licensing are
26** not clear to you.
27**
28**********************************************************************/
29
30/****************************************************************************
31****************************************************************************/
32
33#ifndef AMENUBAR_H
34#define AMENUBAR_H
35
36#include <qmenubar.h>
37#include <qpopupmenu.h>
38#include <qapplication.h>
39#include "acfg.h"
40
41class ANANAS_EXPORT AMenuBar : public QMenuBar
42{
43 Q_OBJECT
44
45 private:
46 aCfg *md;
47
48
49 public:
50 AMenuBar( QWidget* parent = 0, const char* name = 0 );
51 AMenuBar( aCfg *cfg, QWidget* parent = 0, const char* name = 0 );
52 ~AMenuBar();
53
54 void ReadMenu( aCfgItem obj );
55 void ReadMenu( QPopupMenu *parent, aCfgItem obj );
56
57 public slots:
58 void on_Item(){};
59 int insertItem ( const QString & text, QPopupMenu * popup, int id = -1, int index = -1 );
60/*
61 int insertItem ( const QString & text, const QObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 );
62 int insertItem ( const QPixmap & pixmap, const QObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 );
63 int insertItem ( const QIconSet & icon, const QPixmap & pixmap, const QObject * receiver, const char * member, const QKeySequence & accel = 0, int id = -1, int index = -1 );
64 int insertItem ( const QString & text, int id = -1, int index = -1 );
65 int insertItem ( const QIconSet & icon, const QString & text, int id = -1, int index = -1 );
66 int insertItem ( const QIconSet & icon, const QString & text, QPopupMenu * popup, int id = -1, int index = -1 );
67 int insertItem ( const QPixmap & pixmap, int id = -1, int index = -1 );
68 int insertItem ( const QIconSet & icon, const QPixmap & pixmap, int id = -1, int index = -1 );
69 int insertItem ( const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 );
70 int insertItem ( const QIconSet & icon, const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 );
71 int insertItem ( QWidget * widget, int id = -1, int index = -1 );
72 int insertItem ( const QIconSet & icon, QCustomMenuItem * custom, int id = -1, int index = -1 );
73 int insertItem ( QCustomMenuItem * custom, int id = -1, int index = -1 );
74 int insertSeparator ( int index = -1 );
75*/
76private:
77 QIntDict <aCfgItem> cfgItems;
78
79};
80
81
82#endif // AMENUBAR_H
Definition amenubar.h:42
Класс реализует програмный интерфейс доступа к элементам метаданных системы. Наследует QObject.
Definition acfg.h:437