📄 findbase.cpp
字号:
/****************************************************************************** Form implementation generated from reading ui file 'findbase.ui'**** Created: Fri Jul 20 11:15:33 2007** by: The User Interface Compiler (uic)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "findbase.h"#include "mainmenu.h"#include "dialog.h"#include <qlabel.h>#include <qlineedit.h>#include <qpushbutton.h>#include <qlayout.h>#include <qvariant.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qstring.h>/* * Constructs a findbase which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */findbase::findbase( QWidget* parent, const char* name, WFlags fl ) : QDialog( parent, name, TRUE ){ if ( !name ) setName( "findbase" ); resize( 140, 92 ); setMinimumSize( QSize( 6, 6 ) ); setMaximumSize( QSize( 140, 96 ) ); setCaption( tr( "Find" ) ); findbutton = new QPushButton( this, "findbutton" ); findbutton->setEnabled( FALSE ); findbutton->setGeometry( QRect( 30, 68, 40, 20 ) ); findbutton->setText( tr( "find" ) ); findbutton->setAutoDefault( FALSE ); findbutton->setDefault( TRUE ); fanhuibutton = new QPushButton( this, "fanhuibutton" ); fanhuibutton->setGeometry( QRect( 80, 68, 40, 20 ) ); fanhuibutton->setText( tr( "fanhui" ) ); fanhuibutton->setAutoDefault( FALSE ); LineEdit1 = new QLineEdit( this, "LineEdit1" ); LineEdit1->setGeometry( QRect( 62, 8, 68, 20 ) ); LineEdit17_2 = new QLineEdit( this, "LineEdit17_2" ); LineEdit17_2->setGeometry( QRect( 62, 40, 68, 20 ) ); TextLabel1 = new QLabel( this, "TextLabel1" ); TextLabel1->setGeometry( QRect( 3, 8, 56, 20 ) ); TextLabel1->setMaximumSize( QSize( 32765, 32767 ) ); TextLabel1->setText( tr( "qishidian:" ) ); TextLabel4 = new QLabel( this, "TextLabel4" ); TextLabel4->setGeometry( QRect( 3, 40, 56, 20 ) ); TextLabel4->setMaximumSize( QSize( 32766, 32767 ) ); TextLabel4->setText( tr( "mudididia:" ) ); // signals and slots connections connect( fanhuibutton, SIGNAL( clicked() ), this, SLOT( close() ) ); connect( fanhuibutton, SIGNAL( clicked() ), this, SLOT( mainmenudialog())); connect( findbutton, SIGNAL( clicked() ), this, SLOT( findpath() ) ); connect( LineEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(fuzhi1(const QString &))); connect( LineEdit17_2,SIGNAL(textChanged(const QString &)),this,SLOT(fuzhi2(const QString &))); connect( LineEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(enablefindbutton(const QString &)));}/* * Destroys the object and frees any allocated resources */findbase::~findbase(){ // no need to delete child widgets, Qt does it all for us}void findbase::enablefindbutton(const QString &text){ // qWarning( "findbase::enablefindbutton(const QString &): Not implemented yet!" ); findbutton->setEnabled(!text.isEmpty());}void findbase::findpath(){ //qWarning( "findbase::findpath(): Not implemented yet!" ); Dialog *Planning = new Dialog(0,"planning"); Planning->setCaption(tr("Route Planning")); Planning->exec(); delete Planning;}void findbase::fuzhi1(const QString &text){ //qWarning( "findbase::fuzhi(): Not implemented yet!" ); extern int startid; QString str(text); bool ok; startid = str.toInt(&ok,10);}void findbase::fuzhi2(const QString &text){ extern int endid; QString str(text); bool ok; endid = str.toInt(&ok,10); }void findbase::mainmenudialog(){ mainmenubase *f = new mainmenubase(0,"mainmenu"); f->exec(); delete f;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -