?? readdir.cpp
字號:
/****************************************************************************** Form implementation generated from reading ui file 'readdir.ui'**** Created: 四 4月 17 15:05:50 2008** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.5 edited Aug 31 12:13 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "readDir.h"#include <qvariant.h>#include <qlabel.h>#include <qbuttongroup.h>#include <qlistbox.h>#include <qcombobox.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "readdir.ui.h"/* * Constructs a ReadDir 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. */ReadDir::ReadDir( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ){ if ( !name ) setName( "ReadDir" ); ParentDirText = new QLabel( this, "ParentDirText" ); ParentDirText->setGeometry( QRect( 20, 20, 70, 41 ) ); buttonGroup1 = new QButtonGroup( this, "buttonGroup1" ); buttonGroup1->setGeometry( QRect( 0, 80, 460, 240 ) ); DirList = new QListBox( buttonGroup1, "DirList" ); DirList->setGeometry( QRect( 20, 20, 430, 210 ) ); ParentDir = new QComboBox( FALSE, this, "ParentDir" ); ParentDir->setGeometry( QRect( 100, 20, 181, 41 ) ); languageChange(); resize( QSize(465, 336).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( ParentDir, SIGNAL( activated(const QString&) ), DirList, SLOT( clear() ) ); connect( ParentDir, SIGNAL( activated(const QString&) ), this, SLOT( ShowDirList() ) ); init();}/* * Destroys the object and frees any allocated resources */ReadDir::~ReadDir(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void ReadDir::languageChange(){ setCaption( tr( "Read Dir" ) ); ParentDirText->setText( trUtf8( "\xe7\x88\xb6\xe7\x9b\xae\xe5\xbd\x95\xef\xbc\x9a" ) ); buttonGroup1->setTitle( trUtf8( "\xe7\x9b\xae\xe5\xbd\x95\xe5\x88\x97\xe8\xa1\xa8" ) ); DirList->clear(); DirList->insertItem( tr( "New Item" ) ); ParentDir->clear(); ParentDir->insertItem( tr( "/etc" ) ); ParentDir->insertItem( tr( "/home" ) ); ParentDir->insertItem( tr( "/bin" ) ); ParentDir->insertItem( tr( "/proc" ) ); ParentDir->insertItem( tr( "/dev" ) ); ParentDir->insertItem( tr( "/lib" ) ); ParentDir->insertItem( tr( "/usr" ) ); ParentDir->insertItem( tr( "/tmp" ) );}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -