void PageGraphicsItem::handlePixmapRendered () { if (sender () != RenderFuture_.get ()) return; const auto& result = RenderFuture_->result (); RenderFuture_.reset (); setPixmap (QPixmap::fromImage (result.Result_)); if (std::abs (result.XScale_ - XScale_) > std::numeric_limits<double>::epsilon () * XScale_ || std::abs (result.YScale_ - YScale_) > std::numeric_limits<double>::epsilon () * YScale_) { UpdatePixmap (); return; } Core::Instance ().GetPixmapCacheManager ()->PixmapChanged (this); }
void TrackSliderPopup::SetSmallText(const QString& text) { small_text_ = text; UpdatePixmap(); }
void TrackSliderPopup::SetText(const QString& text) { text_ = text; UpdatePixmap(); }
TextureInfoDockWidget::TextureInfoDockWidget(const Pica::DebugUtils::TextureInfo& info, QWidget* parent) : QDockWidget(tr("Texture 0x%1").arg(info.physical_address, 8, 16, QLatin1Char('0'))), info(info) { QWidget* main_widget = new QWidget; QLabel* image_widget = new QLabel; connect(this, SIGNAL(UpdatePixmap(const QPixmap&)), image_widget, SLOT(setPixmap(const QPixmap&))); CSpinBox* phys_address_spinbox = new CSpinBox; phys_address_spinbox->SetBase(16); phys_address_spinbox->SetRange(0, 0xFFFFFFFF); phys_address_spinbox->SetPrefix("0x"); phys_address_spinbox->SetValue(info.physical_address); connect(phys_address_spinbox, SIGNAL(ValueChanged(qint64)), this, SLOT(OnAddressChanged(qint64))); QComboBox* format_choice = new QComboBox; format_choice->addItem(tr("RGBA8")); format_choice->addItem(tr("RGB8")); format_choice->addItem(tr("RGB5A1")); format_choice->addItem(tr("RGB565")); format_choice->addItem(tr("RGBA4")); format_choice->addItem(tr("IA8")); format_choice->addItem(tr("UNK6")); format_choice->addItem(tr("I8")); format_choice->addItem(tr("A8")); format_choice->addItem(tr("IA4")); format_choice->addItem(tr("UNK10")); format_choice->addItem(tr("A4")); format_choice->addItem(tr("ETC1")); format_choice->addItem(tr("ETC1A4")); format_choice->setCurrentIndex(static_cast<int>(info.format)); connect(format_choice, SIGNAL(currentIndexChanged(int)), this, SLOT(OnFormatChanged(int))); QSpinBox* width_spinbox = new QSpinBox; width_spinbox->setMaximum(65535); width_spinbox->setValue(info.width); connect(width_spinbox, SIGNAL(valueChanged(int)), this, SLOT(OnWidthChanged(int))); QSpinBox* height_spinbox = new QSpinBox; height_spinbox->setMaximum(65535); height_spinbox->setValue(info.height); connect(height_spinbox, SIGNAL(valueChanged(int)), this, SLOT(OnHeightChanged(int))); QSpinBox* stride_spinbox = new QSpinBox; stride_spinbox->setMaximum(65535 * 4); stride_spinbox->setValue(info.stride); connect(stride_spinbox, SIGNAL(valueChanged(int)), this, SLOT(OnStrideChanged(int))); QVBoxLayout* main_layout = new QVBoxLayout; main_layout->addWidget(image_widget); { QHBoxLayout* sub_layout = new QHBoxLayout; sub_layout->addWidget(new QLabel(tr("Source Address:"))); sub_layout->addWidget(phys_address_spinbox); main_layout->addLayout(sub_layout); } { QHBoxLayout* sub_layout = new QHBoxLayout; sub_layout->addWidget(new QLabel(tr("Format"))); sub_layout->addWidget(format_choice); main_layout->addLayout(sub_layout); } { QHBoxLayout* sub_layout = new QHBoxLayout; sub_layout->addWidget(new QLabel(tr("Width:"))); sub_layout->addWidget(width_spinbox); sub_layout->addStretch(); sub_layout->addWidget(new QLabel(tr("Height:"))); sub_layout->addWidget(height_spinbox); sub_layout->addStretch(); sub_layout->addWidget(new QLabel(tr("Stride:"))); sub_layout->addWidget(stride_spinbox); main_layout->addLayout(sub_layout); } main_widget->setLayout(main_layout); emit UpdatePixmap(ReloadPixmap()); setWidget(main_widget); }
void TextureInfoDockWidget::OnStrideChanged(int value) { info.stride = value; emit UpdatePixmap(ReloadPixmap()); }
void TextureInfoDockWidget::OnHeightChanged(int value) { info.height = value; emit UpdatePixmap(ReloadPixmap()); }
void TextureInfoDockWidget::OnWidthChanged(int value) { info.width = value; emit UpdatePixmap(ReloadPixmap()); }
void TextureInfoDockWidget::OnFormatChanged(int value) { info.format = static_cast<Pica::Regs::TextureFormat>(value); emit UpdatePixmap(ReloadPixmap()); }
void TextureInfoDockWidget::OnAddressChanged(qint64 value) { info.physical_address = value; emit UpdatePixmap(ReloadPixmap()); }