📄 newurl.cpp
字号:
/* * by balancesli * balancesli@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#include "NewUrl.h"#include <qvariant.h>#include <qpushbutton.h>#include <qlabel.h>#include <qlineedit.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>/* * Constructs a frmNewUrl as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */frmNewUrl::frmNewUrl( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ){ if ( !name ) setName( "frmNewUrl" ); setModal( TRUE ); textLabel1 = new QLabel( this, "textLabel1" ); textLabel1->setGeometry( QRect( 30, 20, 109, 22 ) ); textLabel2 = new QLabel( this, "textLabel2" ); textLabel2->setGeometry( QRect( 30, 90, 320, 22 ) ); pbOK = new QPushButton( this, "pbOK" ); pbOK->setGeometry( QRect( 160, 160, 110, 38 ) ); connect(pbOK, SIGNAL(clicked()), this, SLOT(accept()) ); pbCancel = new QPushButton( this, "pbCancel" ); pbCancel->setGeometry( QRect( 300, 160, 110, 38 ) ); connect(pbCancel, SIGNAL(clicked()), this, SLOT(close()) ); edtUrl = new QLineEdit( this, "edtUrl" ); edtUrl->setGeometry( QRect( 30, 50, 390, 29 ) ); edtDir = new QLineEdit( this, "edtDir" ); edtDir->setGeometry( QRect( 30, 120, 390, 29 ) ); languageChange(); resize( QSize(442, 208).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished );}/* * Destroys the object and frees any allocated resources */frmNewUrl::~frmNewUrl(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void frmNewUrl::languageChange(){ setCaption( tr( "NewTask" ) ); pbCancel->setText( tr( "Cancel" ) ); textLabel1->setText( tr( "Enter URL" ) ); textLabel2->setText( tr( "Directory to download the files" ) ); pbOK->setText( tr( "OK" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -