bool QMainWindow::eventFilter( QObject* o, QEvent *e ) { if ( e->type() == Event_Show || e->type() == Event_Hide ) { triggerLayout(); } else if ( ( e->type() == Event_MouseButtonPress || e->type() == Event_MouseMove || e->type() == Event_MouseButtonRelease ) && 0 && // 1.4x o && ( d->moving || o->inherits( "QToolBar" ) ) ) { moveToolBar( d->moving ? d->moving : (QToolBar *)o, (QMouseEvent *)e ); return TRUE; } return QWidget::eventFilter( o, e ); }
QTERuputer::QTERuputer(Frame *_frame, Directory *_sddir, Option *option, UFilerIni *ini) : QMainWindow(NULL, "Aurex"), Ruputer(_frame, _sddir, option, ini) { // qteruputer=this; // palette = NULL; #if 1 /* configure menu */ openFileMenu = new QPopupMenu(this); menuBar()->insertItem(tr("File"), openFileMenu); openAction = new QAction("Open", "Open", 0, this); openAction->addTo(openFileMenu); connect(openAction, SIGNAL(activated()), this, SLOT(openFile(void))); connect(openFileMenu, SIGNAL(aboutToShow()), this, SLOT(pauseEmulate(void))); connect(openFileMenu, SIGNAL(aboutToHide()), this, SLOT(resumeEmulate(void))); /* configure tool button */ enterAction = new QAction("enter", "enter", 0, this); QPixmap enterPixmap( (const char **)enter ); QIconSet enterIconSet( enterPixmap, QIconSet::Small ); enterAction->setIconSet(enterIconSet); elAction = new QAction("el", "el", 0, this); QPixmap elPixmap( (const char **)el ); QIconSet elIconSet( elPixmap , QIconSet::Small ); elAction->setIconSet(elIconSet); menuAction = new QAction("menu", "menu", 0, this); QPixmap menuPixmap( (const char **)menu ); QIconSet menuIconSet( menuPixmap , QIconSet::Small); menuAction->setIconSet(menuIconSet); filerAction = new QAction("filer", "filer", 0, this); QPixmap filerPixmap( (const char **)filer ); QIconSet filerIconSet( filerPixmap , QIconSet::Small ); filerAction->setIconSet(filerIconSet); upAction = new QAction("up", "up", 0, this); QPixmap upPixmap( (const char **)up_arrow_xpm ); QIconSet upIconSet( upPixmap , QIconSet::Small ); upAction->setIconSet(upIconSet); rightAction = new QAction("right", "right", 0, this); QPixmap rightPixmap( (const char **)right_arrow_xpm ); QIconSet rightIconSet( rightPixmap , QIconSet::Small ); rightAction->setIconSet(rightIconSet); leftAction = new QAction("left", "left", 0, this); QPixmap leftPixmap( (const char **)left_arrow_xpm ); QIconSet leftIconSet( leftPixmap , QIconSet::Small ); leftAction->setIconSet(leftIconSet); downAction = new QAction("down", "down", 0, this); QPixmap downPixmap( (const char **)down_arrow_xpm ); QIconSet downIconSet( downPixmap , QIconSet::Small ); downAction->setIconSet(downIconSet); connect(enterAction, SIGNAL(activated()), this, SLOT(pushPaletteEnter(void))); connect(elAction, SIGNAL(activated()), this, SLOT(pushPaletteEl(void))); connect(menuAction, SIGNAL(activated()), this, SLOT(pushPaletteMenu(void))); connect(filerAction, SIGNAL(activated()), this, SLOT(pushPaletteFiler(void))); connect(upAction, SIGNAL(activated()), this, SLOT(pushPaletteUp(void))); connect(downAction, SIGNAL(activated()), this, SLOT(pushPaletteDown(void))); connect(leftAction, SIGNAL(activated()), this, SLOT(pushPaletteLeft(void))); connect(rightAction, SIGNAL(activated()), this, SLOT(pushPaletteRight(void))); palette = new QToolBar(this, "Palette"); // palette->setVerticalStretchable( true ); // palette->setHorizontalStretchable( true ); enterAction->addTo(palette); menuAction->addTo(palette); upAction->addTo(palette); downAction->addTo(palette); leftAction->addTo(palette); rightAction->addTo(palette); elAction->addTo(palette); filerAction->addTo(palette); setDockEnabled(palette, Bottom, true); moveToolBar(palette, Bottom); qtelcd=new QTELcd(getSystemAddress(), this, getCMLcd(), menuBar()->height(), palette->height(), palette->width()); setSDLcd(qtelcd); #endif setCaption("Aurex"); }