Commit 0094e2b4 authored by Vincent PINON's avatar Vincent PINON
Browse files

krazy fix: KComboBox

git grep -l QComboBox | xargs sed -i 's/QComboBox/KComboBox/g'
parent fec55b4b
......@@ -87,7 +87,7 @@ public:
};
KoSliderCombo::KoSliderCombo(QWidget *parent)
: QComboBox(parent)
: KComboBox(parent)
, d(new KoSliderComboPrivate())
{
d->thePublic = this;
......@@ -214,7 +214,7 @@ void KoSliderCombo::changeEvent(QEvent *e)
default:
break;
}
QComboBox::changeEvent(e);
KComboBox::changeEvent(e);
}
void KoSliderCombo::paintEvent(QPaintEvent *)
......@@ -242,14 +242,14 @@ void KoSliderCombo::mousePressEvent(QMouseEvent *e)
if (sc == QStyle::SC_ComboBoxArrow && !d->container->isVisible()) {
d->showPopup();
} else
QComboBox::mousePressEvent(e);
KComboBox::mousePressEvent(e);
}
void KoSliderCombo::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Up) setValue(value() + d->slider->singleStep() *(maximum() - minimum()) / 256 + 0.5);
else if (e->key() == Qt::Key_Down) setValue(value() - d->slider->singleStep() *(maximum() - minimum()) / 256 - 0.5);
else QComboBox::keyPressEvent(e);
else KComboBox::keyPressEvent(e);
}
void KoSliderCombo::wheelEvent(QWheelEvent *e)
......
......@@ -20,7 +20,7 @@
#ifndef KOSLIDERCOMBO_H_
#define KOSLIDERCOMBO_H_
#include <QComboBox>
#include <KComboBox>
/**
......@@ -37,7 +37,7 @@
*
* The input of the numerical line edit is constrained to numbers and decimal signs.
*/
class KoSliderCombo : public QComboBox
class KoSliderCombo : public KComboBox
{
Q_OBJECT
......@@ -98,8 +98,8 @@ public:
*/
qreal value() const;
virtual QSize minimumSizeHint() const; ///< reimplemented from QComboBox
virtual QSize sizeHint() const; ///< reimplemented from QComboBox
virtual QSize minimumSizeHint() const; ///< reimplemented from KComboBox
virtual QSize sizeHint() const; ///< reimplemented from KComboBox
public slots:
......@@ -121,12 +121,12 @@ signals:
void valueChanged(qreal value, bool final);
protected:
virtual void paintEvent(QPaintEvent *); ///< reimplemented from QComboBox
virtual void hideEvent(QHideEvent *); ///< reimplemented from QComboBox
virtual void changeEvent(QEvent *e); ///< reimplemented from QComboBox
virtual void mousePressEvent(QMouseEvent *e); ///< reimplemented from QComboBox
virtual void keyPressEvent(QKeyEvent *e); ///< reimplemented from QComboBox
virtual void wheelEvent(QWheelEvent *e); ///< reimplemented from QComboBox
virtual void paintEvent(QPaintEvent *); ///< reimplemented from KComboBox
virtual void hideEvent(QHideEvent *); ///< reimplemented from KComboBox
virtual void changeEvent(QEvent *e); ///< reimplemented from KComboBox
virtual void mousePressEvent(QMouseEvent *e); ///< reimplemented from KComboBox
virtual void keyPressEvent(QKeyEvent *e); ///< reimplemented from KComboBox
virtual void wheelEvent(QWheelEvent *e); ///< reimplemented from KComboBox
private:
Q_PRIVATE_SLOT(d, void sliderValueChanged(int value))
......
......@@ -747,7 +747,7 @@ void ParameterContainer::slotCollectAllParameters()
setValue = req->url().path();
} else if (type == "keywords"){
KLineEdit *line = static_cast<Keywordval*>(m_valueItems.value(paramName))->lineeditwidget;
QComboBox *combo = static_cast<Keywordval*>(m_valueItems.value(paramName))->comboboxwidget;
KComboBox *combo = static_cast<Keywordval*>(m_valueItems.value(paramName))->comboboxwidget;
if(combo->currentIndex())
{
QString comboval = combo->itemData(combo->currentIndex()).toString();
......
......@@ -120,7 +120,7 @@ RecMonitor::RecMonitor(Kdenlive::MonitorId name, MonitorManager *manager, QWidge
m_logger.setMaxCount(10);
m_logger.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_logger.setFrame(false);
//m_logger.setInsertPolicy(QComboBox::InsertAtTop);
//m_logger.setInsertPolicy(KComboBox::InsertAtTop);
m_freeSpace = new KCapacityBar(KCapacityBar::DrawTextInline, this);
m_freeSpace->setMaximumWidth(150);
......
......@@ -4555,7 +4555,7 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_
QLabel *lab1 = new QLabel(i18n("Additional streams for clip\n %1", path), content);
vbox->addWidget(lab1);
QList <QGroupBox*> groupList;
QList <QComboBox*> comboList;
QList <KComboBox*> comboList;
// We start loading the list at 1, video index 0 should already be loaded
for (int j = 1; j < video_list.count(); ++j) {
Mlt::Producer multiprod(* m_mltProfile, path.toUtf8().constData());
......@@ -4571,7 +4571,7 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_
iconLabel->setPixmap(QPixmap::fromImage(thumb));
vh->addWidget(iconLabel);
if (audio_list.count() > 1) {
QComboBox *cb = new QComboBox(content);
KComboBox *cb = new KComboBox(content);
for (int k = 0; k < audio_list.count(); ++k) {
cb->addItem(i18n("Audio stream %1", audio_list.at(k)), audio_list.at(k));
}
......
......@@ -37,7 +37,7 @@
#include <QtConcurrentRun>
#include <QInputDialog>
#include <QComboBox>
#include <KComboBox>
#include <QVBoxLayout>
#include <QTimer>
#include <QPainter>
......
......@@ -5477,7 +5477,7 @@ void CustomTrackView::slotSaveClipMarkers(const QString &id)
QList < CommentedTime > markers = base->commentedSnapMarkers();
if (!markers.isEmpty()) {
// Set up categories
QComboBox *cbox = new QComboBox;
KComboBox *cbox = new KComboBox;
cbox->insertItem(0, i18n("All categories"));
for (int i = 0; i < 5; ++i) {
cbox->insertItem(i + 1, i18n("Category %1", i));
......@@ -5520,7 +5520,7 @@ void CustomTrackView::slotSaveClipMarkers(const QString &id)
void CustomTrackView::slotLoadClipMarkers(const QString &id)
{
QComboBox *cbox = new QComboBox;
KComboBox *cbox = new KComboBox;
for (int i = 0; i < 5; ++i) {
cbox->insertItem(i, i18n("Category %1", i));
cbox->setItemData(i, CommentedTime::markerColor(i), Qt::DecorationRole);
......
......@@ -21,7 +21,7 @@
#include "doc/kdenlivedoc.h"
#include <QTableWidget>
#include <QComboBox>
#include <KComboBox>
#include <KDebug>
#include <KIcon>
......@@ -32,7 +32,7 @@ TracksDelegate::TracksDelegate(QObject *parent) :
QWidget *TracksDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem & /* option */, const QModelIndex & /*index*/) const
{
QComboBox *comboBox = new QComboBox(parent);
KComboBox *comboBox = new KComboBox(parent);
comboBox->addItem(i18n("Video"));
comboBox->addItem(i18n("Audio"));
connect(comboBox, SIGNAL(activated(int)), this, SLOT(emitCommitData()));
......@@ -41,7 +41,7 @@ QWidget *TracksDelegate::createEditor(QWidget *parent, const QStyleOptionViewIte
void TracksDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
{
QComboBox *comboBox = qobject_cast<QComboBox *>(editor);
KComboBox *comboBox = qobject_cast<KComboBox *>(editor);
if (!comboBox)
return;
const int pos = comboBox->findText(index.model()->data(index).toString(), Qt::MatchExactly);
......@@ -50,7 +50,7 @@ void TracksDelegate::setEditorData(QWidget *editor, const QModelIndex &index) co
void TracksDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
QComboBox *comboBox = qobject_cast<QComboBox *>(editor);
KComboBox *comboBox = qobject_cast<KComboBox *>(editor);
if (!comboBox)
return;
model->setData(index, comboBox->currentText());
......
......@@ -22,7 +22,7 @@
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="before_select">
<widget class="KComboBox" name="before_select">
<item>
<property name="text">
<string>before</string>
......@@ -66,7 +66,7 @@
</spacer>
</item>
<item row="0" column="3">
<widget class="QComboBox" name="comboTracks"/>
<widget class="KComboBox" name="comboTracks"/>
</item>
<item row="3" column="1" colspan="4">
<widget class="QDialogButtonBox" name="buttonBox">
......
......@@ -12,7 +12,7 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="5">
<widget class="QComboBox" name="windowSize"/>
<widget class="KComboBox" name="windowSize"/>
</item>
<item row="1" column="3">
<spacer name="horizontalSpacer">
......@@ -41,7 +41,7 @@
</spacer>
</item>
<item row="1" column="4">
<widget class="QComboBox" name="windowFunction"/>
<widget class="KComboBox" name="windowFunction"/>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelFFTSize">
......
......@@ -915,7 +915,7 @@
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
......
......@@ -157,7 +157,7 @@
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
......
......@@ -77,7 +77,7 @@
</customwidget>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
......
......@@ -22,7 +22,7 @@
</widget>
</item>
<item row="0" column="1" colspan="3">
<widget class="QComboBox" name="cbColorspace">
<widget class="KComboBox" name="cbColorspace">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -42,7 +42,7 @@
</widget>
</item>
<item row="1" column="3">
<widget class="QComboBox" name="cbVariant"/>
<widget class="KComboBox" name="cbVariant"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblSliderName">
......
......@@ -764,7 +764,7 @@
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
......
......@@ -374,7 +374,7 @@
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
......
......@@ -270,7 +270,7 @@
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
......
......@@ -181,7 +181,7 @@
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
......
......@@ -97,7 +97,7 @@
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
......
......@@ -299,7 +299,7 @@
</customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<extends>KComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment