📄 diwidget.cpp.svn-base
字号:
/* * Author: $Author: vincent $ * Date: $Date: 2006/04/24 02:28:56 $ * Module: $RCSfile: diwidget.cpp,v $ * Revision:$Revision: 1.3 $ * Status: $State: Exp $ */#include <QtGui>#include <QtNetwork>#include "diwidget.h"DIWidget::DIWidget(QWidget *parent) :QGroupBox(parent){ /* Create buttons */ selectButton=new QPushButton(tr("Select")); connect(selectButton,SIGNAL(clicked()),this,SLOT(_select())); sendButton=new QPushButton(tr("Send")); connect(sendButton,SIGNAL(clicked()),this,SLOT(_send())); stopButton=new QPushButton(tr("Stop")); connect(stopButton,SIGNAL(clicked()),this,SLOT(_stop())); /* Create Progress */ progressBar=new QProgressBar; /* Set Layout */ QHBoxLayout *buttonsLayout=new QHBoxLayout; buttonsLayout->addWidget(selectButton); buttonsLayout->addWidget(sendButton); buttonsLayout->addWidget(stopButton); QVBoxLayout *mainLayout=new QVBoxLayout; mainLayout->addLayout(buttonsLayout); mainLayout->addWidget(progressBar); setLayout(mainLayout); setTitle(tr("Transmit"));}void DIWidget::_select(){ emit wantToSelectFile();}void DIWidget::_send(){ emit wantToSendFile();}void DIWidget::_stop(){ emit wantToStopSend();}void DIWidget::enableButtons(bool bEnabled){ //selectButton->setEnabled(bEnabled); sendButton->setEnabled(bEnabled); stopButton->setEnabled(!bEnabled);}void DIWidget::setEnabled(bool bEnabled){ QGroupBox::setEnabled(bEnabled);}void DIWidget::setMaximum(int maximum){ progressBar->setMaximum(maximum); }void DIWidget::setValue(int value){ progressBar->setValue(value);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -