void SvCreator::addEvents(void)
{
  connect(m_subMenus["NewFile"],SIGNAL(triggered(bool)),this,SLOT(newView()));
  connect(m_subMenus["NewNode"],SIGNAL(triggered(bool)),this,SLOT(newNode()));
  connect(m_subMenus["CopySelected"],SIGNAL(triggered(bool)),this,SLOT(copySelected()));
  connect(m_subMenus["PasteFromSelected"],SIGNAL(triggered(bool)),this,SLOT(pasteFromSelected()));
  connect(m_subMenus["DeleteNode"],SIGNAL(triggered(bool)),this,SLOT(deleteNode()));
  connect(m_subMenus["Open"],SIGNAL(triggered(bool)),this,SLOT(open()));
  connect(m_subMenus["Save"],SIGNAL(triggered(bool)),this,SLOT(save()));
  connect(m_subMenus["SaveAs"], SIGNAL(triggered(bool)), this, SLOT(saveAs()));
  connect(m_subMenus["ImportHostGroupAsBusinessView"],SIGNAL(triggered(bool)),this,SLOT(handleImportHostGroupAsBusinessView()));
  connect(m_subMenus["ImportMonitorItemsAsDataPoints"],SIGNAL(triggered(bool)),this,SLOT(handleImportMonitorItemsAsDataPoints()));
  connect(m_subMenus["ImportNagiosChecks"],SIGNAL(triggered(bool)),this,SLOT(importNagiosChecks()));
  connect(m_subMenus["ImportNagiosBPIConf"],SIGNAL(triggered(bool)),this,SLOT(handleImportNagiosBPIConfigAsBusinessView()));
  connect(m_subMenus["ImportZabbixITServices"],SIGNAL(triggered(bool)),this,SLOT(handleImportZabbixITServicesAsBusinessView()));
  connect(m_subMenus["Quit"],SIGNAL(triggered(bool)),this,SLOT(treatCloseAction()));
  connect(m_subMenus["ShowAbout"],SIGNAL(triggered(bool)),this,SLOT(handleShowAbout()));
  connect(m_subMenus["ShowOnlineResources"],SIGNAL(triggered(bool)),this,SLOT(handleShowOnlineResources()));
  connect(m_editor,SIGNAL(saveClicked()),this,SLOT(save()));
  connect(m_editor,SIGNAL(closeClicked()),this,SLOT(treatCloseAction()));
  connect(m_editor,SIGNAL(returnPressed()),this,SLOT(handleReturnPressed()));
  connect(m_editor,SIGNAL(nodeTypeActivated(qint32)),this,SLOT(handleNodeTypeActivated(qint32)));
  connect(m_editor,SIGNAL(errorOccurred(QString)),this, SLOT(handleErrorOccurred(QString)));
  connect(m_tree,SIGNAL(itemSelectionChanged()),this,SLOT(handleSelectedNodeChanged()));
  connect(m_tree,SIGNAL(treeNodeMoved(QString)),this,SLOT(handleTreeNodeMoved(QString)));
}
Exemplo n.º 2
0
   Interacter::Interacter() {
      icon = new QIcon("res/slurp.png");

      setWindowIcon(*icon);
      setFixedSize(512, 361);

      aboutBox = new About(this);

      centralwidget = new QWidget(this);

      progressBar = new QProgressBar(centralwidget);
      progressBar->setGeometry(QRect(20, 69, 481, 31));
      progressBar->setValue(0);

      bitrateNumber = new QLCDNumber(centralwidget);
      bitrateNumber->setGeometry(QRect(20, 207, 64, 23));

      queuedNumber = new QLCDNumber(centralwidget);
      queuedNumber->setGeometry(QRect(20, 168, 64, 23));

      crawledNumber = new QLCDNumber(centralwidget);
      crawledNumber->setGeometry(QRect(20, 129, 64, 23));

      urlBrowser = new QTextBrowser(centralwidget);
      urlBrowser->setGeometry(QRect(110, 129, 381, 202));
      urlBrowser->setOpenExternalLinks(true);

      splitter = new QSplitter(centralwidget);
      splitter->setGeometry(QRect(20, 29, 471, 25));
      splitter->setOrientation(Qt::Horizontal);

      urlEntry = new QLineEdit("http://", splitter);
      splitter->addWidget(urlEntry);

      crawlButton = new QPushButton("Crawl", splitter);
      crawlButton->setEnabled(false);
      splitter->addWidget(crawlButton);

      aboutButton = new QPushButton("About", splitter);
      splitter->addWidget(aboutButton);

      setCentralWidget(centralwidget);

      QObject::connect(crawlButton, SIGNAL(clicked()),
         this, SLOT(handleCrawl()));

      QObject::connect(aboutButton, SIGNAL(clicked()),
         this, SLOT(handleAboutClicked()));

      QObject::connect(urlEntry, SIGNAL(textChanged(const QString &)),
         this, SLOT(handleUrlChange(const QString &)));

      QObject::connect(urlEntry, SIGNAL(returnPressed()),
         this, SLOT(handleReturnPressed()));

      emit urlEntry->setFocus();
    }
void ServiceEditor::addEvent(void)
{
  connect(nameField(), SIGNAL(returnPressed ()), this, SLOT(handleReturnPressed() ) );
  connect(typeField(), SIGNAL(currentIndexChanged(const QString&)), this, SLOT(handleNodeTypeChanged( const QString& ) ) );
  connect(typeField(), SIGNAL(activated(const QString&)), this, SLOT(handleNodeTypeActivated( const QString& ) ) );
  connect(m_dataPointSearchField, SIGNAL(returnPressed()), this, SLOT(handleDataPointFieldReturnPressed()));
  connect(m_dataPointSearchField, SIGNAL(textEdited(const QString&)), this, SLOT(handleDataPointFilter(const QString&)));
  connect(m_searchDataPointButton, SIGNAL(clicked()), this, SLOT(handleDataPointSearch()));
  connect(m_addDataPointButton, SIGNAL(clicked()), this, SLOT(handleAddDataPointEntry()));
  connect(m_hostGroupFilterBox, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(handleUpdateDataPointsList()));
  connect(m_actionButtonBox, SIGNAL(accepted()), this, SLOT(handleSaveClick()));
  connect(m_actionButtonBox, SIGNAL(rejected()), this, SLOT(handleCloseClick()));
  connect(m_addThresholdButton, SIGNAL(clicked()), this, SLOT(handleAddThreshold()));
  connect(m_removeThresholdButton, SIGNAL(clicked()), this, SLOT(handleRemoveThreshold()));
  connect(m_thresholdRulesBox, SIGNAL(currentIndexChanged(int)), this, SLOT(handleThresholdRulesChanged()));
  connect(m_calcRulesBox, SIGNAL(currentIndexChanged(int)), this, SLOT(handleCalcRuleChanged()));
}