Example #1
0
void RulerT::mousePressEvent(QMouseEvent *m)
{
	QRect fpo;
	mousePressed = true;
	rulerCode = 0;
	if (haveInd)
	{
		fpo = QRect(static_cast<int>(firstLine+leftIndent-offset)-4, 0, 8, 12);
		if (fpo.contains(m->pos()))
		{
			rulerCode = 1;
			mouseX = m->x();
			return;
		}
		fpo = QRect(static_cast<int>(leftIndent-offset)-4, 12, 8, 12);
		if (fpo.contains(m->pos()))
		{
			rulerCode = 2;
			mouseX = m->x();
			return;
		}
	}
	if (tabValues.count() != 0)
	{
		for (int yg = 0; yg < static_cast<int>(tabValues.count()); yg++)
		{
			fpo = QRect(static_cast<int>(tabValues[yg].tabPosition-offset)-3, 15, 8, 8);
			if (fpo.contains(m->pos()))
			{
				rulerCode = 3;
				actTab = yg;
				mouseX = m->x();
				emit tabSelected();
				emit typeChanged(tabValues[actTab].tabType);
				emit tabMoved(tabValues[actTab].tabPosition);
				emit fillCharChanged(tabValues[actTab].tabFillChar);
				repaint();
				return;
			}
		}
	}
	if ((rulerCode == 0) && (m->button() == Qt::LeftButton))
	{
		ParagraphStyle::TabRecord tb;
		tb.tabPosition = static_cast<double>(m->x() + offset);
		tb.tabType = 0;
		tb.tabFillChar = QChar();
		tabValues.prepend(tb);
		actTab = 0;
		rulerCode = 3;
		updateTabList();
		repaint();
		emit newTab();
		emit typeChanged(tabValues[actTab].tabType);
		emit tabMoved(tabValues[actTab].tabPosition);
		emit fillCharChanged(tabValues[actTab].tabFillChar);
		qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor));
	}
	mouseX = m->x();
}
Example #2
0
void MiningPage::startPressed()
{
    initThreads = ui->threadsBox->value();
    
    if (minerActive == false)
    {

        saveSettings();
        if (getMiningType() == ClientModel::SoloMining)
        {
            minerStarted();
            typeChanged(0);
        }
        else
        {
            startPoolMining();
            typeChanged(1);
        }
    }
    else
    {
        if (getMiningType() == ClientModel::SoloMining)
        {
            minerFinished();
            typeChanged(0);
        }
        else
        {
            stopPoolMining();
            typeChanged(1);
        }
    }
}
Example #3
0
void QHtspService::_connectSignals()
{
    connect(d.data(), SIGNAL(caidChanged()), this, SIGNAL(caidChanged()));
    connect(d.data(), SIGNAL(canameChanged()), this, SIGNAL(canameChanged()));
    connect(d.data(), SIGNAL(nameChanged()), this, SIGNAL(typeChanged()));
    connect(d.data(), SIGNAL(typeChanged()), this, SIGNAL(nameChanged()));
}
void Drink::setType(const QString &type)
{
	if(type == this->type())
		return;
	setValue(DrinkProperties::TypeAttribute,QVariant::fromValue<QString>(type));
	emit typeChanged(type);
}
Example #5
0
RuleWidget::RuleWidget(QWidget *parent) :
    QWidget(parent)
{
    auto layout = new QVBoxLayout(this);
    auto firstline = new QHBoxLayout();
    auto secondline = new QHBoxLayout();
    layout->addLayout(firstline);
    layout->addLayout(secondline);
    firstline->addWidget(new QLabel(ifStr(), this));
    column = new QComboBox(this);
    auto columnList = Statements::columnList();
    for(auto columnName : columnList)
        column->addItem(columnName);
    firstline->addWidget(column);
    type = new QComboBox(this);
    for(auto typestr : Rules::typeList())
        type->addItem(typestr);

    firstline->addWidget(type);
    value = new QLineEdit(this);
    firstline->addWidget(value);
    firstline->addWidget(new QLabel(",", this));
    secondline->addWidget(new QLabel(thenStr(), this));
    setCategories(secondline);
    connect(column, SIGNAL(currentIndexChanged(int)), this, SLOT(columnChanged(int)));
    connect(type, SIGNAL(currentIndexChanged(int)), this, SLOT(typeChanged(int)));
    connect(value, SIGNAL(textChanged(QString)), this, SLOT(valueChanged(QString)));
    type->setCurrentIndex(0);
    typeChanged(0);
}
Example #6
0
void ShotgunField::setType(ShotgunField::Type t)
{
    if (m_type != t) {
        m_type = t;
        emit typeChanged(m_type);
    }
}
int DialogSiteGrabber::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: runProject((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< QStringList(*)>(_a[4]))); break;
        case 1: next(); break;
        case 2: back(); break;
        case 3: run(); break;
        case 4: cancel(); break;
        case 5: addFilter(); break;
        case 6: browse(); break;
        case 7: pageChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 8: typeChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 9: lePNameChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 10: lePDirChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 11: lePURLChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 12: leFTPURLChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 13;
    }
    return _id;
}
Example #8
0
// Set the widgets from the data object.
void 
AccountMaster::dataToWidget()
{
    _name->setText(_curr.name());
    _number->setText(_curr.number());
    _type->setCurrentItem(_curr.type());
    _parent->setId(_curr.parentId());
    _parentLookup->type->setCurrentText(_curr.typeName());
    _parentLookup->skipId = _curr.id();
    _header->setChecked(_curr.isHeader());
    _lastRecon->setDate(_curr.lastReconciled());
    _nextNum->setFixed(_curr.nextNumber());
    _inactive->setChecked(!_curr.isActive());

    // Set groups
    _groups->clear();
    for (unsigned int i = 0; i < _curr.groups().size(); ++i) {
	VectorRow* row = new VectorRow(_groups->columns());
	row->setValue(0, _curr.groups()[i]);
	_groups->appendRow(row);
    }
    _groups->appendRow(new VectorRow(_groups->columns()));

    typeChanged(_curr.type());
}
void QQmlNetwork::setType(const QQmlNetwork::Type &type)
{
    if(m_type == type)
        return;
    m_type = type;
    emit typeChanged();
}
void QDeclarativeMessageFilter::setType(FilterType type)
{
    if (type == d->type)
        return;
    d->type = type;
    emit typeChanged();
}
Example #11
0
int MiningPage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: startPressed(); break;
        case 1: startPoolMining(); break;
        case 2: stopPoolMining(); break;
        case 3: updateSpeed(); break;
        case 4: loadSettings(); break;
        case 5: saveSettings(); break;
        case 6: reportToList((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break;
        case 7: minerStarted(); break;
        case 8: minerError((*reinterpret_cast< QProcess::ProcessError(*)>(_a[1]))); break;
        case 9: minerFinished(); break;
        case 10: readProcessOutput(); break;
        case 11: { QString _r = getTime((*reinterpret_cast< QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 12: enableMiningControls((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 13: enablePoolMiningControls((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 14: { ClientModel::MiningType _r = getMiningType();
            if (_a[0]) *reinterpret_cast< ClientModel::MiningType*>(_a[0]) = _r; }  break;
        case 15: typeChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 16: debugToggled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 17;
    }
    return _id;
}
Example #12
0
void Line::setType(int type)
{
    this->lineType = type;
    this->update(0, 0, this->width(), this->height());

    emit typeChanged();
}
Example #13
0
DofEditor::DofEditor(QWidget *_parent)
	: QWidget(_parent)
{
	setupUi(this);
	connect(checkBox, SIGNAL(stateChanged(int)), this, SLOT(activeChanged(int)));
	connect(comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(typeChanged(int)));

	connect(minSpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valueChanged()));
	connect(valueSpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valueChanged()));
	connect(maxSpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valueChanged()));

	comboBox->addItem("unlimited");
	comboBox->addItem("limited");
	comboBox->addItem("circular");

	activeChanged(Qt::Unchecked);
	typeChanged(0);

	double min = -99, max = 99, tick = 0.1;
	minSpinBox->setRange(min, max);
	minSpinBox->setSingleStep(tick);

	valueSpinBox->setRange(min, max);
	valueSpinBox->setSingleStep(tick);

	maxSpinBox->setRange(min, max);
	maxSpinBox->setSingleStep(tick);

}
Example #14
0
void TestItem::setType(const QString &type){
    if (type.compare(type) != 0 ) {
        m_type = type;
        emit typeChanged();
        emit dataChanged();
    }
}
Example #15
0
void CommentaryObject::setType(const QString &type)
{
	if (m_type != type) {
		m_type = type;
		emit typeChanged();
	}
}
const char *LH_MonitoringBar::userInit()
{
    if( const char *err = LH_Bar::userInit() ) return err;

    ui_ = new LH_MonitoringUI(this, mdmNumbers, true, false);

    setup_max_ = new LH_Qt_int(this, "Maximum", 100, 0, 99999);
    setup_max_->setHelp( "<p>The bar's maximum value.</p>");
    setup_max_->setOrder(-3);
    connect( setup_max_, SIGNAL(changed()), this, SLOT(updateBounds()) );

    setup_min_ = new LH_Qt_int(this, "Minimum", 0, 0, 99999);
    setup_min_->setHelp( "<p>The bar's minimum value.</p>");
    setup_min_->setOrder(-3);
    connect( setup_min_, SIGNAL(changed()), this, SLOT(updateBounds()) );

    (new LH_Qt_QString(this,("image-hr2"), QString("<hr>"), LH_FLAG_NOSAVE | LH_FLAG_NOSOURCE | LH_FLAG_NOSINK | LH_FLAG_HIDETITLE,lh_type_string_html ))->setOrder(-3);

    updateBounds();

    connect(ui_, SIGNAL(appChanged()), this, SLOT(configChanged()) );
    connect(ui_, SIGNAL(typeChanged()), this, SLOT(configChanged()) );
    connect(ui_, SIGNAL(groupChanged()), this, SLOT(configChanged()) );
    connect(ui_, SIGNAL(itemChanged()), this, SLOT(configChanged()) );
    connect(ui_, SIGNAL(initialized()), this, SLOT(configChanged()) );

    return 0;
}
Example #17
0
void ProxiesPage::readConfig(const QtopiaNetworkProperties& prop)
{
    int index = 0;
    if (prop.contains("Proxy/Type"))
        index = prop.value("Proxy/Type").toInt();
    d->type->setCurrentIndex(index);
    typeChanged(index);


    if (prop.contains("Proxy/AutoConfig"))
        d->autoconfig->addItem( prop.value("Proxy/AutoConfig").toString() );

    if (prop.contains("Proxy/HttpHost"))
        d->http_host->setText( prop.value("Proxy/HttpHost").toString() );

    if (prop.contains("Proxy/HttpPort"))
        d->http_port->setValue( prop.value("Proxy/HttpPort").toInt() );

    if (prop.contains("Proxy/FtpHost"))
        d->ftp_host->setText( prop.value("Proxy/FtpHost").toString() );

    if (prop.contains("Proxy/FtpPort"))
        d->ftp_port->setValue( prop.value("Proxy/FtpPort").toInt() );

    if (prop.contains("Proxy/NoProxies")) {
        d->noproxies->setValidator(new ProxyValidator(this));
        d->noproxies->setText(prop.value("Proxy/NoProxies").toString());
    }
}
Example #18
0
void MenuItem::setType(QString type) {
    if(m_type != type) {
        m_type = type;
        logMenuPropertyChanged(m_type, "type");
        typeChanged(m_type);
    }
}
Example #19
0
void
AccountMaster::setType(int type)
{
    _orig.setType(Account::Type(type));
    _type->setCurrentItem(type);
    typeChanged(type);
}
Example #20
0
void Message::setType(const Type type)
{
    if (m_type != type) {
        m_type = type;

        emit typeChanged();
    }
}
Example #21
0
void Layer::setType(const Quasi::LayerType &type)
{
    if (type != m_type){
        m_type = type;

        emit typeChanged();
    }
}
Example #22
0
void SpecialKey::setType(SpecialKey::Type type)
{
    if(type != m_type)
    {
        m_type = type;
        emit typeChanged();
    }
}
void QDeclarativeNdefFilter::setType(const QString &t)
{
    if (m_type == t)
        return;

    m_type = t;
    emit typeChanged();
}
Example #24
0
void DeviceItem::setType(QString type)
{
	if (m_type == type)
		return;

	m_type = type;
	emit typeChanged(type);
}
Example #25
0
void Phrase::setType(Phrase::Type type)
{
    if (m_type == type) {
        return;
    }
    m_type = type;
    emit typeChanged();
}
Example #26
0
void QDnsLookup::setType(Type type)
{
    Q_D(QDnsLookup);
    if (type != d->type) {
        d->type = type;
        emit typeChanged(type);
    }
}
Example #27
0
void PreviewButtonItem::setType(KDecoration2::DecorationButtonType type)
{
    if (m_type == type) {
        return;
    }
    m_type = type;
    emit typeChanged();
}
Example #28
0
void PaperManager::setType(int t)
{
    if( p->type == t )
        return;

    p->type = t;
    emit typeChanged();
}
void NewsFeedFilterInterface::setType(FeedType type)
{
    Q_D(NewsFeedFilterInterface);
    if (d->type != type) {
        d->type = type;
        emit typeChanged();
    }
}
Example #30
0
void TiledObject::setType(const QString &type)
{
    if(m_type == type)
        return;

    m_type = type;
    emit typeChanged();
}