コード例 #1
0
void QInstallerPackage::setVersion(const QString &version)
{
    if(m_version == version)
        return;
    m_version = version;
    emit versionChanged(); ;
}
コード例 #2
0
void PlasmoidWrapper::setApplet(QObject *extender)
{
    Plasma::Extender *appletExtender = static_cast<Plasma::Extender *>(extender);

    if(appletExtender){
        Plasma::Applet *applet = appletExtender->applet();
        if(applet){

            Plasma::PackageStructure::Ptr structure = Plasma::Applet::packageStructure();
            const QString workflowPath = KGlobal::dirs()->locate("data", structure->defaultPackageRoot() + "/workflow/");
            Plasma::Package package(workflowPath, structure);

            m_version = package.metadata().version();
            emit versionChanged(m_version);

            m_popupApplet = static_cast<Plasma::PopupApplet *>(applet);

            if(m_popupApplet->containment()){
                m_isInPanel = (m_popupApplet->containment()->containmentType() == Plasma::Containment::PanelContainment);
                emit isInPanelChanged(m_isInPanel);

                connect(m_popupApplet,SIGNAL(geometryChanged()),this,SLOT(geometryChangedSlot()));

                connect(KWindowSystem::self(),SIGNAL(activeWindowChanged(WId)),this,SLOT(activeWindowChangedSlot(WId)));
            }
        }

        delete extender;
    }
}
コード例 #3
0
void GameConfigUI::initWidget(void) {
	versionBox = new QGroupBox(tr("Game version"));
	versionFld = new VersionInfoLayout;

	titleScreenOptionsBox = new QGroupBox(tr("Title screen options"));
	titleScreenOptionsLayout = new QFormLayout;
	noRumbleFld = new QCheckBox;
	titleScreenLanguageFld = new QComboBox;

	miscellaneousBox = new QGroupBox(tr("Miscellaneous"));
	miscellaneousLayout = new QFormLayout;
	storyModeSaveCountFld = new UnsignedSpinbox<32>;

	titleScreenLanguageFld->addItems(VersionInfoLayout::languageNames());

	versionBox->setLayout(versionFld);
	
	titleScreenOptionsLayout->addRow(tr("Rumble function disabled"), noRumbleFld);
	titleScreenOptionsLayout->addRow(tr("Language"), titleScreenLanguageFld);
	titleScreenOptionsBox->setLayout(titleScreenOptionsLayout);

	miscellaneousLayout->addRow(tr("Story mode save count"), storyModeSaveCountFld);
	miscellaneousBox->setLayout(miscellaneousLayout);

	mainLayout->addWidget(versionBox);
	mainLayout->addWidget(titleScreenOptionsBox);
	mainLayout->addWidget(miscellaneousBox);

	connect(versionFld, SIGNAL(versionChanged()), this, SLOT(versionChangeHandler()));
	DataUI::initWidget();
}
コード例 #4
0
ファイル: tohosettings.cpp プロジェクト: CODeRUS/toholed
TohoSettings::TohoSettings(QObject *parent) :
    QObject(parent)
{
    QDBusConnection::systemBus().connect("com.kimmoli.toholed", "/", "com.kimmoli.toholed", "displayUpdated",
                              this, SLOT(handleDisplayUpdated()));

    readSettings();

    emit versionChanged();
}
コード例 #5
0
ファイル: lnflogic.cpp プロジェクト: KDE/plasma-sdk
void LnfLogic::setVersion(const QString &version)
{
    if (LnfLogic::version() == version) {
        return;
    }

    m_tempMetadata[QStringLiteral("X-KDE-PluginInfo-Version")] = version;
    m_needsSave = true;
    emit needsSaveChanged();
    emit versionChanged();
}
コード例 #6
0
void GameConfigUI::parseData(void) {
	if (saveSlot_ == NULL) return;
	SaveSlot* sl = saveSlot_;
	isXD = LIBPKMGC_IS_XD(SaveEditing::SaveSlot, sl);

	versionFld->disconnect(SIGNAL(versionChanged()), this);
	versionFld->setInfo(sl->version);
	connect(versionFld, SIGNAL(versionChanged()), this, SLOT(versionChangeHandler()));

	noRumbleFld->setChecked(sl->noRumble);
	titleScreenLanguageFld->setCurrentIndex((int)sl->titleScreenLanguage);

	miscellaneousBox->setVisible(!isXD);
	if (!isXD) {
		Colosseum::SaveEditing::SaveSlot *sl_c = (Colosseum::SaveEditing::SaveSlot*) sl;
		storyModeSaveCountFld->setUnsignedValue(sl_c->storyModeSaveCount);
	}

	versionChangeHandler();
}
コード例 #7
0
ファイル: qqmlglobal.cpp プロジェクト: 2gis/2gisqt5android
QQmlApplication::QQmlApplication(QQmlApplicationPrivate &dd, QObject *parent)
    : QObject(dd, parent)
{
    connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()),
            this, SIGNAL(aboutToQuit()));
    connect(QCoreApplication::instance(), SIGNAL(applicationNameChanged()),
            this, SIGNAL(nameChanged()));
    connect(QCoreApplication::instance(), SIGNAL(applicationVersionChanged()),
            this, SIGNAL(versionChanged()));
    connect(QCoreApplication::instance(), SIGNAL(organizationNameChanged()),
            this, SIGNAL(organizationChanged()));
    connect(QCoreApplication::instance(), SIGNAL(organizationDomainChanged()),
            this, SIGNAL(domainChanged()));
}
コード例 #8
0
ファイル: lnflogic.cpp プロジェクト: KDE/plasma-sdk
void LnfLogic::setTheme(const QString& theme)
{
    if (theme == m_themeName) {
        return;
    }

    m_tempMetadata.clear();
    m_themeName = theme;
    m_package.setPath(theme);
    m_needsSave = false;
    emit needsSaveChanged();
    emit themeChanged();
    emit nameChanged();
    emit commentChanged();
    emit authorChanged();
    emit emailChanged();
    emit versionChanged();
    emit websiteChanged();
    emit licenseChanged();
}
コード例 #9
0
ファイル: settingsui.cpp プロジェクト: urjaman/tohkbd2
SettingsUi::SettingsUi(QObject *parent) :
    QObject(parent)
{
    emit versionChanged();
}
コード例 #10
0
void Client::setVersion(const QString &version) {
	d->version = version;
	emit versionChanged();
}
コード例 #11
0
ファイル: sms.cpp プロジェクト: kimmoli/aciidsms
Sms::Sms(QObject *parent) :
    QObject(parent)
{
    emit versionChanged();
}
コード例 #12
0
ファイル: ChartImpl.cpp プロジェクト: AndroidT/TRCharts
bool Charts::Chart::update(void)
{
	preUpdate();
	const glm::float_t width = this->size.width;
	const glm::float_t height = this->size.height;
	if (!TR_VERIFY(width > 0.0 && height > 0.0)) {
		return false;
	}
	bool changed = false;
	if (title) {
		changed = changed || title->versionChanged();
	}
	Margin internalMargin;
	for (auto axis : axisList) {
		addAxisInternalMargin(internalMargin, axis);
	}
	renderArgs.margin = Margin::add(margin, internalMargin);

	if (renderArgs.screenSize.x != width || renderArgs.screenSize.y != height) {
        if(!doRelayout) {
            const glm::vec2 marginProjection(renderArgs.margin.left + renderArgs.margin.right, renderArgs.margin.top + renderArgs.margin.bottom);
            const glm::vec2 newSize(width - marginProjection.x, height - marginProjection.y);
            if (resizeMode == ResizeMode::Rescale) {
                if (renderArgs.screenSize.x > 0.0 && renderArgs.screenSize.y > 0.0) {
                    const glm::vec2 oldSize(renderArgs.screenSize.x - marginProjection.x, renderArgs.screenSize.y - marginProjection.y);
                    scale *= (newSize / oldSize);
                } else {
                    offset = glm::vec2(0.f);
                    scale = newSize;
                }
            } else if (resizeMode == ResizeMode::Relayout) {
                offset = glm::vec2(0.f);
                scale = newSize;
            }
        }
		renderArgs.screenSize = glm::vec2(width, height);
		renderArgs.contentScaleFactor = contentScaleFactor;
		renderArgs.projection = glm::ortho(0.f, renderArgs.screenSize.x, 0.f, renderArgs.screenSize.y, -1000.f, +1000.f);
	}
    
	if (glm::float_t(contentScaleFactor) != renderArgs.contentScaleFactor) {
		renderArgs.contentScaleFactor = contentScaleFactor;
	}

	renderArgs.areaStart = glm::vec2(renderArgs.margin.left, renderArgs.margin.bottom);
	renderArgs.areaSize = renderArgs.screenSize - glm::vec2(renderArgs.margin.left + renderArgs.margin.right, renderArgs.margin.top + renderArgs.margin.bottom);
    
    if (doRelayout) {
        offset = glm::dvec2(0.f);
        scale = renderArgs.areaSize;
        doRelayout = false;
    } else {
        applyAnimations();
        applyConstraints();
    }
    
    // must check this AFTER applying animations and constraints
    changed = changed || versionChanged();

	renderArgs.offset = offset;
	renderArgs.scale = scale;
    
	renderArgs.clearColor = Utils::colorToVec4(backgroundColor);
    
	for (auto axis : axisList) {
		//if (axis->isEnabled()) {
			changed |= axis->update(renderArgs);
		//}
	}
	for (auto series : seriesList) {
		//if (series->isEnabled()) {
			changed |= series->update(renderArgs);
		//}
	}
	for (auto decoration : decorationList) {
		//if (decoration->isEnabled()) {
			changed |= decoration->update(renderArgs);
		//}
	}
	if (!preRendered) {
		// we mark the chart as changed if it has not been pre-rendered, the purpose of the update changed value is
		// conditional rendering and if we update twice before calling render we will still need to render again.
		changed = true;
	}
    if(changed) {
        preRendered = false;
    }
	preUpdated = false;
	markVersion();
	if (title) {
		title->markVersion();
	}
	updated = true;
	return changed;
}
コード例 #13
0
ファイル: target.cpp プロジェクト: kimmoli/targetpractice
Target::Target(QObject *parent) :
    QObject(parent)
{
    emit versionChanged();
}
コード例 #14
0
ファイル: qqmlglobal.cpp プロジェクト: amtep/qtdeclarative
void QQmlApplication::setVersion(const QString &arg)
{
    QCoreApplication::instance()->setApplicationVersion(arg);
    emit versionChanged(); //Note that we don't get notified if it's changed from C++
}
コード例 #15
0
ファイル: appsettings.cpp プロジェクト: Floo/hsQtApp
void AppSettings::setVersion(QString a) {
    if (a != m_version) {
        m_version = a;
        emit versionChanged();
    }
}