Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

qnet_base.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'qnet_base.ui'
00003 **
00004 ** Created: Sat May 10 11:57:41 2003
00005 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 
00010 #include "qnet_base.h"
00011 
00012 #include <qvariant.h>
00013 #include <qpushbutton.h>
00014 #include <qtabwidget.h>
00015 #include <qwidget.h>
00016 #include <qtextbrowser.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 #include <qaction.h>
00021 #include <qmenubar.h>
00022 #include <qpopupmenu.h>
00023 #include <qtoolbar.h>
00024 #include <qimage.h>
00025 #include <qpixmap.h>
00026 
00027 #include "qnet_base.ui.h"
00028 /* 
00029  *  Constructs a QMtp_base as a child of 'parent', with the 
00030  *  name 'name' and widget flags set to 'f'.
00031  *
00032  */
00033 QMtp_base::QMtp_base( QWidget* parent, const char* name, WFlags fl )
00034     : QMainWindow( parent, name, fl )
00035 {
00036     (void)statusBar();
00037     if ( !name )
00038   setName( "QMtp_base" );
00039     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
00040     setCentralWidget( new QWidget( this, "qt_central_widget" ) );
00041     QMtp_baseLayout = new QGridLayout( centralWidget(), 1, 1, 0, 6, "QMtp_baseLayout"); 
00042 
00043     tabs = new QTabWidget( centralWidget(), "tabs" );
00044     tabs->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, tabs->sizePolicy().hasHeightForWidth() ) );
00045 
00046     tab = new QWidget( tabs, "tab" );
00047     tabLayout = new QGridLayout( tab, 1, 1, 6, 6, "tabLayout"); 
00048 
00049     system_view = new QTextBrowser( tab, "system_view" );
00050 
00051     tabLayout->addWidget( system_view, 0, 0 );
00052     tabs->insertTab( tab, QString("") );
00053 
00054     QMtp_baseLayout->addWidget( tabs, 0, 0 );
00055 
00056     // actions
00057     fileNewAction = new QAction( this, "fileNewAction" );
00058     fileNewAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00059     fileOpenAction = new QAction( this, "fileOpenAction" );
00060     fileOpenAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00061     fileSaveAsAction = new QAction( this, "fileSaveAsAction" );
00062     fileSessionsAction = new QAction( this, "fileSessionsAction" );
00063     fileSessionsAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00064     fileExitAction = new QAction( this, "fileExitAction" );
00065     editCutAction = new QAction( this, "editCutAction" );
00066     editCutAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00067     editCopyAction = new QAction( this, "editCopyAction" );
00068     editCopyAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00069     editPasteAction = new QAction( this, "editPasteAction" );
00070     editPasteAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00071     editFindAction = new QAction( this, "editFindAction" );
00072     editFindAction->setIconSet( QIconSet( QPixmap::fromMimeSource( "" ) ) );
00073     helpAboutAction = new QAction( this, "helpAboutAction" );
00074     editSettings = new QAction( this, "editSettings" );
00075     fileCloseTab = new QAction( this, "fileCloseTab" );
00076     viewPrevTab = new QAction( this, "viewPrevTab" );
00077     viewNextTab = new QAction( this, "viewNextTab" );
00078     toolsFortuneDisplay = new QAction( this, "toolsFortuneDisplay" );
00079 
00080 
00081     // toolbars
00082 
00083 
00084     // menubar
00085     menubar = new QMenuBar( this, "menubar" );
00086 
00087     fileMenu = new QPopupMenu( this );
00088 
00089     fileNewAction->addTo( fileMenu );
00090     fileOpenAction->addTo( fileMenu );
00091     fileSaveAsAction->addTo( fileMenu );
00092     fileMenu->insertSeparator();
00093     fileSessionsAction->addTo( fileMenu );
00094     fileMenu->insertSeparator();
00095     fileCloseTab->addTo( fileMenu );
00096     fileMenu->insertSeparator();
00097     fileExitAction->addTo( fileMenu );
00098     menubar->insertItem( QString(""), fileMenu, 0 );
00099     editMenu = new QPopupMenu( this );
00100 
00101     editCutAction->addTo( editMenu );
00102     editCopyAction->addTo( editMenu );
00103     editPasteAction->addTo( editMenu );
00104     editMenu->insertSeparator();
00105     editFindAction->addTo( editMenu );
00106     editMenu->insertSeparator();
00107     editSettings->addTo( editMenu );
00108     menubar->insertItem( QString(""), editMenu, 1 );
00109     PopupMenu = new QPopupMenu( this );
00110 
00111     viewPrevTab->addTo( PopupMenu );
00112     viewNextTab->addTo( PopupMenu );
00113     menubar->insertItem( QString(""), PopupMenu, 2 );
00114     PopupMenu_2 = new QPopupMenu( this );
00115 
00116     toolsFortuneDisplay->addTo( PopupMenu_2 );
00117     menubar->insertItem( QString(""), PopupMenu_2, 3 );
00118     helpMenu = new QPopupMenu( this );
00119 
00120     helpAboutAction->addTo( helpMenu );
00121     menubar->insertItem( QString(""), helpMenu, 4 );
00122 
00123     languageChange();
00124     resize( QSize(531, 347).expandedTo(minimumSizeHint()) );
00125     clearWState( WState_Polished );
00126 
00127     // signals and slots connections
00128     connect( toolsFortuneDisplay, SIGNAL( activated() ), this, SLOT( slotDisplayFortune() ) );
00129     connect( fileSaveAsAction, SIGNAL( activated() ), this, SLOT( fileSaveAs() ) );
00130     connect( editCutAction, SIGNAL( activated() ), this, SLOT( editCut() ) );
00131     connect( editCopyAction, SIGNAL( activated() ), this, SLOT( editCopy() ) );
00132     connect( editPasteAction, SIGNAL( activated() ), this, SLOT( editPaste() ) );
00133     connect( editFindAction, SIGNAL( activated() ), this, SLOT( editFind() ) );
00134     connect( helpAboutAction, SIGNAL( activated() ), this, SLOT( helpAbout() ) );
00135     connect( editSettings, SIGNAL( activated() ), this, SLOT( slotConfigure() ) );
00136     connect( fileNewAction, SIGNAL( activated() ), this, SLOT( fileNew() ) );
00137     connect( fileCloseTab, SIGNAL( activated() ), this, SLOT( closeCurrentTab() ) );
00138     connect( fileExitAction, SIGNAL( activated() ), this, SLOT( fileExit() ) );
00139     connect( viewNextTab, SIGNAL( activated() ), this, SLOT( gotoNextTab() ) );
00140     connect( viewPrevTab, SIGNAL( activated() ), this, SLOT( gotoPreviousTab() ) );
00141     connect( fileSessionsAction, SIGNAL( activated() ), this, SLOT( fileSessions() ) );
00142 }
00143 
00144 /*
00145  *  Destroys the object and frees any allocated resources
00146  */
00147 QMtp_base::~QMtp_base()
00148 {
00149     // no need to delete child widgets, Qt does it all for us
00150 }
00151 
00152 /*
00153  *  Sets the strings of the subwidgets using the current
00154  *  language.
00155  */
00156 void QMtp_base::languageChange()
00157 {
00158     setCaption( tr( "QNet" ) );
00159     tabs->changeTab( tab, tr( "System" ) );
00160     fileNewAction->setText( tr( "New" ) );
00161     fileNewAction->setMenuText( tr( "&New" ) );
00162     fileNewAction->setAccel( tr( "Ctrl+N" ) );
00163     fileOpenAction->setText( tr( "Open" ) );
00164     fileOpenAction->setMenuText( tr( "&Open..." ) );
00165     fileOpenAction->setAccel( tr( "Ctrl+O" ) );
00166     fileSaveAsAction->setText( tr( "Save As" ) );
00167     fileSaveAsAction->setMenuText( tr( "Save &As..." ) );
00168     fileSaveAsAction->setAccel( QString::null );
00169     fileSessionsAction->setText( tr( "Sessions" ) );
00170     fileSessionsAction->setMenuText( tr( "&Sessions..." ) );
00171     fileSessionsAction->setAccel( QString::null );
00172     fileExitAction->setText( tr( "Exit" ) );
00173     fileExitAction->setMenuText( tr( "E&xit" ) );
00174     fileExitAction->setAccel( tr( "Ctrl+Q" ) );
00175     editCutAction->setText( tr( "Cut" ) );
00176     editCutAction->setMenuText( tr( "&Cut" ) );
00177     editCutAction->setAccel( tr( "Ctrl+X" ) );
00178     editCopyAction->setText( tr( "Copy" ) );
00179     editCopyAction->setMenuText( tr( "C&opy" ) );
00180     editCopyAction->setAccel( tr( "Ctrl+C" ) );
00181     editPasteAction->setText( tr( "Paste" ) );
00182     editPasteAction->setMenuText( tr( "&Paste" ) );
00183     editPasteAction->setAccel( tr( "Ctrl+V" ) );
00184     editFindAction->setText( tr( "Find" ) );
00185     editFindAction->setMenuText( tr( "&Find..." ) );
00186     editFindAction->setAccel( tr( "Ctrl+F" ) );
00187     helpAboutAction->setText( tr( "About" ) );
00188     helpAboutAction->setMenuText( tr( "&About..." ) );
00189     helpAboutAction->setAccel( QString::null );
00190     editSettings->setText( tr( "Settings" ) );
00191     editSettings->setMenuText( tr( "&Settings..." ) );
00192     editSettings->setAccel( QString::null );
00193     fileCloseTab->setText( tr( "Close" ) );
00194     fileCloseTab->setMenuText( tr( "&Close" ) );
00195     fileCloseTab->setAccel( tr( "Ctrl+W" ) );
00196     viewPrevTab->setText( tr( "Previous" ) );
00197     viewPrevTab->setMenuText( tr( "&Previous" ) );
00198     viewPrevTab->setAccel( tr( "Alt+Left" ) );
00199     viewNextTab->setText( tr( "Next" ) );
00200     viewNextTab->setMenuText( tr( "&Next" ) );
00201     viewNextTab->setAccel( tr( "Alt+Right" ) );
00202     toolsFortuneDisplay->setText( tr( "Fortune" ) );
00203     toolsFortuneDisplay->setMenuText( tr( "&Fortune" ) );
00204     toolsFortuneDisplay->setAccel( tr( "Ctrl+Alt+F" ) );
00205     menubar->findItem( 0 )->setText( tr( "&File" ) );
00206     menubar->findItem( 1 )->setText( tr( "&Edit" ) );
00207     menubar->findItem( 2 )->setText( tr( "&View" ) );
00208     menubar->findItem( 3 )->setText( tr( "&Tools" ) );
00209     menubar->findItem( 4 )->setText( tr( "&Help" ) );
00210 }
00211 

Generated on Sat May 10 15:09:28 2003 for qnet by doxygen1.3