本文整理汇总了C++中QMdiSubWindow::adjustSize方法的典型用法代码示例。如果您正苦于以下问题:C++ QMdiSubWindow::adjustSize方法的具体用法?C++ QMdiSubWindow::adjustSize怎么用?C++ QMdiSubWindow::adjustSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow::adjustSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QVBoxLayout
//.........这里部分代码省略.........
MainWindow::getInstance()->createMdi(subWindow);
subWindow->setWidget(this);
mainWindow = new IScale_DynClampUI(subWindow);
// Construct Main Layout - vertical layout
QVBoxLayout *layout = new QVBoxLayout(this);
setLayout(layout);
layout->addWidget(mainWindow);
// Model Combo Box
mainWindow->modelComboBox->addItem("LivRudy 2009");
mainWindow->modelComboBox->addItem("FaberRudy 2000");
// Set GUI refresh rate
QTimer *timer = new QTimer(this);
timer->start(500);
// Set validators
mainWindow->APDRepolEdit->setValidator( new QIntValidator(mainWindow->APDRepolEdit) );
mainWindow->minAPDEdit->setValidator( new QIntValidator(mainWindow->minAPDEdit) );
mainWindow->stimWindowEdit->setValidator( new QIntValidator(mainWindow->stimWindowEdit) );
mainWindow->numTrialEdit->setValidator( new QIntValidator(mainWindow->numTrialEdit) );
mainWindow->intervalTimeEdit->setValidator( new QIntValidator(mainWindow->intervalTimeEdit) );
mainWindow->BCLEdit->setValidator( new QDoubleValidator(mainWindow->BCLEdit) );
mainWindow->stimMagEdit->setValidator( new QDoubleValidator(mainWindow->stimMagEdit) );
mainWindow->stimLengthEdit->setValidator( new QDoubleValidator(mainWindow->stimLengthEdit) );
mainWindow->CmEdit->setValidator( new QDoubleValidator(mainWindow->CmEdit) );
mainWindow->LJPEdit->setValidator( new QDoubleValidator(mainWindow->CmEdit) );
// Connect MainWindow elements to slot functions
QObject::connect( mainWindow->addStepButton, SIGNAL(clicked(void)),
this, SLOT( addStep(void)) );
QObject::connect( mainWindow->deleteStepButton, SIGNAL(clicked(void)),
this, SLOT( deleteStep(void)) );
QObject::connect( mainWindow->saveProtocolButton, SIGNAL(clicked(void)),
this, SLOT( saveProtocol(void)) );
QObject::connect( mainWindow->loadProtocolButton, SIGNAL(clicked(void)),
this, SLOT( loadProtocol(void)) );
QObject::connect( mainWindow->clearProtocolButton, SIGNAL(clicked(void)),
this, SLOT( clearProtocol(void)) );
QObject::connect( mainWindow->recordDataCheckBox, SIGNAL(clicked(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->startProtocolButton, SIGNAL(toggled(bool)),
this, SLOT( toggleProtocol(void)) );
QObject::connect( mainWindow->thresholdButton, SIGNAL(clicked(void)),
this, SLOT( toggleThreshold(void)) );
QObject::connect( mainWindow->staticPacingButton, SIGNAL(clicked(void)),
this, SLOT( togglePace(void)) );
QObject::connect( mainWindow->resetButton, SIGNAL(clicked(void)),
this, SLOT( reset(void)) );
QObject::connect( mainWindow->modelComboBox, SIGNAL(activated(int)),
this, SLOT( changeModel(int)) );
QObject::connect( mainWindow->APDRepolEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->minAPDEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->stimWindowEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->numTrialEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->intervalTimeEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->BCLEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->stimMagEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->stimLengthEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->CmEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect( mainWindow->LJPEdit, SIGNAL(returnPressed(void)),
this, SLOT( modify(void)) );
QObject::connect(timer, SIGNAL(timeout(void)),
this, SLOT(refreshDisplay(void)));
// Connections to allow only one button being toggled at a time
QObject::connect( mainWindow->thresholdButton, SIGNAL(toggled(bool)),
mainWindow->staticPacingButton, SLOT( setDisabled(bool)) );
QObject::connect( mainWindow->thresholdButton, SIGNAL(toggled(bool)),
mainWindow->startProtocolButton, SLOT( setDisabled(bool)) );
QObject::connect( mainWindow->startProtocolButton, SIGNAL(toggled(bool)),
mainWindow->staticPacingButton, SLOT( setDisabled(bool)) );
QObject::connect( mainWindow->startProtocolButton, SIGNAL(toggled(bool)),
mainWindow->thresholdButton, SLOT( setDisabled(bool)) );
QObject::connect( mainWindow->staticPacingButton, SIGNAL(toggled(bool)),
mainWindow->thresholdButton, SLOT( setDisabled(bool)) );
QObject::connect( mainWindow->staticPacingButton, SIGNAL(toggled(bool)),
mainWindow->startProtocolButton, SLOT( setDisabled(bool)) );
// Connect states to workspace
setData( Workspace::STATE, 0, &time );
setData( Workspace::STATE, 1, &voltage );
setData( Workspace::STATE, 2, &beatNum );
setData( Workspace::STATE, 3, &APD );
setData( Workspace::STATE, 4, &targetCurrent );
setData( Workspace::STATE, 5, &scaledCurrent );
subWindow->show();
subWindow->adjustSize();
} // End createGUI()