Commit 289dc398 authored by Scott Wheeler's avatar Scott Wheeler

...a few more classes semi-ported.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=513977
parent f5f72f01
......@@ -185,7 +185,7 @@ void JuK::setupActions()
this, SLOT(slotToggleSystemTray(bool)));
m_outputSelectAction = PlayerManager::playerSelectAction(ActionCollection::actions());
m_outputSelectAction = PlayerManager::playerSelectAction();
if(m_outputSelectAction)
m_outputSelectAction->setCurrentItem(0);
......
......@@ -80,10 +80,8 @@ KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection,
{
// Read key group from configuration
int selectedButton;
KConfigGroup config(KGlobal::config(), "Shortcuts");
selectedButton = config.readEntry("GlobalKeys", StandardKeys);
int selectedButton = config.readEntry("GlobalKeys", int(StandardKeys));
// Create widgets for key chooser - widget stack used to replace key chooser
......@@ -95,13 +93,15 @@ KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection,
// Create buttons to select key group
m_group = new Q3HButtonGroup(i18n("Global Shortcuts"), vbox);
new QRadioButton(i18n("&No keys"), m_group);
new QRadioButton(i18n("&Standard keys"), m_group);
new QRadioButton(i18n("&Multimedia keys"), m_group);
#warning Another place that probably needs some post-mortem analysis.
m_group = new QButtonGroup(/* i18n("Global Shortcuts"), */ vbox);
new QRadioButton(i18n("&No keys"), /* m_group */ vbox);
new QRadioButton(i18n("&Standard keys"), /* m_group */ vbox);
new QRadioButton(i18n("&Multimedia keys"), /* m_group */ vbox);
connect(m_group, SIGNAL(clicked(int)), this, SLOT(slotKeys(int)));
m_group->setWhatsThis(
i18n("Here you can select the keys used as global shortcuts to control the player"));
/*m_group*/ vbox->setWhatsThis(
i18n("Here you can select the keys used as global shortcuts to control the player"));
// Create the key chooser
......@@ -125,7 +125,9 @@ void KeyDialog::newDialog(KGlobalAccel *keys, KActionCollection *actionCollectio
m_pKeyChooser->insert(actionCollection);
m_widgetStack->addWidget(m_pKeyChooser);
m_widgetStack->raiseWidget(m_pKeyChooser);
m_group->setButton(selectedButton);
#warning More broken code
/* m_group->setButton(selectedButton); */
connect(this, SIGNAL(defaultClicked()), this, SLOT(slotDefault()));
}
......@@ -138,7 +140,8 @@ int KeyDialog::configure()
if(retcode == Accepted) {
KConfigGroup config(KGlobal::config(), "Shortcuts");
config.writeEntry("GlobalKeys", m_group->id(m_group->selected()));
#warning All of the stuff related to the group selection needs to be rewritten
/* config.writeEntry("GlobalKeys", m_group->id(m_group->selected())); */
KGlobal::config()->sync();
m_pKeyChooser->save();
......@@ -148,7 +151,8 @@ int KeyDialog::configure()
void KeyDialog::slotKeys(int group)
{
bool fourModKeys = KGlobalAccel::useFourModifierKeys();
#warning bleh
bool fourModKeys = /* KGlobalAccel::useFourModifierKeys()*/ true;
// Set modifier keys according to key group and modifier keys
......@@ -167,7 +171,8 @@ void KeyDialog::slotDefault()
{
// Select default keys - standard key group
m_group->setButton(StandardKeys);
#warning More of the same
/* m_group->setButton(StandardKeys); */
m_pKeyChooser->allDefault();
}
......@@ -198,7 +203,7 @@ void KeyDialog::insert(KGlobalAccel *keys, const QString &action, const QString
break;
}
}
keys->insert(action, label, QString::null, def3, def4, objSlot, methodSlot);
keys->insert(action, label, QString::null, def3, objSlot, methodSlot);
}
#include "keydialog.moc"
......
......@@ -19,6 +19,8 @@
#include <dcopclient.h>
#include <kconfigbase.h>
#include <kconfig.h>
#include <klocale.h>
#include <kglobal.h>
#include "juk.h"
......
......@@ -47,7 +47,7 @@ namespace MediaFiles {
QStringList MediaFiles::openDialog(QWidget *parent)
{
KFileDialog dialog(QString::null, QString::null, parent, "filedialog", true);
KFileDialog dialog(QString::null, QString::null, parent);
dialog.setOperationMode(KFileDialog::Opening);
dialog.setCaption(i18n("Open"));
......
......@@ -26,7 +26,7 @@
#include <qimage.h>
#include <qtimer.h>
#include <qpoint.h>
//Added by qt3to4:
#include <Q3Frame>
#include <QDropEvent>
#include <QLabel>
......@@ -132,8 +132,9 @@ void CoverItem::update(const FileHandle &file)
if(file.coverInfo()->hasCover()) {
show();
QImage image = file.coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage();
setPixmap(image.smoothScale(imageSize, imageSize, QImage::ScaleMin));
setPixmap(
file.coverInfo()->pixmap(CoverInfo::Thumbnail)
.scaled(imageSize, imageSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
else
hide();
......@@ -148,7 +149,7 @@ void CoverItem::mouseReleaseEvent(QMouseEvent *event)
if(event->x() >= 0 && event->y() >= 0 &&
event->x() < width() && event->y() < height() &&
event->button() == LeftButton &&
event->button() == Qt::LeftButton &&
m_file.coverInfo()->hasCover())
{
m_file.coverInfo()->popup();
......@@ -182,7 +183,7 @@ void CoverItem::mouseMoveEvent(QMouseEvent *e)
void CoverItem::dragEnterEvent(QDragEnterEvent *e)
{
e->accept(Q3ImageDrag::canDecode(e) || KUrlDrag::canDecode(e) || CoverDrag::canDecode(e));
e->accept(Q3ImageDrag::canDecode(e) || K3URLDrag::canDecode(e) || CoverDrag::canDecode(e));
}
void CoverItem::dropEvent(QDropEvent *e)
......@@ -202,7 +203,7 @@ void CoverItem::dropEvent(QDropEvent *e)
m_file.coverInfo()->setCoverId(key);
update(m_file);
}
else if(KUrlDrag::decode(e, urls)) {
else if(K3URLDrag::decode(e, urls)) {
QString fileName;
if(KIO::NetAccess::download(urls.front(), fileName, this)) {
......@@ -234,7 +235,9 @@ TrackItem::TrackItem(NowPlaying *parent) :
QVBoxLayout *layout = new QVBoxLayout(this);
m_label = new LinkLabel(this);
m_label->setLinkUnderline(false);
#warning We should potentially check on URL underlining.
/* m_label->setLinkUnderline(false); */
layout->addStretch();
layout->addWidget(m_label);
......@@ -298,12 +301,12 @@ void TrackItem::slotUpdate()
////////////////////////////////////////////////////////////////////////////////
HistoryItem::HistoryItem(NowPlaying *parent) :
LinkLabel(parent, "HistoryItem"),
LinkLabel(parent),
NowPlayingItem(parent)
{
setFixedHeight(parent->height() - parent->layout()->margin() * 2);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
setLinkUnderline(false);
/* setLinkUnderline(false); */
setText(QString("<b>%1</b>").arg(i18n("History")));
m_timer = new QTimer(this);
......
......@@ -119,7 +119,7 @@ private:
class LinkLabel : public KActiveLabel
{
public:
LinkLabel(QWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {}
LinkLabel(QWidget *parent) : KActiveLabel(parent) {}
virtual void openLink(const QString &) {}
};
......
......@@ -241,10 +241,10 @@ void PlayerManager::setStatusLabel(StatusLabel *label)
m_statusLabel = label;
}
KSelectAction *PlayerManager::playerSelectAction(QObject *parent) // static
KSelectAction *PlayerManager::playerSelectAction() // static
{
KSelectAction *action = 0;
action = new KSelectAction(i18n("&Output To"), 0, parent, "outputSelect");
KSelectAction *action =
new KSelectAction(i18n("&Output To"), 0, ActionCollection::actions(), "outputSelect");
QStringList l;
#if HAVE_ARTS
......@@ -642,7 +642,7 @@ void PlayerManager::setup()
// Call this method manually to avoid warnings.
KAction *outputAction = actions()->action("outputSelect");
KAction *outputAction = ActionCollection::actions()->action("outputSelect");
if(outputAction) {
setOutput(static_cast<KSelectAction *>(outputAction)->currentText());
......
......@@ -63,7 +63,7 @@ public:
QString randomPlayMode() const;
static KSelectAction *playerSelectAction(QObject *parent);
static KSelectAction *playerSelectAction();
public slots:
......
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