void QxtFlowView::setSlideSize(QSize size) { d->state->slideWidth = size.width(); d->state->slideHeight = size.height(); d->state->reposition(); triggerRender(); }
void PictureFlowPrivate::setSlideCount(int count) { slideImages.resize(count); surfaceCache.clear(); resetSlides(); triggerRender(); }
void PictureFlowPrivate::setSlideSize(QSize size) { slideWidth = size.width(); slideHeight = size.height(); recalc(buffer.width(), buffer.height()); triggerRender(); }
void PictureFlowPrivate::setCurrentSlide(int index) { step = 0; centerIndex = qBound(index, 0, slideImages.count()-1); target = centerIndex; slideFrame = index << 16; resetSlides(); triggerRender(); }
void QxtFlowViewPrivate::replaceSlide(int index, const QImage& image) { Q_ASSERT((index >= 0) && (index < state->slideImages.count())); QImage* i = image.isNull() ? 0 : new QImage(image); delete state->slideImages[index]; state->slideImages[index] = i; triggerRender(); }
void PictureFlowPrivate::setZoomFactor(int z) { if(z <= 0) return; zoom = z; recalc(buffer.width(), buffer.height()); triggerRender(); }
QMapboxGLPrivate::QMapboxGLPrivate(QMapboxGL *q) : isAnimating(false) , fileSourceObj(nullptr) , mapObj(*this, fileSourceObj) , q_ptr(q) { connect(this, SIGNAL(viewInvalidated(void)), this, SLOT(triggerRender()), Qt::QueuedConnection); connect(q_ptr, &QMapboxGL::stateChanged, this, &QMapboxGLPrivate::onStateChanged); }
void PictureFlowPrivate::setSlide(int index, const QImage& image) { if((index >= 0) && (index < slideImages.count())) { slideImages[index] = image; surfaceCache.remove(index); triggerRender(); } }
void QxtFlowViewPrivate::clear() { int c = state->slideImages.count(); for (int i = 0; i < c; i++) delete state->slideImages[i]; state->slideImages.resize(0); state->reset(); modelmap.clear(); triggerRender(); }
/*! \internal */ void QxtFlowView::updateAnimation() { int old_center = d->state->centerIndex; d->animator->update(); triggerRender(); if (d->state->centerIndex != old_center) { d->currentcenter = d->modelmap.at(d->state->centerIndex); emit currentIndexChanged(d->currentcenter); } }
void QxtFlowViewPrivate::setCurrentIndex(QModelIndex index) { if (model->parent(index) != rootindex) return; int r = modelmap.indexOf(index); if (r < 0) return; state->centerIndex = r; state->reset(); animator->stop(r); triggerRender(); }
void QxtFlowViewPrivate::reset() { clear(); if (model) { for (int i = 0;i < model->rowCount(rootindex);i++) { QModelIndex idx = model->index(i, piccolumn, rootindex); insertSlide(i, qvariant_cast<QImage>(model->data(idx, picrole))); modelmap.insert(i, idx); } if(modelmap.count()) currentcenter=modelmap.at(0); else currentcenter=QModelIndex(); } triggerRender(); }
void DialogDisplaySettings::updateFontString(int line) { QFont font = fonts[line]; QString fontName; fontName.append(font.family()); fontName.append(" "); fontName.append(QString::number(font.pointSize())); if(font.bold()){ fontName.append(", fett"); } if(font.italic()){ fontName.append(tr(", kursiv")); } lineEdit_fonts[line]->setText(fontName); triggerRender(); // qDebug()<<font.toString(); // qDebug()<<font.key(); }
/*! \reimp */ void QxtFlowView::resizeEvent(QResizeEvent* event) { triggerRender(); QWidget::resizeEvent(event); }
void QxtFlowViewPrivate::insertSlide(int index, const QImage& image) { state->slideImages.insert(index, new QImage(image)); triggerRender(); }
void QxtFlowViewPrivate::removeSlide(int index) { delete state->slideImages[index]; state->slideImages.remove(index); triggerRender(); }
DialogDisplaySettings::DialogDisplaySettings(QWidget *parent) : QDialog(parent), ui(new Ui::DialogDisplaySettings) { ui->setupUi(this); setModal(true); ui->displayPreviewWidget_1->setScale(8); ui->displayPreviewWidget_2->setScale(8); renderer = new DisplayRenderer(ui->displayPreviewWidget_1, ui->displayPreviewWidget_2, this); runData = new RunData(this); lineEdit_formats[1] = ui->lineEdit_line1Format; lineEdit_formats[2] = ui->lineEdit_line2Format; lineEdit_formats[3] = ui->lineEdit_line3Format; lineEdit_formats[4] = ui->lineEdit_line4Format; lineEdit_formats[5] = ui->lineEdit_line5Format; lineEdit_formats[6] = ui->lineEdit_line6Format; lineEdit_fonts[1] = ui->lineEdit_line1Font; lineEdit_fonts[2] = ui->lineEdit_line2Font; lineEdit_fonts[3] = ui->lineEdit_line3Font; lineEdit_fonts[4] = ui->lineEdit_line4Font; lineEdit_fonts[5] = ui->lineEdit_line5Font; lineEdit_fonts[6] = ui->lineEdit_line6Font; offsets[1] = ui->spinBox_1; offsets[2] = ui->spinBox_2; offsets[3] = ui->spinBox_3; offsets[4] = ui->spinBox_4; offsets[5] = ui->spinBox_5; offsets[6] = ui->spinBox_6; // restore settings QSettings set; set.beginGroup("display"); for(int i=1; i<=6; i++) { lineEdit_formats[i]->setText(set.value(QString("format%1").arg(i), QString()).toString()); QFont f; f.fromString(set.value(QString("font%1").arg(i), "DejaVu Sans,8,-1,5,50,0,0,0,0,0").toString()); f.setLetterSpacing(QFont::AbsoluteSpacing, 0); fonts[i]=f; offsets[i]->setValue(set.value(QString("offset%1").arg(i), 0).toInt()); } ui->checkBox_enableDisplays->setChecked(set.value("enabled", true).toBool()); ui->checkBox_flipDisplay1->setChecked(set.value("flipDisplay1", false).toBool()); ui->checkBox_flipDisplay2->setChecked(set.value("flipDisplay2", false).toBool()); set.endGroup(); /* // Set Default Strings: QFont f; f.fromString("DejaVu Sans,8,-1,5,50,0,0,0,0,0"); f.setLetterSpacing(QFont::AbsoluteSpacing, 0); fonts[1] = f; f.fromString("DejaVu Sans,8,-1,5,50,0,0,0,0,0"); f.setLetterSpacing(QFont::AbsoluteSpacing, 0); fonts[2] = f; f.fromString("DejaVu Sans,8,-1,5,150,0,0,0,0,0"); f.setLetterSpacing(QFont::AbsoluteSpacing, -1); fonts[3] = f; f.fromString("DejaVu Sans,12,-1,5,100,0,0,0,0,0"); f.setLetterSpacing(QFont::AbsoluteSpacing, 0); fonts[4] = f; f.fromString("DejaVu Sans,10,-1,5,100,0,0,0,0,0"); f.setLetterSpacing(QFont::AbsoluteSpacing, 0); fonts[5] = f; f.fromString("DejaVu Sans,8,-1,5,100,0,0,0,0,0"); f.setLetterSpacing(QFont::AbsoluteSpacing, 0); fonts[6] = f; */ for(int n=1; n<=6; n++) { updateFontString(n); connect(lineEdit_formats[n], SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(offsets[n], SIGNAL(valueChanged(int)), this, SLOT(triggerRender())); } connect(ui->lineEdit_round, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_color, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_runID, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_boatID, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_runTime, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->checkBox_dsq, SIGNAL(toggled(bool)), this, SLOT(triggerRender())); connect(ui->lineEdit_firstName1, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_lastName1, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_firstName2, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_lastName2, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); connect(ui->lineEdit_fireBrigade, SIGNAL(textChanged(QString)), this, SLOT(triggerRender())); triggerRender(); }
void PictureFlowPrivate::resize(int w, int h) { recalc(w, h); resetSlides(); triggerRender(); }
void QxtFlowView::setBackgroundColor(const QColor& c) { d->state->backgroundColor = c.rgb(); triggerRender(); }