Exemplo n.º 1
0
std::unique_ptr<QVtkTableModel> ImageDataObject::createTableModel()
{
    auto model = std::make_unique<QVtkTableModelImage>();
    model->setDataObject(this);

    return std::move(model);
}
Exemplo n.º 2
0
void DataDialog::slotOk() {
  Kst::ObjectPtr ptr;
  if (!dataObject())
    ptr = createNewDataObject();
  else
    ptr = editExistingDataObject();
  setDataObject(ptr);
}
Exemplo n.º 3
0
MockSupport* MockSupport::getMockSupportScope(const SimpleString& name)
{
    SimpleString mockingSupportName = MOCK_SUPPORT_SCOPE_PREFIX;
    mockingSupportName += name;

    if (hasData(mockingSupportName)) {
        STRCMP_EQUAL("MockSupport", getData(mockingSupportName).getType().asCharString());
        return (MockSupport*) getData(mockingSupportName).getObjectPointer();
    }

    MockSupport *newMock = clone(name);

    setDataObject(mockingSupportName, "MockSupport", newMock);
    return newMock;
}
void NotifyPluginConfiguration::restoreState(QSettings* settings)
{
	//settings = Core::ICore::instance()->settings();
        setSoundCollectionPath(Utils::PathUtils().InsertDataPath(settings->value(QLatin1String("SoundCollectionPath"), tr("")).toString()));
	setCurrentLanguage(settings->value(QLatin1String("CurrentLanguage"), tr("")).toString());
	setDataObject(settings->value(QLatin1String("DataObject"), tr("")).toString());
	setObjectField(settings->value(QLatin1String("ObjectField"), tr("")).toString());
	setValue(settings->value(QLatin1String("Value"), tr("")).toString());
	setSound1(settings->value(QLatin1String("Sound1"), tr("")).toString());
	setSound2(settings->value(QLatin1String("Sound2"), tr("")).toString());
	setSound3(settings->value(QLatin1String("Sound3"), tr("")).toString());
	setSayOrder(settings->value(QLatin1String("SayOrder"), tr("")).toString());
	setSpinBoxValue(settings->value(QLatin1String("ValueSpinBox"), tr("")).toDouble());
	setRepeatFlag(settings->value(QLatin1String("Repeat"), tr("")).toString());
	setExpireTimeout(settings->value(QLatin1String("ExpireTimeout"), tr("")).toInt());
}
Exemplo n.º 5
0
void DataDialog::slotApply() {
  Kst::ObjectPtr ptr;
  if (!dataObject()) {
    ptr = createNewDataObject();
  } else {
    ptr = editExistingDataObject();
  }
  setDataObject(ptr);

  UpdateManager::self()->doUpdates();
  UpdateServer::self()->requestUpdateSignal();

  kstApp->mainWindow()->document()->setChanged(true);

  clearModified();
}
void DataDialog::slotApply() {
  Kst::ObjectPtr ptr;
  bool do_session_reset = false;
  if (!dataObject()) {
    ptr = createNewDataObject();
    do_session_reset = true;
  } else {
    ptr = editExistingDataObject();
  }
  setDataObject(ptr);
  UpdateManager::self()->doUpdates();
  kstApp->mainWindow()->document()->setChanged(true);
  if (do_session_reset) {
    kstApp->mainWindow()->document()->session()->triggerReset();
  }
  clearModified();
}
Exemplo n.º 7
0
void NotificationItem::restoreState(QSettings* settings)
{
    //settings = Core::ICore::instance()->settings();
    setSoundCollectionPath(Utils::PathUtils().InsertDataPath(settings->value(QLatin1String("SoundCollectionPath"), tr("")).toString()));
    setCurrentLanguage(settings->value(QLatin1String("CurrentLanguage"), tr("")).toString());
    setDataObject(settings->value(QLatin1String("DataObject"), tr("")).toString());
    setObjectField(settings->value(QLatin1String("ObjectField"), tr("")).toString());
    setCondition(settings->value(QLatin1String("RangeLimit"), tr("")).toInt());
    setSound1(settings->value(QLatin1String("Sound1"), tr("")).toString());
    setSound2(settings->value(QLatin1String("Sound2"), tr("")).toString());
    setSound3(settings->value(QLatin1String("Sound3"), tr("")).toString());
    setSayOrder(settings->value(QLatin1String("SayOrder"), tr("")).toInt());
    QVariant value = settings->value(QLatin1String("Value1"), tr(""));
    setSingleValue(value);
    setValueRange2(settings->value(QLatin1String("Value2"), tr("")).toDouble());
    setRetryValue(settings->value(QLatin1String("Repeat"), tr("")).toInt());
    setLifetime(settings->value(QLatin1String("ExpireTimeout"), tr("")).toInt());
    setMute(settings->value(QLatin1String("Mute"), tr("")).toInt());
}
MockSupport* MockSupport::getMockSupportScope(const SimpleString& name)
{
	SimpleString mockingSupportName = MOCK_SUPPORT_SCOPE_PREFIX;
	mockingSupportName += name;

	if (hasData(mockingSupportName)) {
		STRCMP_EQUAL("MockSupport", getData(mockingSupportName).getType().asCharString());
		return (MockSupport*) getData(mockingSupportName).getObjectPointer();
	}

	MockSupport *newMock = new MockSupport;

	newMock->setMockFailureReporter(reporter_);
	if (ignoreOtherCalls_) newMock->ignoreOtherCalls();
	if (!enabled_) newMock->disable();
	newMock->tracing(tracing_);
	newMock->installComparators(comparatorRepository_);

	setDataObject(mockingSupportName, "MockSupport", newMock);
	return newMock;
}