-/** initializes all QActions of the application */
-void BSApp::initActions(){
-
- QPixmap openIcon, saveIcon, newIcon;
- newIcon = QPixmap(filenew);
- openIcon = QPixmap(fileopen);
- saveIcon = QPixmap(filesave);
-
-
- fileNew = new QAction(tr("New File"), newIcon, tr("&New"), QAccel::stringToKey(tr("Ctrl+N")), this);
- fileNew->setStatusTip(tr("Creates a new document"));
- fileNew->setWhatsThis(tr("New File\n\nCreates a new document"));
- connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew()));
-
- fileOpen = new QAction(tr("Open File"), openIcon, tr("&Open..."), 0, this);
- fileOpen->setStatusTip(tr("Opens an existing document"));
- fileOpen->setWhatsThis(tr("Open File\n\nOpens an existing document"));
- connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen()));
-
- fileSave = new QAction(tr("Save File"), saveIcon, tr("&Save"), QAccel::stringToKey(tr("Ctrl+S")), this);
- fileSave->setStatusTip(tr("Saves the actual document"));
- fileSave->setWhatsThis(tr("Save File.\n\nSaves the actual document"));
- connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave()));
-
- fileSaveAs = new QAction(tr("Save File As"), tr("Save &as..."), 0, this);
- fileSaveAs->setStatusTip(tr("Saves the actual document under a new filename"));
- fileSaveAs->setWhatsThis(tr("Save As\n\nSaves the actual document under a new filename"));
- connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSave()));
-
- fileClose = new QAction(tr("Close File"), tr("&Close"), QAccel::stringToKey(tr("Ctrl+W")), this);
- fileClose->setStatusTip(tr("Closes the actual document"));
- fileClose->setWhatsThis(tr("Close File\n\nCloses the actual document"));
- connect(fileClose, SIGNAL(activated()), this, SLOT(slotFileClose()));
-
- filePrint = new QAction(tr("Print File"), tr("&Print"), QAccel::stringToKey(tr("Ctrl+P")), this);
- filePrint->setStatusTip(tr("Prints out the actual document"));
- filePrint->setWhatsThis(tr("Print File\n\nPrints out the actual document"));
- connect(filePrint, SIGNAL(activated()), this, SLOT(slotFilePrint()));
-
- fileQuit = new QAction(tr("Exit"), tr("E&xit"), QAccel::stringToKey(tr("Ctrl+Q")), this);
- fileQuit->setStatusTip(tr("Quits the application"));
- fileQuit->setWhatsThis(tr("Exit\n\nQuits the application"));
- connect(fileQuit, SIGNAL(activated()), this, SLOT(slotFileQuit()));
-
- editCut = new QAction(tr("Cut"), tr("Cu&t"), QAccel::stringToKey(tr("Ctrl+X")), this);
- editCut->setStatusTip(tr("Cuts the selected section and puts it to the clipboard"));
- editCut->setWhatsThis(tr("Cut\n\nCuts the selected section and puts it to the clipboard"));
- connect(editCut, SIGNAL(activated()), this, SLOT(slotEditCut()));
-
- editCopy = new QAction(tr("Copy"), tr("&Copy"), QAccel::stringToKey(tr("Ctrl+C")), this);
- editCopy->setStatusTip(tr("Copies the selected section to the clipboard"));
- editCopy->setWhatsThis(tr("Copy\n\nCopies the selected section to the clipboard"));
- connect(editCopy, SIGNAL(activated()), this, SLOT(slotEditCopy()));
-
- editPaste = new QAction(tr("Paste"), tr("&Paste"), QAccel::stringToKey(tr("Ctrl+V")), this);
- editPaste->setStatusTip(tr("Pastes the clipboard contents to actual position"));
- editPaste->setWhatsThis(tr("Paste\n\nPastes the clipboard contents to actual position"));
- connect(editPaste, SIGNAL(activated()), this, SLOT(slotEditPaste()));
-
- viewToolBar = new QAction(tr("Toolbar"), tr("Tool&bar"), 0, this, 0, true);
- viewToolBar->setStatusTip(tr("Enables/disables the toolbar"));
- viewToolBar->setWhatsThis(tr("Toolbar\n\nEnables/disables the toolbar"));
- connect(viewToolBar, SIGNAL(toggled(bool)), this, SLOT(slotViewToolBar(bool)));
-
- viewStatusBar = new QAction(tr("Statusbar"), tr("&Statusbar"), 0, this, 0, true);
- viewStatusBar->setStatusTip(tr("Enables/disables the statusbar"));
- viewStatusBar->setWhatsThis(tr("Statusbar\n\nEnables/disables the statusbar"));
- connect(viewStatusBar, SIGNAL(toggled(bool)), this, SLOT(slotViewStatusBar(bool)));
-
- helpAboutApp = new QAction(tr("About"), tr("&About..."), 0, this);
- helpAboutApp->setStatusTip(tr("About the application"));
- helpAboutApp->setWhatsThis(tr("About\n\nAbout the application"));
- connect(helpAboutApp, SIGNAL(activated()), this, SLOT(slotHelpAbout()));
-
-}
-
-void BSApp::initMenuBar()
-{
- ///////////////////////////////////////////////////////////////////
- // MENUBAR
-
- ///////////////////////////////////////////////////////////////////
- // menuBar entry fileMenu
- fileMenu=new QPopupMenu();
- fileNew->addTo(fileMenu);
- fileOpen->addTo(fileMenu);
- fileClose->addTo(fileMenu);
- fileMenu->insertSeparator();
- fileSave->addTo(fileMenu);
- fileSaveAs->addTo(fileMenu);
- fileMenu->insertSeparator();
- filePrint->addTo(fileMenu);
- fileMenu->insertSeparator();
- fileQuit->addTo(fileMenu);
-
- ///////////////////////////////////////////////////////////////////
- // menuBar entry editMenu
- editMenu=new QPopupMenu();
- editCut->addTo(editMenu);
- editCopy->addTo(editMenu);
- editPaste->addTo(editMenu);
-
- ///////////////////////////////////////////////////////////////////
- // menuBar entry viewMenu
- viewMenu=new QPopupMenu();
- viewMenu->setCheckable(true);
- viewToolBar->addTo(viewMenu);
- viewStatusBar->addTo(viewMenu);
- ///////////////////////////////////////////////////////////////////
- // EDIT YOUR APPLICATION SPECIFIC MENUENTRIES HERE
-
- ///////////////////////////////////////////////////////////////////
- // menuBar entry helpMenu
- helpMenu=new QPopupMenu();
- helpAboutApp->addTo(helpMenu);
-
- ///////////////////////////////////////////////////////////////////
- // MENUBAR CONFIGURATION
- menuBar()->insertItem(tr("&File"), fileMenu);
- menuBar()->insertItem(tr("&Edit"), editMenu);
- menuBar()->insertItem(tr("&View"), viewMenu);
- menuBar()->insertSeparator();
- menuBar()->insertItem(tr("&Help"), helpMenu);
-
-}
-
-void BSApp::initToolBar()