本文整理汇总了C++中SIGNAL类的典型用法代码示例。如果您正苦于以下问题:C++ SIGNAL类的具体用法?C++ SIGNAL怎么用?C++ SIGNAL使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SIGNAL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ofd
void MainWindow::fileOpen()
{
QFileDialog ofd(this, tr("Open ILDA file"), "");
ofd.setFileMode(QFileDialog::AnyFile);
ofd.setFilter(tr("ILDA files (*.ild);;All files (*.*)"));
ofd.setViewMode(QFileDialog::Detail);
if (ofd.exec())
{
QString fileName = ofd.selectedFiles().at(0);
QFileInfo fileInfo(fileName);
if (fileInfo.exists())
{
ReaderWriterILDA reader;
_sequence = QSharedPointer<Sequence>(reader.readFile(fileName));
_sequence->setPalette(*_currentPalette);
// Fill file statistics
fileNameLabel->setText(fileInfo.fileName());
fileSizeLabel->setText(getFileSize(fileInfo.size()));
ildaFormatLabel->setText(reader.version());
numberOfFramesLabel->setText(QString::number(_sequence->frameCount()));
// Set the current drawing mode (FIXME: Do not query the GUI for such infos)
if (normalRadioButton->isChecked())
_sequence->setDrawMode(Sequence::DrawModeNormal);
else if (diagnosticRadioButton->isChecked())
_sequence->setDrawMode(Sequence::DrawModeDiagnostic);
// Setup frame slider
frameSlider->setRange(0, _sequence->frameCount()-1);
// Build the connections
connect(_sequence.data(), SIGNAL(frameChanged(Frame*)), this, SLOT(frameChanged(Frame*)));
connect(firstFrameButton, SIGNAL(clicked()), _sequence.data(), SLOT(gotoFirstFrame()));
connect(lastFrameButton, SIGNAL(clicked()), _sequence.data(), SLOT(gotoLastFrame()));
connect(stopButton, SIGNAL(clicked()), _sequence.data(), SLOT(stopPlayback()));
connect(playButton, SIGNAL(clicked()), _sequence.data(), SLOT(startPlayback()));
connect(frameSlider, SIGNAL(valueChanged(int)), _sequence.data(), SLOT(setActiveFrame(int)));
connect(normalRadioButton, SIGNAL(clicked()), this, SLOT(drawModeChanged()));
connect(diagnosticRadioButton, SIGNAL(clicked()), this, SLOT(drawModeChanged()));
QGraphicsScene *scene = new QGraphicsScene();
scene->addItem(_sequence.data());
graphicsView->setScene(scene);
// FIXME: Need to call this until a resize event happens.
resizeEvent(NULL);
}
示例2: connect
/// Adds machine @a m to the project
void Project::addMachine(Machine* m)
{
if (!m)
return;
machine = m;
machine->setProject(this);
connect(machine, SIGNAL(newCanvasSize(int,int)), main->getScrollView()->getDrawArea(), SLOT(resizeContentsNotSmaller(int,int)) );
connect(main->getScrollView()->getDrawArea(), SIGNAL(updateCanvasSize(int,int, double)), machine, SLOT(updateCanvasSize(int, int, double)) ); // re-added 19/01/2015
connect(machine, SIGNAL(repaint()), main, SLOT(repaintViewport()));
main->updateIOView(machine);
}
示例3: setFleetHealth
void HumanPlayer::installFleet()
{
setFleetHealth(myField->getFleet());
connect(plrFieldView.data(), SIGNAL(placeShip(int,int)), myField.data(), SLOT(setShip(int,int)));
connect(plrFieldView.data(), SIGNAL(deleteShip(int)), myField.data(), SLOT(deleteShip(int)));
connect(infoTab.data(), SIGNAL(readyToFight()), myField.data(), SLOT(checkIsFleetReady()));
connect(myField.data(), SIGNAL(fleetInstalled()), this, SLOT(reEmitFleetInstalled()));
/*
connect(fleetInstaller, SIGNAL(shipPlacedSuccesfully(NameOfShips, int))
, view, SLOT(changeCounter(NameOfShips,int)));
*/
}
示例4: connect
void MainWindow2::makeColorPaletteConnections()
{
connect(m_pColorPalette, SIGNAL(colorChanged(QColor)),
editor->colorManager(), SLOT(pickColor(QColor)));
connect(m_pColorPalette, SIGNAL(colorNumberChanged(int)),
editor->colorManager(), SLOT(pickColorNumber(int)));
connect(editor->colorManager(), SIGNAL(colorChanged(QColor)),
m_pColorPalette, SLOT(setColor(QColor)));
connect(editor->colorManager(), SIGNAL(colorNumberChanged(int)),
m_pColorPalette, SLOT(selectColorNumber(int)));
}
示例5: S60VideoDisplay
S60VideoWidgetDisplay::S60VideoWidgetDisplay(QObject *parent)
: S60VideoDisplay(parent)
, m_widget(new S60VideoWidget)
{
connect(this, SIGNAL(paintingEnabledChanged(bool)), m_widget, SLOT(setPaintingEnabled(bool)));
connect(this, SIGNAL(fullScreenChanged(bool)), m_widget, SLOT(setFullScreen(bool)));
connect(this, SIGNAL(contentRectChanged(const QRect&)), m_widget, SLOT(setContentRect(const QRect &)));
#ifndef VIDEOOUTPUT_GRAPHICS_SURFACES
connect(m_widget, SIGNAL(beginVideoWidgetNativePaint()), this, SIGNAL(beginVideoWindowNativePaint()));
connect(m_widget, SIGNAL(endVideoWidgetNativePaint()), this, SIGNAL(endVideoWindowNativePaint()));
#endif
m_widget->installEventFilter(this);
m_widget->setPaintingEnabled(false);
}
示例6: CellmlAnnotationViewWidget
QWidget * CellMLAnnotationViewPlugin::viewWidget(const QString &pFileName)
{
// Check that we are dealing with a CellML file
if (!CellMLSupport::CellmlFileManager::instance()->cellmlFile(pFileName))
// We are not dealing with a CellML file, so...
return 0;
// Retrieve the view widget associated with the file name
CellmlAnnotationViewWidget *res = mViewWidgets.value(pFileName);
// Create a new view widget, if none could be retrieved
if (!res) {
res = new CellmlAnnotationViewWidget(this, pFileName, mMainWindow);
// Initialise our new view widget's sizes
res->setSizes(mSizes);
res->metadataDetails()->splitter()->setSizes(mMetadataDetailsWidgetSizes);
// Keep track of the splitter move in our new view widget
connect(res, SIGNAL(splitterMoved(const QList<int> &)),
this, SLOT(splitterMoved(const QList<int> &)));
connect(res->metadataDetails(), SIGNAL(splitterMoved(const QList<int> &)),
this, SLOT(metadataDetailsWidgetSplitterMoved(const QList<int> &)));
// Some other connections to handle splitter moves between our view
// widgets
foreach (CellmlAnnotationViewWidget *viewWidget, mViewWidgets) {
// Make sur that our new view widget is aware of any splitter move
// occuring in the other view widget
connect(res, SIGNAL(splitterMoved(const QList<int> &)),
viewWidget, SLOT(updateSizes(const QList<int> &)));
connect(res->metadataDetails(), SIGNAL(splitterMoved(const QList<int> &)),
viewWidget->metadataDetails(), SLOT(updateSizes(const QList<int> &)));
// Make sur that the other view widget is aware of any splitter move
// occuring in our new view widget
connect(viewWidget, SIGNAL(splitterMoved(const QList<int> &)),
res, SLOT(updateSizes(const QList<int> &)));
connect(viewWidget->metadataDetails(), SIGNAL(splitterMoved(const QList<int> &)),
res->metadataDetails(), SLOT(updateSizes(const QList<int> &)));
}
示例7: QToolBar
PenBrushToolBar::PenBrushToolBar(DiagramView* diagram) : QToolBar("Pen and Brush")
{
mDiagram = diagram;
connect(mDiagram, SIGNAL(propertiesChanged()), this, SLOT(updateDiagramUnits()));
connect(this, SIGNAL(propertyChanged(const QString&,const QVariant&)),
mDiagram, SLOT(updateItemProperty(const QString&,const QVariant&)));
connect(this, SIGNAL(propertiesChanged(const QHash<QString,QVariant>&)),
mDiagram, SLOT(updateDefaultItemProperties(const QHash<QString,QVariant>&)));
mPenWidthEdit = new UnitsValueEdit(mDiagram->scene()->units(), UnitsValueEdit::NonNegativesOnly, false);
mPenWidthEdit->setValue(mPenWidthEdit->units() == UnitsMils ? 16 : 0.4);
mPenWidthEdit->setToolTip("Pen width");
connect(mPenWidthEdit, SIGNAL(editingFinished()), this, SLOT(updatePenWidth()));
mPenStyleButton = new PenStyleToolButton();
mPenStyleButton->setToolTip("Pen Style");
connect(mPenStyleButton, SIGNAL(styleChanged(Qt::PenStyle)), this, SLOT(updatePenStyle(Qt::PenStyle)));
mStartArrowButton = new ArrowStyleToolButton(false);
mStartArrowButton->setToolTip("Start Arrow Style");
mStartArrowButton->setStyle(DrawingArrow::None);
connect(mStartArrowButton, SIGNAL(styleChanged(DrawingArrow::Style)), this, SLOT(updateStartArrowStyle(DrawingArrow::Style)));
mEndArrowButton = new ArrowStyleToolButton(true);
mEndArrowButton->setToolTip("End Arrow Style");
mEndArrowButton->setStyle(DrawingArrow::None);
connect(mEndArrowButton, SIGNAL(styleChanged(DrawingArrow::Style)), this, SLOT(updateEndArrowStyle(DrawingArrow::Style)));
mPenColorButton = new ColorToolButton(QIcon(":/icons/oxygen/pen.png"), "Pen Color");
mPenColorButton->setColor(QColor(0, 0, 0));
mPenColorButton->setToolTip("Pen Color");
connect(mPenColorButton, SIGNAL(colorChanged(const QColor&)), this, SLOT(updatePenColor(const QColor&)));
mBrushColorButton = new ColorToolButton(QIcon(":/icons/oxygen/fill-color.png"), "Brush Color");
mBrushColorButton->setColor(QColor(255, 255, 255));
mBrushColorButton->setToolTip("Brush Color");
connect(mBrushColorButton, SIGNAL(colorChanged(const QColor&)), this, SLOT(updateBrushColor(const QColor&)));
setObjectName("PenBrushToolBar");
addWidget(mPenStyleButton);
addWidget(mPenWidthEdit);
addSeparator();
addWidget(mStartArrowButton);
addWidget(mEndArrowButton);
addSeparator();
addWidget(mPenColorButton);
addWidget(mBrushColorButton);
emit propertiesChanged(properties());
}
示例8: QWidget
RegAccess::RegAccess(QWidget *parent, Qt::WFlags flags)
: QWidget(parent, flags)
, m_currentStep(-1)
, m_bEnable_SlotRegAccessItemStateChanged(true)
, m_gpio(0xAA)
{
setupUi(this);
//QWidget* widget = new QWidget(scrollArea);
QVBoxLayout* layout = new QVBoxLayout(groupBoxRegAcessItems);
QSignalMapper* signalMapper = new QSignalMapper(this);
for (int i = 0; i < 16; ++i)
{
RegAccessItem* widget = new RegAccessItem(groupBoxRegAcessItems);
widget->labelNo->setText(QString("%1").arg(i));
widget->setMinimumSize(QSize(0, 20));
widget->setMaximumSize(QSize(16777215, 16777215));
layout->addWidget(widget);
connect(widget->checkBox, SIGNAL(stateChanged(int)), signalMapper, SLOT(map()));
signalMapper->setMapping(widget->checkBox, widget);
m_regAccessItems.push_back(widget);
}
connect(signalMapper, SIGNAL(mapped(QWidget*)),
this, SLOT(slotRegAccessItemStateChanged(QWidget*)));
bool ok = connect(buttonGroup0, SIGNAL(buttonClicked(int)), this, SLOT(SetGpio(int)));
Q_ASSERT(ok);
ok = connect(buttonGroup1, SIGNAL(buttonClicked(int)), this, SLOT(SetGpio(int)));
Q_ASSERT(ok);
ok = connect(buttonGroup2, SIGNAL(buttonClicked(int)), this, SLOT(SetGpio(int)));
Q_ASSERT(ok);
ok = connect(buttonGroup3, SIGNAL(buttonClicked(int)), this, SLOT(SetGpio(int)));
Q_ASSERT(ok);
//connect(buttonGroup1, SIGNAL(clicked(int)), SLOT(SetGpio()));
//connect(buttonGroup2, SIGNAL(clicked(int)), SLOT(SetGpio()));
//connect(buttonGroup3, SIGNAL(clicked(int)), SLOT(SetGpio()));
QSpacerItem* verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
layout->addItem(verticalSpacer);
m_settings.beginGroup("RegAccess");
readSettings(m_settings);
}
示例9: serverId
Thread::Thread(uint _serverId, uint _threadId, uint to, uint rc, bool _validated, bool _validate, QWidget * p, NntpHost *nh) :
serverId(_serverId), threadId(_threadId), threadTimeout(rc * 60 * 1000) /* minutes */, validated(_validated)
{
retryCount = 0;
timeout = to * 1000;
//qDebug() << "Idle to = " << threadTimeout;
threadBytes = new uint;
*threadBytes = 0;
prevBytes = 0;
resetSpeed();
QueueScheduler* queueScheduler = ((QMgr*)p)->getQueueScheduler();
nntpT = new NntpThread(serverId, threadId, threadBytes, queueScheduler->getIsRatePeriod(), queueScheduler->getIsNilPeriod(), validated, _validate, nh, (QMgr*)p);
connect(nntpT, SIGNAL(StartedWorking(int, int)), p, SLOT(started(int, int)));
connect(nntpT, SIGNAL(Start(Job *)), p, SLOT(start(Job *)));
connect(nntpT, SIGNAL(DownloadFinished(Job *)), p, SLOT(finished(Job *)));
connect(nntpT, SIGNAL(DownloadCancelled(Job *)), p, SLOT(downloadCancelled(Job *)));
connect(nntpT, SIGNAL(DownloadError(Job *, int)), p, SLOT(downloadError(Job *, int)));
connect(nntpT, SIGNAL(Finished(Job *)), p, SLOT(finished(Job *)));
connect(nntpT, SIGNAL(Cancelled(Job *)), p, SLOT(cancel(Job *)));
connect(nntpT, SIGNAL(Err(Job *, int)), p, SLOT(Err(Job *, int)));
connect(nntpT, SIGNAL(Failed(Job *, int)), p, SLOT(Failed(Job *, int)));
connect(nntpT, SIGNAL(SigPaused(int, int, bool)), p, SLOT(paused(int, int, bool)));
connect(nntpT, SIGNAL(SigDelayed_Delete(int, int)), p, SLOT(delayedDelete(int, int)));
connect(nntpT, SIGNAL(SigReady(int, int)), p, SLOT(stopped(int, int)));
connect(nntpT, SIGNAL(SigClosingConnection(int, int)), p, SLOT(connClosed(int, int)));
connect(nntpT, SIGNAL(SigUpdate(Job *, uint, uint, uint)), p, SLOT(update(Job *, uint, uint, uint)));
connect(nntpT, SIGNAL(SigUpdatePost(Job *, uint, uint, uint, uint)), p, SLOT(updatePost(Job *, uint, uint, uint, uint)));
connect(nntpT, SIGNAL(SigUpdateLimits(Job *, uint, uint, uint)), p, SLOT(updateLimits(Job *, uint, uint, uint)));
connect(nntpT, SIGNAL(sigHeaderDownloadProgress(Job*, quint64, quint64, quint64)), p, SLOT(slotHeaderDownloadProgress(Job*, quint64, quint64, quint64)));
connect(nntpT, SIGNAL(SigExtensions(Job *, quint16, quint64)), p, SLOT(updateExtensions(Job *, quint16, quint64)));
connect(nntpT, SIGNAL(logMessage(int, QString)), quban->getLogAlertList(), SLOT(logMessage(int, QString)));
connect(nntpT, SIGNAL(logEvent(QString)), quban->getLogEventList(), SLOT(logEvent(QString)));
connect(nntpT, SIGNAL(serverValidated(uint, bool, QString, QList<QSslError>)), p, SLOT(serverValidated(uint, bool, QString, QList<QSslError>)));
connect(nntpT, SIGNAL(registerSocket(RcSslSocket*)), p, SIGNAL(registerSocket(RcSslSocket*))); // Pass it on to RateController
connect(nntpT, SIGNAL(unregisterSocket(RcSslSocket*)), p, SIGNAL(unregisterSocket(RcSslSocket*))); // Pass it on to RateController
speedTimer = new QTimer();
speedTimer->setSingleShot(false);
idleTimer = new QTimer();
retryTimer = new QTimer();
connect(speedTimer, SIGNAL(timeout()), SLOT(slotSpeedTimeout()));
connect(idleTimer, SIGNAL(timeout()), SLOT(slotIdleTimeout()));
connect(retryTimer, SIGNAL(timeout()), SLOT(slotRetryTimeout()));
}
示例10: QLabel
MainWindow::MainWindow(QApplication* app)
{
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
this->setWindowTitle("kmeans");
// create status bar
m_framesPerSec = new QLabel("nA");
m_framesPerSec->setMinimumSize(m_framesPerSec->sizeHint());
m_framesPerSec->setAlignment(Qt::AlignLeft);
m_framesPerSec->setToolTip("Current frames per second not yet initialized.");
statusBar()->addWidget(m_framesPerSec);
m_viewport = new Viewport(this);
m_viewport->show();
m_toolBox = new ToolBox();
QSplitter* splitter = new QSplitter(Qt::Horizontal);
splitter->insertWidget(0, m_toolBox);
splitter->insertWidget(1, m_viewport);
QList<int> sizes;
sizes.append(200);
sizes.append(1300);
splitter->setSizes(sizes);
splitter->setStretchFactor(0, 1);
splitter->setStretchFactor(1, 1);
splitter->setChildrenCollapsible(false);
setCentralWidget(splitter);
connect(m_viewport, SIGNAL(framesPerSecondChanged(int)), this, SLOT(updateFramesPerSecond(int)));
connect(m_toolBox, SIGNAL(setSeedingAlgorithm(SeedingAlgorithm)), m_viewport, SLOT(setSeedingAlgorithm(SeedingAlgorithm)));
connect(m_toolBox->m_doClusterButton, SIGNAL(clicked()), m_viewport, SLOT(doCluster()));
connect(m_toolBox->m_findKButton, SIGNAL(clicked()), m_viewport, SLOT(findK()));
connect(m_toolBox->m_kBox, SIGNAL(valueChanged(int)), m_viewport, SLOT(setK(int)));
connect(m_toolBox->m_iterationsBox, SIGNAL(valueChanged(int)), m_viewport, SLOT(setIterations(int)));
connect(m_toolBox->m_runBox, SIGNAL(valueChanged(int)), m_viewport, SLOT(setRuns(int)));
connect(m_toolBox->m_clearButton, SIGNAL(clicked()), m_viewport, SLOT(doClear()));
connect(m_toolBox->m_clearSeedButton, SIGNAL(clicked()), m_viewport, SLOT(doClearSeed()));
show();
this->adjustSize();
m_viewport->updateGL();
m_viewport->m_timer->start();
}
示例11: QMainWindow
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
video=new VideoWidget;
wid=new Widget;
/*docwidget=new QDockWidget("Controlers",this);
docwidget->setWidget(wid);
docwidget->setFloating(false);
addDockWidget(Qt::BottomDockWidgetArea,docwidget);*/
list=new QListWidget;
media=new QMediaPlayer;
video=new VideoWidget;
connect(wid->play,SIGNAL(clicked(bool)),this,SLOT(playmedia()));
connect(wid->stop,SIGNAL(clicked(bool)),this,SLOT(stopmedia()));
connect(wid->volume,SIGNAL(clicked(bool)),this,SLOT(mute()));
connect(wid->vol,SIGNAL(valueChanged(int)),media,SLOT(setVolume(int)));
connect(wid->vol,SIGNAL(valueChanged(int)),wid->l,SLOT(setNum(int)));
connect(wid->vol,SIGNAL(valueChanged(int)),media,SLOT(setVolume(int)));
connect(media,&QMediaPlayer::durationChanged,wid->slider,&QSlider::setMaximum);
connect(wid->slider,&QSlider::sliderMoved,media,&QMediaPlayer::setPosition);
connect(wid->slider,&QSlider::valueChanged,this,&MainWindow::endofmedia);
connect(media,&QMediaPlayer::positionChanged,wid->slider,&QSlider::setValue);
connect(media,&QMediaPlayer::positionChanged,this,&MainWindow::updateduration);
connect(wid->netx,&QToolButton::clicked,this,&MainWindow::netxtrack);
connect(wid->prev,&QToolButton::clicked,this,&MainWindow::prevtrack);
connect(wid->replay,&QToolButton::clicked,this,&MainWindow::replay);
connect(list,SIGNAL(activated(QModelIndex)),this,SLOT(curentmediachange(QModelIndex)));
//connect(media,SIGNAL(mediaChanged(QMediaContent)),this,SLOT(SetWindowTitle(QMediaContent)));
p=new QMediaPlaylist;
connect(wid->playlist,&QToolButton::clicked,this,&MainWindow::addtoplaylist);
media->setVideoOutput(video);
QScrollBar *scrol1=new QScrollBar;
list->addScrollBarWidget(scrol1,Qt::AlignBottom);
QScrollBar *scrol2=new QScrollBar;
list->addScrollBarWidget(scrol2,Qt::AlignBottom);
QWidget *W=new QWidget;
QBoxLayout *hb=new QHBoxLayout;
hb->addWidget(video, 2);
hb->addWidget(list);
QBoxLayout *vb=new QVBoxLayout;
vb->addLayout(hb);
vb->addWidget(wid);
W->setLayout(vb);
setCentralWidget(W);
QSize Size;
Size.setWidth(200);
Size.setHeight(100);
setMinimumSize(video->size()+Size);
setWindowIcon(QIcon(tr(":/Multimedia 1.ico")));
}
示例12: WebDialogProviderValidatedSpinBox
int WebDialogProvider::getInteger(QWidget *parent,
const QString &title, const QString &label, int value,
int minValue, int maxValue, int step, bool *ok, Qt::WindowFlags flags)
{
WebDialogProviderValidatedSpinBox *sb =
new WebDialogProviderValidatedSpinBox(minValue, maxValue, step, value);
WebDialogProvider dlg(title, label, parent, sb, flags);
connect(sb, SIGNAL(textChanged(bool)), dlg.okButton, SLOT(setEnabled(bool)));
bool accepted = (dlg.exec() == QDialog::Accepted);
if (ok)
{
*ok = accepted;
}
return sb->value();
}
示例13: newRequestNoParams
void newRequestNoParams() {
QVERIFY(this->so->write(binaryBeginRequest(1, 1, 0)) > 0);
QVERIFY(this->so->write(binaryParam(1, QByteArray())) > 0);
QSignalSpy spy(this->fcgi, SIGNAL(newRequest(QFCgiRequest*)));
QObject::connect(this->fcgi, SIGNAL(newRequest(QFCgiRequest*)), loop, SLOT(quit()));
loop->exec();
QFCgiRequest *request = qvariant_cast<QFCgiRequest*>(spy.at(0).at(0));
QVERIFY(request != 0);
QCOMPARE(request->getParams().count(), 0);
request->endRequest(0);
}
示例14: _ui
MainWidget::MainWidget( QWidget * parent )
:QWidget(parent), _ui(new Ui::MainWidget)
{
this->_ui->setupUi(this);
connect(_ui->buttonCamera, SIGNAL(clicked()), this, SLOT(startCamera()));
connect(_ui->buttonLoadFile, SIGNAL(clicked()), this, SLOT(loadFile()));
connect(_ui->checkBoxEdgeDetect, SIGNAL(toggled(bool)), this, SLOT(enableEdgeDetector(bool)));
this->_capture = new ImageCapture(this);
connect(_capture, SIGNAL(error(const QString&)), this, SLOT(captureError(const QString&)));
connect(_capture, SIGNAL(imageCaptured(const QImage&)), this, SLOT(displayImage(const QImage&)));
connect(_ui->sliderThreshold, SIGNAL(valueChanged(int)), _capture, SLOT(setEdgeDetectorThreshold(int)));
connect(_ui->checkBoxFlip, SIGNAL(toggled(bool)), _capture, SLOT(flipImage(bool)));
_ui->sliderThreshold->setEnabled( _ui->checkBoxEdgeDetect->isChecked() );
_capture->flipImage( _ui->checkBoxFlip->isChecked() );
}
示例15: ReviewWidget
void MainWindow::previewChanges()
{
m_reviewWidget = new ReviewWidget(m_stack);
connect(this, SIGNAL(backendReady(QApt::Backend*)),
m_reviewWidget, SLOT(setBackend(QApt::Backend*)));
m_reviewWidget->setBackend(m_backend);
m_stack->addWidget(m_reviewWidget);
m_stack->setCurrentWidget(m_reviewWidget);
m_previewAction->setIcon(QIcon::fromTheme("go-previous"));
m_previewAction->setText(i18nc("@action:intoolbar Return from the preview page", "Back"));
disconnect(m_previewAction, SIGNAL(triggered()), this, SLOT(previewChanges()));
connect(m_previewAction, SIGNAL(triggered()), this, SLOT(returnFromPreview()));
}