コード例 #1
0
ファイル: valueslider.cpp プロジェクト: aveminus/freq
void ValueSlider::
        updateLineEditOnValueChanged(bool v)
{
    if (v)
        connect(this, SIGNAL(valueChanged(qreal)), this, SLOT(updateLineEdit()));
    else
        disconnect(this, SIGNAL(valueChanged(qreal)), this, SLOT(updateLineEdit()));
}
コード例 #2
0
ファイル: valueslider.cpp プロジェクト: aveminus/freq
void ValueSlider::
        focusOutEvent ( QFocusEvent * e )
{
    QComboBox::focusOutEvent(e);

    updateLineEdit();
}
コード例 #3
0
ファイル: valueslider.cpp プロジェクト: aveminus/freq
void ValueSlider::
        setValue(qreal v)
{
    qreal q = v;
    if (v < minimum())
        v = minimum();
    if (v > maximum())
        v = maximum();

    if (value_ == v && v == q)
        return;

    value_ = v;
    updateLineEdit ();

    if (!slider_is_pressed_)
        slider_->setValue(toInt(v));

    emit valueChanged(v);
}
コード例 #4
0
		optionChanged(QLatin1String("AddressField/ShowUrlIcon"), SettingsManager::getValue(QLatin1String("AddressField/ShowUrlIcon")));

		lineEdit()->setPlaceholderText(tr("Enter address or search…"));

		connect(SettingsManager::getInstance(), SIGNAL(valueChanged(QString,QVariant)), this, SLOT(optionChanged(QString,QVariant)));

		if (toolBar->getIdentifier() != ToolBarsManager::NavigationBar)
		{
			connect(toolBar, SIGNAL(windowChanged(Window*)), this, SLOT(setWindow(Window*)));
		}
	}

	connect(this, SIGNAL(activated(QString)), this, SLOT(openUrl(QString)));
	connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(setCompletion(QString)));
	connect(BookmarksManager::getModel(), SIGNAL(modelModified()), this, SLOT(updateBookmark()));
	connect(HistoryManager::getInstance(), SIGNAL(typedHistoryModelModified()), this, SLOT(updateLineEdit()));
}

void AddressWidget::changeEvent(QEvent *event)
{
	QComboBox::changeEvent(event);

	if (event->type() == QEvent::LanguageChange && !m_isUsingSimpleMode)
	{
		lineEdit()->setPlaceholderText(tr("Enter address or search…"));
	}
}

void AddressWidget::timerEvent(QTimerEvent *event)
{
	if (event->timerId() == m_removeModelTimer)
コード例 #5
0
		m_lineEdit->setPlaceholderText(tr("Enter address or search…"));

		connect(SettingsManager::getInstance(), SIGNAL(valueChanged(int,QVariant)), this, SLOT(optionChanged(int,QVariant)));

		if (toolBar->getIdentifier() != ToolBarsManager::NavigationBar)
		{
			connect(toolBar, SIGNAL(windowChanged(Window*)), this, SLOT(setWindow(Window*)));
		}
	}

	connect(this, SIGNAL(activated(QString)), this, SLOT(openUrl(QString)));
	connect(m_lineEdit, SIGNAL(textDropped(QString)), this, SLOT(handleUserInput(QString)));
	connect(m_completionModel, SIGNAL(completionReady(QString)), this, SLOT(setCompletion(QString)));
	connect(BookmarksManager::getModel(), SIGNAL(modelModified()), this, SLOT(updateBookmark()));
	connect(HistoryManager::getTypedHistoryModel(), SIGNAL(modelModified()), this, SLOT(updateLineEdit()));
}

void AddressWidget::changeEvent(QEvent *event)
{
	ComboBoxWidget::changeEvent(event);

	switch (event->type())
	{
		case QEvent::LanguageChange:
			if (!m_isUsingSimpleMode)
			{
				m_lineEdit->setPlaceholderText(tr("Enter address or search…"));
			}

			break;
コード例 #6
0
ファイル: valueslider.cpp プロジェクト: aveminus/freq
void ValueSlider::
        setUnit(QString value)
{
    unit_ = value;
    updateLineEdit();
}