Commit 14f38ffb authored by Benjamin Meyer's avatar Benjamin Meyer

KEdit -> KTextEdit, fix depricated function called to cleanup warnings, fix broken connections

svn path=/trunk/KDE/kdemultimedia/juk/; revision=563202
parent 26e245e2
......@@ -50,7 +50,7 @@ using namespace ActionCollection;
// public members
////////////////////////////////////////////////////////////////////////////////
JuK::JuK(QWidget *parent, const char *name) :
JuK::JuK(QWidget *parent) :
KMainWindow(parent, Qt::WDestructiveClose),
m_player(PlayerManager::instance()),
m_shuttingDown(false)
......@@ -124,11 +124,11 @@ void JuK::setupActions()
KStdAction::quit(this, SLOT(slotQuit()), collection);
KStdAction::undo(this, SLOT(slotUndo()), collection);
KStdAction::cut(kapp, SLOT(cut()), collection);
KStdAction::copy(kapp, SLOT(copy()), collection);
KStdAction::paste(kapp, SLOT(paste()), collection);
KStdAction::clear(kapp, SLOT(clear()), collection);
KStdAction::selectAll(kapp, SLOT(selectAll()), collection);
KStdAction::cut(collection);
KStdAction::copy(collection);
KStdAction::paste(collection);
KAction *clear = KStdAction::clear(collection);
KStdAction::selectAll(collection);
KStdAction::keyBindings(this, SLOT(slotEditKeys()), collection);
......@@ -153,7 +153,7 @@ void JuK::setupActions()
actionMenu->addAction(act);
act = new KAction(KIcon("edit_remove"), i18n("Remove From Playlist"), collection, "removeFromPlaylist");
connect(act, SIGNAL(triggered(bool)), kapp, SLOT(clear()));
connect(act, SIGNAL(triggered(bool)), clear, SLOT(clear()));
act = new KAction(KIcon("player_play"), i18n("&Play"), collection, "play");
connect(act, SIGNAL(triggered(bool)), m_player, SLOT(play()));
......
......@@ -41,7 +41,7 @@ class JuK : public KMainWindow
Q_OBJECT
public:
JuK(QWidget* parent = 0, const char *name = 0);
JuK(QWidget* parent = 0);
virtual ~JuK();
virtual KActionCollection *actionCollection() const;
......
......@@ -45,7 +45,7 @@
class TrackPositionSlider : public QSlider
{
public:
TrackPositionSlider(QWidget *parent, const char *name) : QSlider(parent, name)
TrackPositionSlider(QWidget *parent) : QSlider(parent)
{
setFocusPolicy(Qt::NoFocus);
}
......@@ -69,8 +69,8 @@ protected:
// VolumeSlider implementation
////////////////////////////////////////////////////////////////////////////////
VolumeSlider::VolumeSlider(Qt::Orientation o, QWidget *parent, const char *name) :
QSlider(o, parent, name)
VolumeSlider::VolumeSlider(Qt::Orientation o, QWidget *parent) :
QSlider(o, parent)
{
connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
}
......@@ -95,7 +95,7 @@ int VolumeSlider::volume() const
if(orientation() == Qt::Horizontal)
return value();
else
return maxValue() - value();
return maximum() - value();
}
void VolumeSlider::setVolume(int value)
......@@ -103,7 +103,7 @@ void VolumeSlider::setVolume(int value)
if(orientation() == Qt::Horizontal)
setValue(value);
else
setValue(maxValue() - value);
setValue(maximum() - value);
}
void VolumeSlider::setOrientation(Qt::Orientation o)
......@@ -112,7 +112,7 @@ void VolumeSlider::setOrientation(Qt::Orientation o)
return;
blockSignals(true);
setValue(maxValue() - value());
setValue(maximum() - value());
blockSignals(false);
QSlider::setOrientation(o);
}
......@@ -122,7 +122,7 @@ void VolumeSlider::slotValueChanged(int value)
if(orientation() == Qt::Horizontal)
emit signalVolumeChanged(value);
else
emit signalVolumeChanged(maxValue() - value);
emit signalVolumeChanged(maximum() - value);
}
////////////////////////////////////////////////////////////////////////////////
......@@ -219,9 +219,10 @@ QWidget *SliderAction::createToolBarWidget( QToolBar * parent )
trackPositionLabel->setToolTip( i18n("Track position"));
m_layout->addWidget(trackPositionLabel);
m_trackPositionSlider = new TrackPositionSlider(base, "trackPositionSlider");
m_trackPositionSlider = new TrackPositionSlider(base);
m_trackPositionSlider->setObjectName("trackPositionSlider");
m_trackPositionSlider->setOrientation(orientation);
m_trackPositionSlider->setMaxValue(maxPosition);
m_trackPositionSlider->setMaximum(maxPosition);
m_trackPositionSlider->setToolTip( i18n("Track position"));
m_layout->addWidget(m_trackPositionSlider);
connect(m_trackPositionSlider, SIGNAL(sliderPressed()), this, SLOT(slotSliderPressed()));
......@@ -235,8 +236,9 @@ QWidget *SliderAction::createToolBarWidget( QToolBar * parent )
volumeLabel->setToolTip( i18n("Volume"));
m_layout->addWidget(volumeLabel);
m_volumeSlider = new VolumeSlider(orientation, base, "volumeSlider");
m_volumeSlider->setMaxValue(100);
m_volumeSlider = new VolumeSlider(orientation, base);
m_volumeSlider->setObjectName("volumeSlider");
m_volumeSlider->setMaximum(100);
m_volumeSlider->setToolTip( i18n("Volume"));
m_layout->addWidget(m_volumeSlider);
connect(m_volumeSlider, SIGNAL(signalVolumeChanged(int)), SIGNAL(signalVolumeChanged(int)));
......@@ -313,8 +315,9 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
trackPositionLabel->setToolTip( i18n("Track position"));
m_layout->addWidget(trackPositionLabel);
m_trackPositionSlider = new TrackPositionSlider(base, "trackPositionSlider");
m_trackPositionSlider->setMaxValue(maxPosition);
m_trackPositionSlider = new TrackPositionSlider(base);
m_trackPositionSlider->setObjectName("trackPositionSlider");
m_trackPositionSlider->setMaximum(maxPosition);
m_trackPositionSlider->setToolTip( i18n("Track position"));
m_layout->addWidget(m_trackPositionSlider);
connect(m_trackPositionSlider, SIGNAL(sliderPressed()), this, SLOT(slotSliderPressed()));
......@@ -328,8 +331,9 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
volumeLabel->setToolTip( i18n("Volume"));
m_layout->addWidget(volumeLabel);
m_volumeSlider = new VolumeSlider(orientation, base, "volumeSlider");
m_volumeSlider->setMaxValue(100);
m_volumeSlider = new VolumeSlider(orientation, base);
m_volumeSlider->setObjectName("volumeSlider");
m_volumeSlider->setMaximum(100);
m_volumeSlider->setToolTip( i18n("Volume"));
m_layout->addWidget(m_volumeSlider);
connect(m_volumeSlider, SIGNAL(signalVolumeChanged(int)), SIGNAL(signalVolumeChanged(int)));
......
......@@ -31,7 +31,7 @@ class VolumeSlider : public QSlider
Q_OBJECT
public:
VolumeSlider(Qt::Orientation o, QWidget *parent, const char *name);
VolumeSlider(Qt::Orientation o, QWidget *parent);
int volume() const;
void setVolume(int value);
......
......@@ -23,7 +23,7 @@
#include <kcombobox.h>
#include <klineedit.h>
#include <knuminput.h>
#include <keditcl.h>
#include <ktextedit.h>
#include <kmessagebox.h>
#include <kconfig.h>
#include <klocale.h>
......@@ -266,7 +266,7 @@ void TagEditor::slotRefresh()
m_trackSpin->setValue(tag->track());
m_yearSpin->setValue(tag->year());
m_commentBox->setText(tag->comment());
m_commentBox->setPlainText(tag->comment());
// Start at the second item, since we've already processed the first.
......@@ -344,7 +344,7 @@ void TagEditor::slotRefresh()
m_yearSpin->setValue(0);
m_enableBoxes[m_yearSpin]->setChecked(false);
}
if(m_commentBox->text() != tag->comment() &&
if(m_commentBox->toPlainText() != tag->comment() &&
m_enableBoxes.contains(m_commentBox))
{
m_commentBox->clear();
......@@ -621,9 +621,8 @@ void TagEditor::setupLayout()
trackRowLayout->setWidth();
}
m_commentBox = new KEdit(this);
m_commentBox = new KTextEdit(this);
m_commentBox->setObjectName( "commentBox" );
m_commentBox->setTextFormat(Qt::PlainText);
addItem(i18n("&Comment:"), m_commentBox, rightColumnLayout, "edit");
fileNameLabel->setMinimumHeight(m_trackSpin->height());
......@@ -717,7 +716,7 @@ void TagEditor::save(const PlaylistItemList &list)
tag->setYear(m_yearSpin->value());
}
if(m_enableBoxes[m_commentBox]->isOn())
tag->setComment(m_commentBox->text());
tag->setComment(m_commentBox->toPlainText());
if(m_enableBoxes[m_genreBox]->isOn())
tag->setGenre(m_genreBox->currentText());
......
......@@ -26,7 +26,7 @@
class KComboBox;
class KLineEdit;
class KIntSpinBox;
class KEdit;
class KTextEdit;
class KPushButton;
class KConfigBase;
......@@ -104,7 +104,7 @@ private:
KIntSpinBox *m_yearSpin;
KLineEdit *m_lengthBox;
KLineEdit *m_bitrateBox;
KEdit *m_commentBox;
KTextEdit *m_commentBox;
Q3ValueList<QWidget *> m_hideList;
......
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