######################################## In th file kremenu.h ######################################## typedef Q3ValueList ::Iterator MenuId; class Menu { public: // Methods Menu( void ); Menu( const Menu &m ); ~Menu( void ); void addButton( KreMenuButton *button ); Menu& operator=( const Menu &m ); // Variables QMap positionList; // Stores the indexes for the widgets QMap widgetList; // Stores the widgets for each position (just the inverse mapping) KreMenuButton* activeButton; // Indicates which button is highlighted int childPos; int widgetNumber; private: // Methods void copyMap( QMap &destMap, const QMap &origMap ); void copyMap( QMap &destMap, const QMap &origMap ); }; ######################################## In the file kremenu.cpp ######################################## KreMenuButton::KreMenuButton( KreMenu *parent, KrePanel _panel, MenuId id, const char *name ) : QWidget( parent, name, Qt::WNoAutoErase ), panel( _panel ) { highlighted = false; text = QString::null; if ( id == 0 ) menuId = parent->mainMenu(); else menuId = id; subMenuId = 0; // By default it's not a submenu button resize( parent->size().width(), 55 ); connect ( parent, SIGNAL( resized( int, int ) ), this, SLOT( rescale() ) ); connect( this, SIGNAL( clicked() ), this, SLOT( forwardClicks() ) ); setCursor( QCursor( Qt::PointingHandCursor ) ); }