QTM_BEGIN_NAMESPACE QGeoTiledMapPixmapObjectInfo::QGeoTiledMapPixmapObjectInfo(QGeoTiledMapData *mapData, QGeoMapObject *mapObject) : QGeoTiledMapObjectInfo(mapData, mapObject), pixmapItem2(0) { pixmap = static_cast<QGeoMapPixmapObject*>(mapObject); connect(pixmap, SIGNAL(coordinateChanged(QGeoCoordinate)), this, SLOT(coordinateChanged(QGeoCoordinate))); connect(pixmap, SIGNAL(pixmapChanged(QPixmap)), this, SLOT(pixmapChanged(QPixmap))); connect(pixmap, SIGNAL(offsetChanged(QPoint)), this, SLOT(offsetChanged(QPoint))); pixmapItem1 = new QGraphicsPixmapItem(); graphicsItem = pixmapItem1; pixmapChanged(this->pixmap->pixmap()); coordinateChanged(this->pixmap->coordinate()); }
void Pixmap::setPixmap(QPixmap pixmap) { // if (m_pixmap == pixmap) // return; m_pixmap = pixmap; emit pixmapChanged(pixmap); }
void PhraseWidget::updatePixmap() { m_pixmap->setPixmap(QPixmap::fromImage(*m_phrase->image())); m_pixmap->setFixedSize(m_phrase->size()); this->resize(this->width(),m_pixmap->height()); emit pixmapChanged(); }
void EpoImage::invert() { qDebug() << "Inverting EPO Image ..."; QImage image = pixmap->toImage(); image.invertPixels(QImage::InvertRgb); *pixmap = QPixmap::fromImage(image, Qt::DiffuseDither); inverted = !inverted; emit pixmapChanged(pixmap); }
void QGeoMapPixmapObject::setPixmap(const QPixmap &pixmap) { QPixmap curPixmap = d_ptr->pixmap; if (curPixmap.isNull() && pixmap.isNull()) return; if ((curPixmap.isNull() && !pixmap.isNull()) || (!curPixmap.isNull() && pixmap.isNull()) || (curPixmap.toImage() != pixmap.toImage())) { d_ptr->pixmap = pixmap; emit pixmapChanged(pixmap); } }
/** * Creates new AlertIcon based on provided \param icon. If 0 is passed, * alert is cleared. */ void Alertable::setAlert(const PsiIcon* icon) { if (alert_) { alert_->stop(); delete alert_; alert_ = 0; } if (icon) { alert_ = new AlertIcon(icon); alert_->activated(false); connect(alert_, SIGNAL(pixmapChanged()), SLOT(alertFrameUpdated())); alertFrameUpdated(); } }
void ImageWidget::calculateNewState(Transform d) { qDebug() << "I've founded a book where i've learned to manipulate " "animated images, so i can do it now ^_^"; switch (d) { case toLeft: movieAngle -= 90; break; case toRight: movieAngle += 90; break; case horizontally: movieFlipX = -movieFlipX; break; case vertically: movieFlipY = -movieFlipY; break; default: qDebug() << tr("PERO Q' LO QUE PASOOOO!!!!"); //a little bit of craziness break; } if (double(movieAngle / 360) == 1) movieAngle = 0; if (abs(movieAngle) == 90 || abs(movieAngle) == 270) { switch (d) { case toLeft: //nothing needed here, just added to see the message below qDebug() << "ImageWidget/calculateNewState->toRight"; break; case toRight: qDebug() << "ImageWidget/calculateNewState->toRight"; break; case horizontally: movieFlipX = -movieFlipX; movieFlipY = -movieFlipY; break; case vertically: movieFlipX = -movieFlipX; movieFlipY = -movieFlipY; break; } } emit pixmapChanged(); }
void ImageWidget::makeTransformation(Transform d) { qDebug() << "make transformation:" << d; QTransform transformation; QSize f = pixmap.size(); switch (d) { case toLeft: transformation.rotate(-90); pixmap = pixmap.transformed(transformation); imageLabel->setPixmap(pixmap); f.transpose(); imageLabel->resize(f); this->adjustSize(); emit picSizeChanged(); break; case toRight: transformation.rotate(90); pixmap = pixmap.transformed(transformation); imageLabel->setPixmap(pixmap); f.transpose(); imageLabel->resize(f); this->adjustSize(); emit picSizeChanged(); break; case horizontally: transformation.scale(-1, 1); pixmap = pixmap.transformed(transformation); imageLabel->setPixmap(pixmap); break; case vertically: transformation.scale(1, -1); pixmap = pixmap.transformed(transformation); imageLabel->setPixmap(pixmap); break; } emit pixmapChanged(); if (scaleFactor != 1) { imageLabel->resize(pixmap.size() * scaleFactor); this->resize((pixmap.size() + bugSize) * scaleFactor); } }
void PsiTrayIcon::setIcon(const PsiIcon *icon, bool alert) { if ( icon_ ) { disconnect(icon_, 0, this, 0 ); icon_->stop(); delete icon_; icon_ = 0; } if ( icon ) { if ( !alert ) icon_ = new PsiIcon(*icon); else icon_ = new AlertIcon(icon); connect(icon_, SIGNAL(pixmapChanged()), SLOT(animate())); icon_->activated(); } else icon_ = new PsiIcon(); animate(); }
MainWindow::MainWindow() { settings = new Settings; settings->loadSettings(); //actions manager actionsManager = new ActionsManager(this); //configure the scrollarea scrollArea = new QScrollArea; scrollArea->setBackgroundRole(QPalette::Mid); /*scrollArea->setBackgroundRole(QPalette(QColor(settings->getBackgroundColor().at(0).toInt(), settings->getBackgroundColor().at(1).toInt(), settings->getBackgroundColor().at(2).toInt())));*/ scrollArea->setAlignment(Qt::AlignCenter); scrollArea->setFrameShape(QFrame::NoFrame); setCentralWidget(scrollArea); //create the image widget and make the conections imageWidget = new ImageWidget; scrollArea->setWidget(imageWidget); connect(imageWidget, SIGNAL(couldOpen(bool)), this, SLOT(couldOpen(bool))); connect(imageWidget, SIGNAL(pixmapChanged()), this, SLOT(pixmapChangedSlot())); connect(imageWidget, SIGNAL(moveWidget(QPoint, QPoint)), this, SLOT(moveWidget(QPoint, QPoint))); //the zoom widget zoomWidget = new ZoomWidget; connect(imageWidget, SIGNAL(wheelZoom(int)), this, SLOT(wheelZoom(int))); connect(imageWidget, SIGNAL(picSizeChanged()), this, SLOT(imageTranformated())); connect(zoomWidget, SIGNAL(zoom(double)), imageWidget, SLOT(makeZoom(double))); connect(zoomWidget, SIGNAL(zoom(double)), this, SLOT(updateWindowTitle())); setNameFilters(); createActions(); createMenus(); createToolBar(); imageSetted = false; pixmapChanged = false; //file utils fileUtils = new FileUtils; fileUtils->setNameFilters(nameFilters); connect(fileUtils, SIGNAL(filePathChanged(QString)), this, SLOT(setLastPathUsed(QString))); //add actions to imageWidget, zoomin, zoomout, separator, etc imageWidget->addAction(zoomInAct); imageWidget->addAction(zoomOutAct); //a separator QAction *action1 = new QAction(this); action1->setSeparator(true); imageWidget->addAction(action1); imageWidget->addAction(normalSizeAct); imageWidget->addAction(adjustSizeAct); //another separator QAction *action2 = new QAction(this); action2->setSeparator(true); imageWidget->addAction(action2); imageWidget->addAction(filePropertiesAct); imageWidget->setContextMenuPolicy(Qt::ActionsContextMenu); this->loadSettings(); this->setWindowTitle(tr("EyeSight")); this->setWindowIcon(QIcon::fromTheme("eyesight")); this->showMenuBar(); this->addAction(this->showMenuBarAct); this->addAction(this->configureToolBarAct); this->setContextMenuPolicy(Qt::ActionsContextMenu); }
void Flags::themeChanged() { // kDebug() << "Theme changed, new text color" << Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor); clearCache(); emit pixmapChanged(); }