StartScreenViewImpl::StartScreenViewImpl(QWidget *parent) : QWidget(parent), previewArea(0,0,200,200) {
	ui.setupUi(this);

	this->setSlidePreview(Slide(QImage(QString(":/presenter/pastlastslide.svg")), QRect()));

	connect(this->ui.startButton, SIGNAL(clicked()), this, SLOT(onStartButtonClick()));
	connect(this->ui.quitButton, SIGNAL(clicked()), this, SLOT(onCancelButtonClick()));
	connect(this->ui.openPresentationButtonBox, SIGNAL(accepted()), this, SLOT(onPdfFileBrowseButtonClick()));
	connect(this->ui.openNotesButtonBox, SIGNAL(accepted()), this, SLOT(onNotesFileBrowseButtonClick()));
	connect(this->ui.openNotesButtonBox, SIGNAL(destroyed()), this, SLOT(onNotesFileDiscard()));
	connect(this->ui.openNotesButtonBox, SIGNAL(rejected()), this, SLOT(onNotesFileDiscard()));
	connect(this->ui.slideSlider, SIGNAL(valueChanged(int)), this, SLOT(onSliderMove(int)));

	QMenu * optionsMenu = new QMenu();
	optionsMenu->addAction(this->ui.actionRehearse_Mode);
	optionsMenu->addAction(this->ui.actionWindowed_Mode);
	optionsMenu->addAction(this->ui.actionAbout);

	this->ui.optionsButton->setMenu(optionsMenu);

	connect(this->ui.actionAbout, SIGNAL(triggered()), this, SLOT(onAboutClick()));

	this->ui.slideSlider->setTracking(true);
	this->ui.slideSlider->setEnabled(false);
}
Esempio n. 2
0
QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* parent)
	: QWidget(parent), settings_(settings), previousRow_(-1)
{
	ui_.setupUi(this);

	connect(ui_.listWidget, SIGNAL(currentRowChanged(int)), SLOT(onCurrentRowChanged(int)));

	connect(ui_.newButton, SIGNAL(clicked()), SLOT(onNewButtonClicked()));
	connect(ui_.deleteButton, SIGNAL(clicked()), SLOT(onDeleteButtonClicked()));

	connect(ui_.buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(onApplyButtonClick()));
	connect(ui_.buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), SLOT(onCancelButtonClick()));
	connect(ui_.buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), SLOT(onOkButtonClick()));
	connect(ui_.buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), SLOT(onResetToDefaultRulesClicked()));

	connect(ui_.noColorRadio, SIGNAL(clicked()), SLOT(colorOtherSelect()));
	connect(ui_.customColorRadio, SIGNAL(clicked()), SLOT(colorCustomSelect()));

	connect(ui_.noSoundRadio, SIGNAL(clicked()), SLOT(soundOtherSelect()));
	connect(ui_.defaultSoundRadio, SIGNAL(clicked()), SLOT(soundOtherSelect()));
	connect(ui_.customSoundRadio, SIGNAL(clicked()), SLOT(soundCustomSelect()));

	/* replace the static line-edit control with the roster autocompleter */
	ui_.dummySenderName->setVisible(false);
	jid_ = new QtSuggestingJIDInput(this, settings);
	ui_.senderName->addWidget(jid_);
	jid_->onUserSelected.connect(boost::bind(&QtHighlightEditor::handleOnUserSelected, this, _1));

	/* handle autocomplete */
	connect(jid_, SIGNAL(textEdited(QString)), SLOT(handleContactSuggestionRequested(QString)));

	/* we need to be notified if any of the state changes so that we can update our textual rule description */
	connect(ui_.chatRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.roomRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.nickIsKeyword, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.allMsgRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.senderRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(jid_, SIGNAL(textChanged(const QString&)), SLOT(widgetClick()));
	connect(ui_.keywordRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.keyword, SIGNAL(textChanged(const QString&)), SLOT(widgetClick()));
	connect(ui_.matchPartialWords, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.matchCase, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.noColorRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.customColorRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.noSoundRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.defaultSoundRadio, SIGNAL(clicked()), SLOT(widgetClick()));
	connect(ui_.customSoundRadio, SIGNAL(clicked()), SLOT(widgetClick()));

	/* allow selection of a custom sound file */
	connect(ui_.soundFileButton, SIGNAL(clicked()), SLOT(selectSoundFile()));

	/* allowing reordering items */
	connect(ui_.moveUpButton, SIGNAL(clicked()), this, SLOT(onUpButtonClicked()));
	connect(ui_.moveDownButton, SIGNAL(clicked()), this, SLOT(onDownButtonClicked()));

	setWindowTitle(tr("Highlight Rules"));
}
BOOL OutgoingConnectionDialog::onCommand(UINT controlID, UINT notificationID)
{
  switch (controlID) {
  case IDOK:
    onOkButtonClick();
    break;
  case IDCANCEL:
    onCancelButtonClick();
    break;
  }
  return FALSE;
}
BOOL EditPortMappingDialog::onCommand(UINT cID, UINT nID)
{
  switch (cID) {
  case IDOK:
    onOkButtonClick();
    break;
  case IDCANCEL:
    onCancelButtonClick();
    break;
  }
  return TRUE;
}
Esempio n. 5
0
BOOL ConfigDialog::onCommand(UINT controlID, UINT notificationID)
{
  switch (controlID) {
  case IDOK:
    onOKButtonClick();
    break;
  case IDCANCEL:
    onCancelButtonClick();
    break;
  case IDC_APPLY:
    onApplyButtonClick();
    break;
  }
  return TRUE;
}
Esempio n. 6
0
BOOL VncViewerConfigDialog::onCommand(UINT controlID, UINT notificationID)
{
  switch (controlID) {
  case IDC_OK:
    onOkButtonClick();
    break;
  case IDC_CANCEL:
    onCancelButtonClick();
    break;
  case IDCANCEL:
    kill(IDCANCEL);
    break;
  case IDC_BUTTON_CLEAR_LIST:
    onClearConnectionHistoryButtonClick();
    break;
  }
  return TRUE;
}
BOOL EditIpAccessRuleDialog::onCommand(UINT cID, UINT nID)
{
  if (nID == BN_CLICKED) {
    switch (cID) {
    case IDOK:
      onOkButtonClick();
      break;
    case IDCANCEL:
      onCancelButtonClick();
      break;
    case IDC_ALLOW:
      onAccessTypeRadioClick(0);
      break;
    case IDC_DENY:
     onAccessTypeRadioClick(1);
      break;
    case IDC_QUERY:
      onAccessTypeRadioClick(2);
      break;
    }
  }
  return TRUE;
}