📄 interface-base.cpp
字号:
"#w c #6bad94",".u c #737373",".v c #737b73",".g c #737b7b",".D c #738c84",".7 c #739484","#d c #73948c","#z c #73a59c","#p c #73b594","#o c #73bd9c",".b c #7b7b7b",".O c #7b8484","#a c #7bad94","#q c #7bad9c","#i c #7bb59c",".5 c #7bbd9c","#b c #7bbda5","#h c #7bc69c","#y c #7bc6a5",".8 c #848484",".4 c #8484b5",".h c #849c94","#n c #84a5ad",".V c #84ada5","#E c #84b59c","#F c #84b5a5","#j c #84bda5","#t c #84c6a5","#l c #84cead",".E c #8c8c8c","#g c #8c8cbd","## c #8c94b5","#m c #8cadbd","#c c #8cb5a5",".L c #8cc6ad",".T c #8ccead","#f c #8cceb5",".a c #949494",".n c #94a59c","#u c #94a5ce",".k c #94bdad",".M c #94c6ad",".6 c #94c6b5",".B c #94ceb5",".1 c #94d6b5",".C c #94d6bd",".9 c #94debd",".K c #9c94d6",".d c #9c9c9c",".w c #9cbdb5","#. c #9cbdd6","#s c #9ccebd",".2 c #9ccece",".0 c #9cdebd",".S c #9ce7bd",".Z c #9ce7c6",".U c #a594de","#L c #a5a5a5",".A c #a5b5de",".3 c #a5b5ef",".I c #a5cece","#k c #a5dec6",".s c #a5e7c6",".f c #adadad",".J c #adadef",".R c #adb5de",".i c #adcec6",".P c #add6c6",".j c #addece","#e c #ade7ce",".# c #b5b5b5",".H c #b5bdde",".Q c #b5dede",".r c #b5efd6",".e c #bdbdbd",".z c #bdc6f7",".y c #bdd6ff",".X c #bde7d6",".q c #bdefde",".Y c #bdf7de","#I c #c6c6c6",".x c #c6def7",".p c #c6f7e7","#C c #ced6ce",".G c #cedeff",".o c #ceffef",".F c #d6fff7","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt","QtQtQt.#.a.b.c.c.b.d.eQtQtQtQtQtQtQtQtQtQtQt","QtQt.f.g.h.i.j.j.k.l.b.#QtQtQtQtQtQtQtQtQtQt","Qt.f.m.n.o.o.p.q.r.s.t.u.eQtQtQtQtQtQtQtQtQt",".e.v.w.q.p.x.y.z.A.B.C.D.EQtQtQtQtQtQtQtQtQt",".d.h.F.q.G.H.I.I.J.K.L.M.N.#QtQtQtQtQtQtQtQt",".O.P.o.Q.R.B.S.T.A.U.V.B.W.dQtQtQtQtQtQtQtQt",".g.X.Y.Z.Z.0.1.2.3.4.5.6.7.8QtQtQtQtQtQtQtQt",".g.j.r.0.9.1#..3###a#b#c#d.8QtQtQtQtQtQtQtQt",".v.P#e.1.1#f.A#g.5#h#i#j.W.EQtQtQtQtQtQtQtQt",".E#c#k#f.L#l#m#n#o#p#p#q#r.fQtQtQtQtQtQtQtQt",".f.g#s#t#t#b#u.4#v#w#w#x.u.eQtQtQtQtQtQtQtQt","Qt.E.t#y#b.5#z#d#p#A#A#B.d#C.f.eQtQtQtQtQtQt","Qt.e.b#D#E#F#j#i#a.7.m.dQt.f#B.m.fQtQtQtQtQt","QtQt.e.E.N#D.W.W#G#H.fQtQt#I.b#J#K.E.eQtQtQt","QtQtQtQt.#.d.E.a#L#IQtQtQtQtQt#L#M#J#H.fQtQt","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.e.u#N#K.aQt","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.d#K#N#H","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##B.m","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt","QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};/* * Constructs a Form1 as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */Form1::Form1( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ), image0( (const char **) image0_data ), image1( (const char **) image1_data ), image2( (const char **) image2_data ), image3( (const char **) image3_data ), image4( (const char **) image4_data ), image5( (const char **) image5_data ), image6( (const char **) image6_data ), image7( (const char **) image7_data ), image8( (const char **) image8_data ), image9( (const char **) image9_data ), image10( (const char **) image10_data ){ (void)statusBar(); if ( !name ) setName( "Form1" ); setIcon( image0 ); setCentralWidget( new QWidget( this, "qt_central_widget" ) ); Form1Layout = new QGridLayout( centralWidget(), 1, 1, 0, 0, "Form1Layout"); splitter4 = new QSplitter( centralWidget(), "splitter4" ); splitter4->setOrientation( QSplitter::Vertical ); QWidget* privateLayoutWidget = new QWidget( splitter4, "layout11" ); layout11 = new QHBoxLayout( privateLayoutWidget, 11, 6, "layout11"); groupBox1 = new QGroupBox( privateLayoutWidget, "groupBox1" ); groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)1, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) ); groupBox1->setMinimumSize( QSize( 0, 0 ) ); groupBox1->setColumnLayout(0, Qt::Vertical ); groupBox1->layout()->setSpacing( 6 ); groupBox1->layout()->setMargin( 11 ); groupBox1Layout = new QGridLayout( groupBox1->layout() ); groupBox1Layout->setAlignment( Qt::AlignTop ); layout18 = new QGridLayout( 0, 1, 1, 0, 6, "layout18"); QSpacerItem* spacer = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); layout18->addItem( spacer, 3, 1 ); rectLabel = new QLabel( groupBox1, "rectLabel" ); layout18->addWidget( rectLabel, 0, 1 ); QSpacerItem* spacer_2 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); layout18->addItem( spacer_2, 3, 0 ); textLabel1 = new QLabel( groupBox1, "textLabel1" ); textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) ); layout18->addWidget( textLabel1, 4, 0 ); genLabel = new QLabel( groupBox1, "genLabel" ); layout18->addWidget( genLabel, 1, 1 ); textLabel1_2_2 = new QLabel( groupBox1, "textLabel1_2_2" ); textLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, textLabel1_2_2->sizePolicy().hasHeightForWidth() ) ); layout18->addWidget( textLabel1_2_2, 1, 0 ); textLabel1_2 = new QLabel( groupBox1, "textLabel1_2" ); textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) ); layout18->addWidget( textLabel1_2, 0, 0 ); lCDNumber1 = new QLCDNumber( groupBox1, "lCDNumber1" ); lCDNumber1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, lCDNumber1->sizePolicy().hasHeightForWidth() ) ); lCDNumber1->setMaximumSize( QSize( 60, 32767 ) ); layout18->addWidget( lCDNumber1, 4, 1 ); largLabel = new QLabel( groupBox1, "largLabel" ); layout18->addWidget( largLabel, 2, 1 ); textLabel1_3 = new QLabel( groupBox1, "textLabel1_3" ); textLabel1_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, textLabel1_3->sizePolicy().hasHeightForWidth() ) ); layout18->addWidget( textLabel1_3, 2, 0 ); groupBox1Layout->addLayout( layout18, 0, 0 ); layout11->addWidget( groupBox1 ); groupBox2 = new QGroupBox( privateLayoutWidget, "groupBox2" ); groupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, groupBox2->sizePolicy().hasHeightForWidth() ) ); groupBox2->setColumnLayout(0, Qt::Vertical ); groupBox2->layout()->setSpacing( 6 ); groupBox2->layout()->setMargin( 11 ); groupBox2Layout = new QGridLayout( groupBox2->layout() ); groupBox2Layout->setAlignment( Qt::AlignTop ); table1 = new QTable( groupBox2, "table1" ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "Width" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "Height" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "PosX" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "PosY" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "Num" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "Orient." ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr( "Order" ) ); table1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)3, 0, 0, table1->sizePolicy().hasHeightForWidth() ) ); table1->setMinimumSize( QSize( 0, 0 ) ); table1->setFocusPolicy( QTable::StrongFocus ); table1->setLineWidth( 1 ); table1->setResizePolicy( QTable::Default ); table1->setVScrollBarMode( QTable::AlwaysOn ); table1->setNumRows( 201 ); table1->setNumCols( 7 ); table1->setRowMovingEnabled( FALSE ); table1->setColumnMovingEnabled( FALSE ); table1->setSelectionMode( QTable::NoSelection ); groupBox2Layout->addWidget( table1, 0, 0 ); layout11->addWidget( groupBox2 ); frame5 = new QFrame( splitter4, "frame5" ); frame5->setMinimumSize( QSize( 810, 310 ) ); frame5->setFrameShape( QFrame::NoFrame ); frame5->setFrameShadow( QFrame::Raised ); frame5->setMargin( 4 ); frame5Layout = new QGridLayout( frame5, 1, 1, 4, 3, "frame5Layout"); frame3 = new QFrame( frame5, "frame3" ); frame3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, frame3->sizePolicy().hasHeightForWidth() ) ); frame3->setMinimumSize( QSize( 800, 300 ) ); frame3->setMaximumSize( QSize( 800, 300 ) ); frame3->setFrameShape( QFrame::StyledPanel ); frame3->setFrameShadow( QFrame::Raised ); frame3->setMargin( 0 ); frame3->setMidLineWidth( 0 ); frame5Layout->addWidget( frame3, 0, 0 ); Form1Layout->addWidget( splitter4, 0, 0 ); // actions fileNewAction = new QAction( this, "fileNewAction" ); fileNewAction->setIconSet( QIconSet( image1 ) ); fileOpenAction = new QAction( this, "fileOpenAction" ); fileOpenAction->setIconSet( QIconSet( image2 ) ); fileSaveAction = new QAction( this, "fileSaveAction" ); fileSaveAction->setIconSet( QIconSet( image3 ) ); fileSaveAsAction = new QAction( this, "fileSaveAsAction" ); filePrintAction = new QAction( this, "filePrintAction" ); filePrintAction->setIconSet( QIconSet( image4 ) ); fileExitAction = new QAction( this, "fileExitAction" ); editUndoAction = new QAction( this, "editUndoAction" ); editUndoAction->setIconSet( QIconSet( image5 ) ); editRedoAction = new QAction( this, "editRedoAction" ); editRedoAction->setIconSet( QIconSet( image6 ) ); editCutAction = new QAction( this, "editCutAction" ); editCutAction->setIconSet( QIconSet( image7 ) ); editCopyAction = new QAction( this, "editCopyAction" ); editCopyAction->setIconSet( QIconSet( image8 ) ); editPasteAction = new QAction( this, "editPasteAction" ); editPasteAction->setIconSet( QIconSet( image9 ) ); editFindAction = new QAction( this, "editFindAction" ); editFindAction->setIconSet( QIconSet( image10 ) ); helpContentsAction = new QAction( this, "helpContentsAction" ); helpIndexAction = new QAction( this, "helpIndexAction" ); helpAboutQtAction = new QAction( this, "helpAboutQtAction" ); executeLauchAction = new QAction( this, "executeLauchAction" ); helpAboutAction = new QAction( this, "helpAboutAction" ); configAction = new QAction( this, "configAction" ); // toolbars // menubar menubar = new QMenuBar( this, "menubar" ); fileMenu = new QPopupMenu( this ); fileOpenAction->addTo( fileMenu ); fileSaveAction->addTo( fileMenu ); fileMenu->insertSeparator(); filePrintAction->addTo( fileMenu ); fileMenu->insertSeparator(); fileExitAction->addTo( fileMenu ); menubar->insertItem( "", fileMenu, 0 ); PopupMenu_3 = new QPopupMenu( this ); executeLauchAction->addTo( PopupMenu_3 ); menubar->insertItem( "", PopupMenu_3, 1 ); PopupMenu_2 = new QPopupMenu( this ); configAction->addTo( PopupMenu_2 ); menubar->insertItem( "", PopupMenu_2, 2 ); PopupMenu = new QPopupMenu( this ); helpAboutAction->addTo( PopupMenu ); helpAboutQtAction->addTo( PopupMenu ); menubar->insertItem( "", PopupMenu, 3 ); languageChange(); resize( QSize(812, 614).expandedTo(minimumSizeHint()) ); // signals and slots connections connect( fileNewAction, SIGNAL( activated() ), this, SLOT( fileNew() ) ); connect( fileOpenAction, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); connect( fileSaveAction, SIGNAL( activated() ), this, SLOT( fileSave() ) ); connect( fileSaveAsAction, SIGNAL( activated() ), this, SLOT( fileSaveAs() ) ); connect( filePrintAction, SIGNAL( activated() ), this, SLOT( filePrint() ) ); connect( fileExitAction, SIGNAL( activated() ), this, SLOT( fileExit() ) ); connect( editUndoAction, SIGNAL( activated() ), this, SLOT( editUndo() ) ); connect( editRedoAction, SIGNAL( activated() ), this, SLOT( editRedo() ) ); connect( editCutAction, SIGNAL( activated() ), this, SLOT( editCut() ) ); connect( editCopyAction, SIGNAL( activated() ), this, SLOT( editCopy() ) ); connect( editPasteAction, SIGNAL( activated() ), this, SLOT( editPaste() ) ); connect( editFindAction, SIGNAL( activated() ), this, SLOT( editFind() ) ); connect( helpAboutQtAction, SIGNAL( activated() ), this, SLOT( helpAboutQt() ) ); connect( executeLauchAction, SIGNAL( activated() ), this, SLOT( redessiner() ) ); connect( helpAboutAction, SIGNAL( activated() ), this, SLOT( helpAbout() ) ); connect( configAction, SIGNAL( activated() ), this, SLOT( confSlot() ) ); // tab order init();}/* * Destroys the object and frees any allocated resources */Form1::~Form1(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void Form1::languageChange(){ setCaption( tr( "Form1" ) ); groupBox1->setTitle( tr( "Parameters" ) ); rectLabel->setText( tr( "<p align=\"right\">0</p>" ) ); textLabel1->setText( tr( "<b><h3>Height</h3></b>" ) ); genLabel->setText( tr( "<p align=\"right\">25</p>" ) ); textLabel1_2_2->setText( tr( "Iterations" ) ); textLabel1_2->setText( tr( "Rectangles" ) ); largLabel->setText( tr( "<p align=\"right\">6000</p>" ) ); textLabel1_3->setText( tr( "Band Width" ) ); groupBox2->setTitle( tr( "Data" ) ); table1->horizontalHeader()->setLabel( 0, tr( "Width" ) ); table1->horizontalHeader()->setLabel( 1, tr( "Height" ) ); table1->horizontalHeader()->setLabel( 2, tr( "PosX" ) ); table1->horizontalHeader()->setLabel( 3, tr( "PosY" ) ); table1->horizontalHeader()->setLabel( 4, tr( "Num" ) ); table1->horizontalHeader()->setLabel( 5, tr( "Orient." ) ); table1->horizontalHeader()->setLabel( 6, tr( "Order" ) ); QToolTip::add( table1, tr( "Enter Height and Width in the fist two columns" ) ); fileNewAction->setText( tr( "New" ) ); fileNewAction->setMenuText( tr( "&New" ) ); fileNewAction->setAccel( tr( "Ctrl+N" ) ); fileOpenAction->setText( tr( "Open" ) ); fileOpenAction->setMenuText( tr( "&Open..." ) ); fileOpenAction->setAccel( tr( "Ctrl+O" ) ); fileSaveAction->setText( tr( "Save" ) ); fileSaveAction->setMenuText( tr( "&Save" ) ); fileSaveAction->setAccel( tr( "Ctrl+S" ) ); fileSaveAsAction->setText( tr( "Save As" ) ); fileSaveAsAction->setMenuText( tr( "Save &As..." ) ); fileSaveAsAction->setAccel( QString::null ); filePrintAction->setText( tr( "Print" ) ); filePrintAction->setMenuText( tr( "&Print..." ) ); filePrintAction->setAccel( tr( "Ctrl+P" ) ); fileExitAction->setText( tr( "Exit" ) ); fileExitAction->setMenuText( tr( "E&xit" ) ); fileExitAction->setAccel( QString::null ); editUndoAction->setText( tr( "Undo" ) ); editUndoAction->setMenuText( tr( "&Undo" ) ); editUndoAction->setAccel( tr( "Ctrl+Z" ) ); editRedoAction->setText( tr( "Redo" ) ); editRedoAction->setMenuText( tr( "&Redo" ) ); editRedoAction->setAccel( tr( "Ctrl+Y" ) ); editCutAction->setText( tr( "Cut" ) ); editCutAction->setMenuText( tr( "&Cut" ) ); editCutAction->setAccel( tr( "Ctrl+X" ) ); editCopyAction->setText( tr( "Copy" ) ); editCopyAction->setMenuText( tr( "C&opy" ) ); editCopyAction->setAccel( tr( "Ctrl+C" ) ); editPasteAction->setText( tr( "Paste" ) ); editPasteAction->setMenuText( tr( "&Paste" ) ); editPasteAction->setAccel( tr( "Ctrl+V" ) ); editFindAction->setText( tr( "Find" ) ); editFindAction->setMenuText( tr( "&Find..." ) ); editFindAction->setAccel( tr( "Ctrl+F" ) ); helpContentsAction->setText( tr( "Contents" ) ); helpContentsAction->setMenuText( tr( "&Contents..." ) ); helpContentsAction->setAccel( QString::null ); helpIndexAction->setText( tr( "Index" ) ); helpIndexAction->setMenuText( tr( "&Index..." ) ); helpIndexAction->setAccel( QString::null ); helpAboutQtAction->setText( tr( "About Qt" ) ); helpAboutQtAction->setMenuText( tr( "&About Qt" ) ); helpAboutQtAction->setAccel( QString::null ); executeLauchAction->setText( tr( "Launch !" ) ); executeLauchAction->setToolTip( tr( "Launch !" ) ); executeLauchAction->setWhatsThis( tr( "Lancer !" ) ); helpAboutAction->setText( tr( "About LinPacker" ) ); configAction->setText( tr( "Options" ) ); menubar->findItem( 0 )->setText( tr( "&File" ) ); menubar->findItem( 1 )->setText( tr( "&Execute" ) ); menubar->findItem( 2 )->setText( tr( "Configuration" ) ); menubar->findItem( 3 )->setText( tr( "Help" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -