Пример #1
0
AsciiOpenDlg::AsciiOpenDlg(QWidget* parent)
	: QDialog(parent)
	//, Ui::AsciiOpenDialog()
	, m_ui(new Ui_AsciiOpenDialog)
	, m_skippedLines(0)
	, m_separator(' ')
	, m_averageLineSize(-1.0)
	//, m_filename()
	, m_columnsCount(0)
{
	m_ui->setupUi(this);

	//spinBoxSkipLines->setValue(0);
	m_ui->commentLinesSkippedLabel->hide();

	connect(m_ui->applyButton,			SIGNAL(clicked()),						this, SLOT(apply()));
	connect(m_ui->applyAllButton,		SIGNAL(clicked()),						this, SLOT(applyAll()));
	connect(m_ui->cancelButton,			SIGNAL(clicked()),						this, SLOT(reject()));
	connect(m_ui->lineEditSeparator,	SIGNAL(textChanged(const QString &)),	this, SLOT(onSeparatorChange(const QString &)));
	connect(m_ui->spinBoxSkipLines,		SIGNAL(valueChanged(int)),				this, SLOT(setSkippedLines(int)));

	//shortcut buttons
	connect(m_ui->toolButtonShortcutESP,		SIGNAL(clicked()), this, SLOT(shortcutButtonPressed()));
	connect(m_ui->toolButtonShortcutTAB,		SIGNAL(clicked()), this, SLOT(shortcutButtonPressed()));
	connect(m_ui->toolButtonShortcutComma,		SIGNAL(clicked()), this, SLOT(shortcutButtonPressed()));
	connect(m_ui->toolButtonShortcutDotcomma,	SIGNAL(clicked()), this, SLOT(shortcutButtonPressed()));

	m_ui->maxCloudSizeDoubleSpinBox->setMaximum(static_cast<double>(CC_MAX_NUMBER_OF_POINTS_PER_CLOUD)/1.0e6);
	m_ui->maxCloudSizeDoubleSpinBox->setValue(s_maxCloudSizeDoubleSpinBoxValue);
}
Пример #2
0
bool isValidSequence(const Cmds &commands,
                     const MakeInitialState &makeInitialState) {
  auto state = makeInitialState();
  try {
    applyAll(commands, state);
  } catch (const ::rc::detail::CaseResult &result) {
    if (result.type == ::rc::detail::CaseResult::Type::Discard) {
      return false;
    }
    throw;
  }

  return true;
}
int DialogScheduler::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: startAll(); break;
        case 1: stopAll(); break;
        case 2: applyAll(); break;
        case 3: apply(); break;
        case 4: start(); break;
        case 5: stop(); break;
        default: ;
        }
        _id -= 6;
    }
    return _id;
}
Пример #4
0
PlyOpenDlg::PlyOpenDlg(QWidget* parent)
	: QDialog(parent)
	, Ui::PlyOpenDlg()
{
	setupUi(this);

	try
	{
		m_standardCombos.push_back(xComboBox);
		m_standardCombos.push_back(yComboBox);
		m_standardCombos.push_back(zComboBox);
		m_standardCombos.push_back(rComboBox);
		m_standardCombos.push_back(gComboBox);
		m_standardCombos.push_back(bComboBox);
		m_standardCombos.push_back(iComboBox);
		m_standardCombos.push_back(nxComboBox);
		m_standardCombos.push_back(nyComboBox);
		m_standardCombos.push_back(nzComboBox);

		m_sfCombos.push_back(sfComboBox);

		m_listCombos.push_back(facesComboBox);
		m_listCombos.push_back(textCoordsComboBox);

		m_singleCombos.push_back(texIndexComboBox);
	}
	catch(std::bad_alloc)
	{
		//not enough memory?! What can we do...
	}

	connect(addSFToolButton,	SIGNAL(clicked()),			this,	SLOT(addSFComboBox()));
	connect(applyButton,		SIGNAL(clicked()),			this,	SLOT(apply()));
	connect(applyAllButton,		SIGNAL(clicked()),			this,	SLOT(applyAll()));
	connect(cancelButton,		SIGNAL(clicked()),			this,	SLOT(reject()));
	connect(this,				SIGNAL(fullyAccepted()),	this,	SLOT(accept()));
}
Пример #5
0
ShortcutConfig::ShortcutConfig(QWidget* parent)
   : QDialog(parent)
   {
   setupUi(this);
   QSettings settings("MusE", "MusE-qt");
   restoreGeometry(settings.value("ShortcutConfig/geometry").toByteArray());

   connect(cgListView, SIGNAL(itemActivated(QTreeWidgetItem*, int )),
	     this, SLOT(categorySelChanged(QTreeWidgetItem*, int)));
   connect(scListView, SIGNAL(itemActivated(QTreeWidgetItem*, int )),
	   this, SLOT(shortcutSelChanged(QTreeWidgetItem*, int)));

   okButton->setDefault(true);
   connect(defineButton, SIGNAL(pressed()), this, SLOT(assignShortcut()));
   connect(clearButton,  SIGNAL(pressed()), this, SLOT(clearShortcut()));
   connect(textFileButton, SIGNAL(pressed()), this, SLOT(textFileClicked()));
   connect(applyButton,  SIGNAL(pressed()), this, SLOT(applyAll()));
   connect(okButton,     SIGNAL(pressed()), this, SLOT(okClicked()));

   current_category = ALL_SHRT;
   cgListView->sortItems(SHRT_CATEGORY_COL, Qt::AscendingOrder);
   _config_changed = false;

   //Fill up category listview:
   SCListViewItem* newItem;
   SCListViewItem* selItem = 0;
   for (int i=0; i < SHRT_NUM_OF_CATEGORIES; i++) {
         newItem = new SCListViewItem(cgListView, i);
         newItem->setText(SHRT_CATEGORY_COL, shortcut_category[i].name);
         if(shortcut_category[i].id_flag == current_category)
           selItem = newItem;
         }
   if(selItem)
     cgListView->setCurrentItem(selItem);  // Tim
   updateSCListView();

   }
Пример #6
0
bool GfxPalette32::updateForFrame() {
	applyAll();
	_needsUpdate = false;
	return g_sci->_gfxRemap32->remapAllTables(_nextPalette != _currentPalette);
}