Exemplo n.º 1
0
SBI_NetworkIconDialog::SBI_NetworkIconDialog(QWidget* parent)
    : QDialog(parent)
    , ui(new Ui::SBI_NetworkIconDialog)
{
    setAttribute(Qt::WA_DeleteOnClose);

    ui->setupUi(this);

    ui->addButton->setIcon(QIcon::fromTheme("document-new", QIcon(":sbi/data/add.png")));
    ui->removeButton->setIcon(QIcon::fromTheme("edit-delete", QIcon(":sbi/data/remove.png")));

    const QHash<QString, SBI_NetworkProxy*> &proxies = SBINetManager->proxies();

    QHashIterator<QString, SBI_NetworkProxy*> it(proxies);
    while (it.hasNext()) {
        it.next();
        ui->comboBox->addItem(it.key());
    }

    updateWidgets();
    showProxy(ui->comboBox->currentText());

    connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addProxy()));
    connect(ui->removeButton, SIGNAL(clicked()), this, SLOT(removeProxy()));
    connect(ui->comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(showProxy(QString)));
    connect(ui->proxyButtonBox, SIGNAL(accepted()), this, SLOT(saveProxy()));
    connect(ui->closeButton, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close()));
}
Exemplo n.º 2
0
/**
 * Removes the element from the current configuration.
 */
bool InputManager::configRemove(jccl::ConfigElementPtr element)
{
vpr::DebugOutputGuard dbg_output(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL,
                              std::string("InputManager: Removing config...\n"),
                              std::string("done removing config.\n"));
   vprASSERT(configCanHandle(element));

   bool ret_val = false;      // Flag to return success

   // NEED TO FIX!!!!
   if (cluster::ClusterManager::instance()->recognizeRemoteDeviceConfig(element))
   {
      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)
         << "InputManager can not handle remote devices, we must use Remote Input Manager."
         << vprDEBUG_FLUSH;
      ret_val = false;
   }
   else if(DeviceFactory::instance()->recognizeDevice(element))
   {
      ret_val = removeDevice(element);
   }
   else if(recognizeProxyAlias(element))
   {
      ret_val = removeProxyAlias(element);
   }
   else if(ProxyFactory::instance()->recognizeProxy(element))
   {
      ret_val = removeProxy(element);
   }
   else if(element->getID() == std::string("display_system"))
   {
      mDisplaySystemElement.reset();  // Keep track of the display system element
      ret_val = true;                 // We successfully configured.
                                       // This tell processPending to remove it to the active config
   }
   else
   {
      ret_val = false;
   }

   if(ret_val)
   {
      resetAllDevicesAndProxies();
      updateAllDevices();                             // Update all the input data
      updateAllProxies();                             // Update all the input data
      BaseDeviceInterface::refreshAllInterfaces();      // Refresh all the device interface handles
      vprDEBUG(gadgetDBG_INPUT_MGR,vprDBG_VERB_LVL)
         << "InputManager::configRemove(): Updated all data" << std::endl
         << vprDEBUG_FLUSH;
   }

   return ret_val;         // Return the success flag if we added at all
}
Exemplo n.º 3
0
////////////////////////////////////////////////////////////////////////////////
// addProxy
void EvtPublisher::addProxy( EvtProxy* pProxy )
{
	removeProxy( pProxy );
	Proxies_.push_back( pProxy );
}
ConnectProxy* CConnectMgr::removeProxy(uuid_type flag)
{
	return removeProxy(m_flag2Proxys.find(flag));
}
Exemplo n.º 5
0
bool InputManager::removeProxy(jccl::ConfigElementPtr element)
{
   std::string proxy_name;
   proxy_name = element->getFullName();
   return removeProxy(proxy_name);
}