コード例 #1
0
ファイル: uiReportDetail.cpp プロジェクト: Koulio/MJL_BANK
void UIReportDetail::slotClose()
{
    if(FLAG_NEEDSUBMIT==true)
        emit sigClose();
    else
        this->close();
}
コード例 #2
0
ファイル: ClosableImage.cpp プロジェクト: hathagat/MediaElch
void ClosableImage::mousePressEvent(QMouseEvent *ev)
{
    if (m_loading || ev->button() != Qt::LeftButton || !m_pixmap.isNull())
        return;

    if ((!m_image.isNull() || !m_imagePath.isEmpty()) && closeRect().contains(ev->pos())) {
        if (!confirmDeleteImage())
            return;
        m_pixmap = QPixmap::grabWidget(this);
        Helper::instance()->setDevicePixelRatio(m_pixmap, Helper::instance()->devicePixelRatio(this));
        m_anim = new QPropertyAnimation(this);
        m_anim->setEasingCurve(QEasingCurve::InQuad);
        m_anim->setTargetObject(this);
        m_anim->setStartValue(0);
        m_anim->setEndValue(width()/2);
        m_anim->setPropertyName("mySize");
        m_anim->setDuration(400);
        m_anim->start(QPropertyAnimation::DeleteWhenStopped);
        connect(m_anim, SIGNAL(finished()), this, SIGNAL(sigClose()));
        connect(m_anim, SIGNAL(finished()), this, SLOT(closed()), Qt::QueuedConnection);
    } else if ((!m_image.isNull() || !m_imagePath.isEmpty()) && m_showZoomAndResolution && zoomRect().contains(ev->pos())) {
        if (!m_image.isNull()) {
            ImagePreviewDialog::instance()->setImage(QPixmap::fromImage(QImage::fromData(m_image)));
            ImagePreviewDialog::instance()->exec();
        } else if (!m_imagePath.isEmpty()) {
            ImagePreviewDialog::instance()->setImage(QPixmap::fromImage(QImage(m_imagePath)));
            ImagePreviewDialog::instance()->exec();
        }
    } else if (m_clickable && imgRect().contains(ev->pos())) {
        emit clicked();
    }
}
コード例 #3
0
TvShowWidgetSeason::TvShowWidgetSeason(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::TvShowWidgetSeason)
{
    ui->setupUi(this);
    m_show = 0;
    m_season = -1;

    ui->title->clear();
    QFont font = ui->title->font();
    font.setPointSize(font.pointSize()+4);
    ui->title->setFont(font);

    ui->poster->setDefaultPixmap(QPixmap(":/img/film_reel.png"));
    ui->backdrop->setDefaultPixmap(QPixmap(":/img/pictures_alt.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
    ui->banner->setDefaultPixmap(QPixmap());

    m_downloadManager = new DownloadManager(this);

    m_loadingMovie = new QMovie(":/img/spinner.gif");
    m_loadingMovie->start();

    m_savingWidget = new QLabel(this);
    m_savingWidget->setMovie(m_loadingMovie);
    m_savingWidget->hide();

    onSetEnabled(false);
    onClear();

    QPainter p;
    QPixmap revert(":/img/arrow_circle_left.png");
    p.begin(&revert);
    p.setCompositionMode(QPainter::CompositionMode_SourceIn);
    p.fillRect(revert.rect(), QColor(0, 0, 0, 200));
    p.end();
    ui->buttonRevert->setIcon(QIcon(revert));
    ui->buttonRevert->setVisible(false);

    connect(ui->poster, SIGNAL(clicked()), this, SLOT(onChoosePoster()));
    connect(ui->backdrop, SIGNAL(clicked()), this, SLOT(onChooseBackdrop()));
    connect(ui->banner, SIGNAL(clicked()), this, SLOT(onChooseBanner()));
    connect(ui->poster, SIGNAL(sigClose()), this, SLOT(onDeletePoster()));
    connect(ui->backdrop, SIGNAL(sigClose()), this, SLOT(onDeleteBackdrop()));
    connect(ui->banner, SIGNAL(sigClose()), this, SLOT(onDeleteBanner()));
    connect(ui->buttonRevert, SIGNAL(clicked()), this, SLOT(onRevertChanges()));
    connect(m_downloadManager, SIGNAL(downloadFinished(DownloadManagerElement)), this, SLOT(onDownloadFinished(DownloadManagerElement)));
}
コード例 #4
0
ファイル: manualruntime.cpp プロジェクト: daisy1754/Artemis
ManualRuntime::ManualRuntime(QObject* parent, const Options& options, const QUrl& url) :
    Runtime(parent, options, url)
{
    mDemoApp = DemoModeMainWindowPtr(new DemoModeMainWindow(mAppmodel, mWebkitExecutor, url));

    QObject::connect(mDemoApp.data(), SIGNAL(sigClose()),
                     this, SLOT(slApplicationClosed()));
}
コード例 #5
0
ファイル: ClsFETimePlot.cpp プロジェクト: jeez/iqr
string ClsFETimePlot::addStateVariableDisplay(ClsFEGroup* _clsFEGroup, string strRange) {
#ifdef DEBUG_CLSFETIMEPLOT
    cout << "ClsFETimePlot::addStateVariableDisplay(ClsFEGroup* _clsFEGroup, string strRange)" << endl;
#endif

    string strDisplayID = _clsFEGroup->getGroupID() + ClsIDGenerator::Instance()->Next();

    ClsQNeuronStateVariableDisplay * clsQNeuronStateVariableDisplay = new ClsQNeuronStateVariableDisplay(this, strDisplayID, qframeStateVariableDisplays, _clsFEGroup, strRange, true, false, false, true, true);
    connect(clsQNeuronStateVariableDisplay,SIGNAL(addDisplay(string, list<string>, string )),this, SLOT(addStateVariableDisplay(string, list<string>, string)));
    connect(clsQNeuronStateVariableDisplay,SIGNAL(sigClose(string)),this, SLOT(removeStateVariableDisplay(string)));

    pair<string, ClsQNeuronStateVariableDisplay*> pairTemp(strDisplayID, clsQNeuronStateVariableDisplay);
    mapStateVariableDisplays.insert(pairTemp);

    boxlayoutStateFrames->addWidget(clsQNeuronStateVariableDisplay);
    return strDisplayID;
};
コード例 #6
0
ファイル: session.cpp プロジェクト: xiaojianwu/eChannel
void Session::init(QString sessionId, TransferInterface* tInterface, bool isControl)
{
    m_transInterface = tInterface;
    m_sessionId = sessionId;

    m_isControl = isControl;

    m_channel = new TransportChannel(this);
    connect(m_channel, SIGNAL(sigClose()), this, SLOT(onClose()));

    m_threadChannel.setObjectName("TransportChannelThread");

    //m_channel->moveToThread(&m_threadChannel);

    //m_threadChannel.start();

    m_channel->init(m_sessionId, isControl, tInterface);
}
コード例 #7
0
ファイル: ClosableImage.cpp プロジェクト: zabinko/MediaElch
void ClosableImage::mousePressEvent(QMouseEvent *ev)
{
    if (ev->button() != Qt::LeftButton)
        return;
    QRect closeRect(width()-25, 0, 24, 24);
    QRect zoomRect(0, height()-16, 16, 16);
    if (closeRect.contains(ev->pos()) && m_pixmap.isNull()) {
        m_pixmap = QPixmap::grabWidget(this);
        QPropertyAnimation *anim = new QPropertyAnimation(this);
        anim->setEasingCurve(QEasingCurve::InQuad);
        anim->setTargetObject(this);
        anim->setStartValue(0);
        anim->setEndValue(width()/2);
        anim->setPropertyName("mySize");
        anim->setDuration(400);
        anim->start(QPropertyAnimation::DeleteWhenStopped);
        connect(anim, SIGNAL(finished()), this, SIGNAL(sigClose()));
    } else if (m_showZoomAndResolution && zoomRect.contains(ev->pos()) && m_pixmap.isNull()) {
        emit sigZoom(m_image);
    }
}
コード例 #8
0
void KisGmicWidget::okFilterSlot()
{
    applyFilterSlot();
    emit sigClose();
}
コード例 #9
0
void KisGmicWidget::cancelFilterSlot()
{
    emit sigClose();
}
コード例 #10
0
ファイル: ConcertWidget.cpp プロジェクト: googl1/MediaElch
/**
 * @brief ConcertWidget::ConcertWidget
 * @param parent
 */
ConcertWidget::ConcertWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ConcertWidget)
{
    ui->setupUi(this);
    ui->concertName->clear();
    ui->artStackedWidget->setAnimation(QEasingCurve::OutCubic);
    ui->artStackedWidget->setSpeed(300);

    QFont font = ui->concertName->font();
    font.setPointSize(font.pointSize()+4);
    ui->concertName->setFont(font);

    m_concert = 0;
    m_posterDownloadManager = new DownloadManager(this);

    connect(ui->poster, SIGNAL(clicked()), this, SLOT(chooseConcertPoster()));
    connect(ui->backdrop, SIGNAL(clicked()), this, SLOT(chooseConcertBackdrop()));
    connect(ui->logo, SIGNAL(clicked()), this, SLOT(chooseConcertLogo()));
    connect(ui->clearArt, SIGNAL(clicked()), this, SLOT(chooseConcertClearArt()));
    connect(ui->cdArt, SIGNAL(clicked()), this, SLOT(chooseConcertCdArt()));
    connect(ui->poster, SIGNAL(sigClose()), this, SLOT(deleteConcertPoster()));
    connect(ui->backdrop, SIGNAL(sigClose()), this, SLOT(deleteConcertBackdrop()));
    connect(ui->logo, SIGNAL(sigClose()), this, SLOT(deleteConcertLogo()));
    connect(ui->clearArt, SIGNAL(sigClose()), this, SLOT(deleteConcertClearArt()));
    connect(ui->cdArt, SIGNAL(sigClose()), this, SLOT(deleteConcertCdArt()));
    connect(m_posterDownloadManager, SIGNAL(downloadFinished(DownloadManagerElement)), this, SLOT(posterDownloadFinished(DownloadManagerElement)));
    connect(ui->name, SIGNAL(textChanged(QString)), this, SLOT(concertNameChanged(QString)));
    connect(ui->buttonRevert, SIGNAL(clicked()), this, SLOT(onRevertChanges()));
    connect(ui->buttonReloadStreamDetails, SIGNAL(clicked()), this, SLOT(onReloadStreamDetails()));

    ui->genreCloud->setText(tr("Genres"));
    ui->genreCloud->setPlaceholder(tr("Add Genre"));
    connect(ui->genreCloud, SIGNAL(activated(QString)), this, SLOT(addGenre(QString)));
    connect(ui->genreCloud, SIGNAL(deactivated(QString)), this, SLOT(removeGenre(QString)));

    ui->tagCloud->setText(tr("Tags"));
    ui->tagCloud->setPlaceholder(tr("Add Tag"));
    connect(ui->tagCloud, SIGNAL(activated(QString)), this, SLOT(addTag(QString)));
    connect(ui->tagCloud, SIGNAL(deactivated(QString)), this, SLOT(removeTag(QString)));

    ui->poster->setDefaultPixmap(QPixmap(":/img/film_reel.png"));
    ui->backdrop->setDefaultPixmap(QPixmap(":/img/pictures_alt.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
    ui->logo->setDefaultPixmap(QPixmap(":/img/pictures_alt.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
    ui->clearArt->setDefaultPixmap(QPixmap(":/img/pictures_alt.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
    ui->cdArt->setDefaultPixmap(QPixmap(":/img/pictures_alt.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));

    m_loadingMovie = new QMovie(":/img/spinner.gif");
    m_loadingMovie->start();

    setDisabledTrue();
    clear();

    m_savingWidget = new QLabel(this);
    m_savingWidget->setMovie(m_loadingMovie);
    m_savingWidget->hide();

    connect(ui->fanarts, SIGNAL(sigRemoveImage(QByteArray)), this, SLOT(onRemoveExtraFanart(QByteArray)));
    connect(ui->fanarts, SIGNAL(sigRemoveImage(QString)), this, SLOT(onRemoveExtraFanart(QString)));
    connect(ui->btnAddExtraFanart, SIGNAL(clicked()), this, SLOT(onAddExtraFanart()));

    // Connect GUI change events to concert object
    connect(ui->name, SIGNAL(textEdited(QString)), this, SLOT(onNameChange(QString)));
    connect(ui->artist, SIGNAL(textEdited(QString)), this, SLOT(onArtistChange(QString)));
    connect(ui->album, SIGNAL(textEdited(QString)), this, SLOT(onAlbumChange(QString)));
    connect(ui->tagline, SIGNAL(textEdited(QString)), this, SLOT(onTaglineChange(QString)));
    connect(ui->rating, SIGNAL(valueChanged(double)), this, SLOT(onRatingChange(double)));
    connect(ui->trailer, SIGNAL(textEdited(QString)), this, SLOT(onTrailerChange(QString)));
    connect(ui->runtime, SIGNAL(valueChanged(int)), this, SLOT(onRuntimeChange(int)));
    connect(ui->playcount, SIGNAL(valueChanged(int)), this, SLOT(onPlayCountChange(int)));
    connect(ui->certification, SIGNAL(editTextChanged(QString)), this, SLOT(onCertificationChange(QString)));
    connect(ui->watched, SIGNAL(stateChanged(int)), this, SLOT(onWatchedChange(int)));
    connect(ui->released, SIGNAL(dateChanged(QDate)), this, SLOT(onReleasedChange(QDate)));
    connect(ui->lastPlayed, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(onLastWatchedChange(QDateTime)));
    connect(ui->overview, SIGNAL(textChanged()), this, SLOT(onOverviewChange()));
    connect(ui->videoAspectRatio, SIGNAL(valueChanged(double)), this, SLOT(onStreamDetailsEdited()));
    connect(ui->videoCodec, SIGNAL(textEdited(QString)), this, SLOT(onStreamDetailsEdited()));
    connect(ui->videoDuration, SIGNAL(timeChanged(QTime)), this, SLOT(onStreamDetailsEdited()));
    connect(ui->videoHeight, SIGNAL(valueChanged(int)), this, SLOT(onStreamDetailsEdited()));
    connect(ui->videoWidth, SIGNAL(valueChanged(int)), this, SLOT(onStreamDetailsEdited()));
    connect(ui->videoScantype, SIGNAL(textEdited(QString)), this, SLOT(onStreamDetailsEdited()));

    QPainter p;
    QPixmap revert(":/img/arrow_circle_left.png");
    p.begin(&revert);
    p.setCompositionMode(QPainter::CompositionMode_SourceIn);
    p.fillRect(revert.rect(), QColor(0, 0, 0, 200));
    p.end();
    ui->buttonRevert->setIcon(QIcon(revert));
    ui->buttonRevert->setVisible(false);
}
コード例 #11
0
ファイル: session.cpp プロジェクト: xiaojianwu/eChannel
void Session::onClose()
{
    delete m_channel;
    m_channel = NULL;
    emit sigClose();
}