Exemple #1
0
str
CMDsetHeartbeat(void *res, int *ev)
{
	(void) res;
	setHeartbeat(*ev);
	return MAL_SUCCEED;
}
Exemple #2
0
void ServerConfig::loadSettings()
{
	settings().beginGroup("internalConfig");

	setNumColumns(settings().value("numColumns", 5).toInt());
	setNumRows(settings().value("numRows", 3).toInt());

	// we need to know the number of columns and rows before we can set up ourselves
	init();

	haveHeartbeat(settings().value("hasHeartbeat", false).toBool());
	setHeartbeat(settings().value("heartbeat", 5000).toInt());
	setRelativeMouseMoves(settings().value("relativeMouseMoves", false).toBool());
	setScreenSaverSync(settings().value("screenSaverSync", true).toBool());
	setWin32KeepForeground(settings().value("win32KeepForeground", false).toBool());
	haveSwitchDelay(settings().value("hasSwitchDelay", false).toBool());
	setSwitchDelay(settings().value("switchDelay", 250).toInt());
	haveSwitchDoubleTap(settings().value("hasSwitchDoubleTap", false).toBool());
	setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt());
	setSwitchCornerSize(settings().value("switchCornerSize").toInt());
	setIgnoreAutoConnectClient(settings().value("ignoreAutoConnectClient").toBool());

	readSettings(settings(), switchCorners(), "switchCorner", false, NumSwitchCorners);

	int numScreens = settings().beginReadArray("screens");
	Q_ASSERT(numScreens <= screens().size());
	for (int i = 0; i < numScreens; i++)
	{
		settings().setArrayIndex(i);
		screens()[i].loadSettings(settings());
	}
	settings().endArray();

	int numHotkeys = settings().beginReadArray("hotkeys");
	for (int i = 0; i < numHotkeys; i++)
	{
		settings().setArrayIndex(i);
		Hotkey h;
		h.loadSettings(settings());
		hotkeys().append(h);
	}
	settings().endArray();

	settings().endGroup();
}
  /*!
   * @if jp
   * @brief 初期化
   * @else
   * @brief Initialization
   * @endif
   */
  bool
  ComponentObserverConsumer::init(RTObject_impl& rtobj,
                                  const SDOPackage::ServiceProfile& profile)
  {
    if (!m_observer.setObject(profile.service))
      {
        // narrowing failed
        return false;
      }

    m_rtobj = &rtobj;
    m_profile = profile;
    coil::Properties prop;
    NVUtil::copyToProperties(prop, profile.properties);
    setHeartbeat(prop);
    setListeners(prop);
    return true;
  }
 /*!
  * @if jp
  * @brief 再初期化
  * @else
  * @brief Re-initialization
  * @endif
  */
 bool
 ComponentObserverConsumer::reinit(const SDOPackage::ServiceProfile& profile)
 {
   if (!m_observer._ptr()->_is_equivalent(profile.service))
     {
       CorbaConsumer<OpenRTM::ComponentObserver> tmp;
       if (!tmp.setObject(profile.service))
         {
           return false;
         }
       m_observer.releaseObject();
       m_observer.setObject(profile.service);
     }
   m_profile= profile;
   coil::Properties prop;
   NVUtil::copyToProperties(prop, profile.properties);
   setHeartbeat(prop);
   setListeners(prop);
   return true;
 }