// ----------------------------------------------------------------------------- // Called when the 'modify offsets' button is clicked // ----------------------------------------------------------------------------- void GfxEntryPanel::onBtnAutoOffset(wxCommandEvent& e) { ModifyOffsetsDialog dlg; dlg.SetParent(theMainWindow); dlg.CenterOnParent(); if (dlg.ShowModal() == wxID_OK) { // Calculate new offsets Vec2i offsets = dlg.calculateOffsets( spin_xoffset_->GetValue(), spin_yoffset_->GetValue(), gfx_canvas_->image().width(), gfx_canvas_->image().height()); // Change offsets spin_xoffset_->SetValue(offsets.x); spin_yoffset_->SetValue(offsets.y); image()->setXOffset(offsets.x); image()->setYOffset(offsets.y); refreshPanel(); // Set changed setModified(); } }
ThumbnailsPanel::ThumbnailsPanel(ComicBook* attachedCB, NavigationManager *attachedNM, QWidget* parent) : CBScrollArea(parent) { basicInit(); setAttachedCB(attachedCB); setAttachedNM(attachedNM); //Construction de l'affichage des mignatures refreshPanel(false); }
ThumbnailsPanel::ThumbnailsPanel(ComicBook* attachedCB, NavigationManager *attachedNM, QWidget* parent) : QWidget(parent) { setAttachedCB(attachedCB); setAttachedNM(attachedNM); m_thumbnailsList.clear(); m_scrollArea = dynamic_cast<QScrollArea*>(parentWidget()); //Construction de l'affichage des mignatures refreshPanel(false); }
void ThumbnailsPanel::resizeEvent(QResizeEvent *) { refreshPanel(false); }