Q_Interface::Q_Interface(QWidget *parent) : QWidget(parent) { ui.setupUi(this); QObject::connect(ui.button_Exit, SIGNAL(clicked()), this, SLOT(slot_Finished())); QObject::connect(ui.button_Register, SIGNAL(clicked()), this, SLOT(slot_Register())); QObject::connect(ui.button_Login, SIGNAL(clicked()), this, SLOT(slot_Login())); }
TopPatchesWidget<TImage>::TopPatchesWidget(QWidget* parent) : TopPatchesWidgetParent(parent), SecondaryPatchDistanceFunctor(NULL) { this->setupUi(this); // Make the cells fit the images (based on the sizeHint from the PixmapDelegate) this->tblviewTopPatches->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); this->tblviewTopPatches->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); this->TargetPatchItem = new QGraphicsPixmapItem; this->TargetPatchScene = new QGraphicsScene(); this->gfxTargetPatch->setScene(this->TargetPatchScene); this->ProxyModel = new QSortFilterProxyModel; this->TopPatchesModel = new TableModelTopPatches<TImage>(this->TopPatchData, this); this->ProxyModel->setSourceModel(this->TopPatchesModel); this->tblviewTopPatches->setModel(ProxyModel); this->TopPatchesModel->SetMaxTopPatchesToDisplay(this->spinNumberOfBestPatches->value()); std::cout << "Set patch display size to: " << this->gfxTargetPatch->size().height() << std::endl; this->TopPatchesModel->SetPatchDisplaySize(this->gfxTargetPatch->size().height()); PixmapDelegate* pixmapDelegate = new PixmapDelegate; this->tblviewTopPatches->setItemDelegate(pixmapDelegate); connect(this->tblviewTopPatches->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(slot_SelectionChanged(const QItemSelection &, const QItemSelection &))); // Setup progress bar this->ProgressDialog = new QProgressDialog(); this->ProgressDialog->setMinimum(0); this->ProgressDialog->setMaximum(0); this->ProgressDialog->setWindowModality(Qt::WindowModal); this->ProgressDialog->hide(); connect(&this->FutureWatcher, SIGNAL(finished()), this, SLOT(slot_Finished())); connect(&this->FutureWatcher, SIGNAL(finished()), this->ProgressDialog , SLOT(cancel())); }
QGenieTimelineLocker::QGenieTimelineLocker() :mLabel(NULL) ,mLockerUi(NULL) ,mFlags(0) ,mPi(NULL) ,mEndObj(NULL) ,mEndSLOT(NULL) ,mDelayFinishTime(0) { // mTimeLine.setDuration(GACC_DISABLE_DLG_DURATION); mTimeLine.setFrameRange(0,5000); mTimeLine.setCurveShape(QTimeLine::LinearCurve); mTimeLine.setUpdateInterval(400); // ui->label->setText(QString("%1(%2)").arg(msg,QString::number(GACC_DISABLE_DLG_FRAME_COUNT/1000))); connect(&mTimeLine,SIGNAL(valueChanged(qreal)),this,SLOT(slot_ValueChanged(qreal))); connect(&mTimeLine,SIGNAL(finished()),this,SLOT(slot_Finished())); // mTimeLine.start(); // mDelayFinishTimer.setSingleShot(true); // connect(&mDelayFinishTimer,SIGNAL(timeout()),this,SLOT(slot_Finished())); }