From 97c98d9d52c60bce1e70eb55dd807a21cbe32f04 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 3 Nov 2009 21:34:57 +0000 Subject: added double size mode git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1353 90c681e8-e032-0410-971d-27865f9a5e38 --- src/ui/balancebar.cpp | 23 +-- src/ui/balancebar.h | 5 +- src/ui/configdialog.cpp | 4 +- src/ui/display.cpp | 178 +++++++++-------- src/ui/display.h | 38 ++-- src/ui/dock.cpp | 16 +- src/ui/dock.h | 12 +- src/ui/eqslider.cpp | 20 +- src/ui/eqslider.h | 9 +- src/ui/eqtitlebar.cpp | 57 +++--- src/ui/eqtitlebar.h | 13 +- src/ui/eqwidget.cpp | 59 ++++-- src/ui/eqwidget.h | 4 + src/ui/forms/configdialog.ui | 7 + src/ui/listwidget.cpp | 10 +- src/ui/mainvisual.cpp | 43 ++-- src/ui/mainvisual.h | 5 +- src/ui/mainwindow.cpp | 62 ++---- src/ui/mainwindow.h | 3 +- src/ui/monostereo.cpp | 35 ++-- src/ui/monostereo.h | 8 +- src/ui/pixmapwidget.cpp | 2 +- src/ui/playlist.cpp | 115 ++++++----- src/ui/playlist.h | 3 +- src/ui/playlistslider.cpp | 18 +- src/ui/playlistslider.h | 2 +- src/ui/playlisttitlebar.cpp | 124 ++++++------ src/ui/playlisttitlebar.h | 7 +- src/ui/positionbar.cpp | 18 +- src/ui/skin.cpp | 41 ++++ src/ui/skin.h | 8 +- src/ui/timeindicator.cpp | 35 ++-- src/ui/titlebar.cpp | 77 +++---- src/ui/titlebar.h | 12 +- src/ui/translations/qmmp_cs.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_de.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_it.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_lt.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_pl_PL.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_pt_BR.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_ru.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_tr.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_uk_UA.ts | 392 ++++++++++++++++++++---------------- src/ui/translations/qmmp_zh_CN.ts | 409 +++++++++++++++++++------------------- src/ui/translations/qmmp_zh_TW.ts | 409 +++++++++++++++++++------------------- src/ui/volumebar.cpp | 24 +-- src/ui/volumebar.h | 21 +- 47 files changed, 2887 insertions(+), 2713 deletions(-) (limited to 'src') diff --git a/src/ui/balancebar.cpp b/src/ui/balancebar.cpp index 184db3061..508cf9f19 100644 --- a/src/ui/balancebar.cpp +++ b/src/ui/balancebar.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -21,14 +21,11 @@ #include #include #include - #include "skin.h" #include "button.h" #include "mainwindow.h" - #include "balancebar.h" - BalanceBar::BalanceBar(QWidget *parent) : PixmapWidget(parent) { @@ -48,17 +45,16 @@ BalanceBar::~BalanceBar() void BalanceBar::mousePressEvent(QMouseEvent *e) { - m_moving = TRUE; press_pos = e->x(); - if(m_posx() && e->x()x() && e->x()ratio()) { press_pos = e->x()-m_pos; } else { - m_value = convert(qMax(qMin(width()-18,e->x()-6),0)); - press_pos = 6; + m_value = convert(qMax(qMin(width()-18*m_skin->ratio(),e->x()-6*m_skin->ratio()),0)); + press_pos = 6*m_skin->ratio(); if (m_value!=m_old) { emit sliderMoved(m_value); @@ -75,7 +71,7 @@ void BalanceBar::mouseMoveEvent (QMouseEvent *e) int po = e->x(); po = po - press_pos; - if(0<=po && po<=width()-13) + if(0 <= po && po <= width()-13*m_skin->ratio()) { m_value = convert(po); draw(); @@ -107,6 +103,7 @@ void BalanceBar::setMax(int max) void BalanceBar::updateSkin() { + resize(m_skin->getBalanceBar(0).size()); draw(FALSE); } @@ -114,19 +111,19 @@ void BalanceBar::draw(bool pressed) { if(abs(m_value)<6) m_value = 0; - int p=int(ceil(double(m_value-m_min)*(width()-13)/(m_max-m_min))); + int p=int(ceil(double(m_value-m_min)*(width()-13*m_skin->ratio())/(m_max-m_min))); m_pixmap = m_skin->getBalanceBar(abs(27*m_value/m_max)); QPainter paint(&m_pixmap); if(pressed) - paint.drawPixmap(p,1,m_skin->getButton(Skin::BT_BAL_P)); + paint.drawPixmap(p,m_skin->ratio(),m_skin->getButton(Skin::BT_BAL_P)); else - paint.drawPixmap(p,1,m_skin->getButton(Skin::BT_BAL_N)); + paint.drawPixmap(p,m_skin->ratio(),m_skin->getButton(Skin::BT_BAL_N)); setPixmap(m_pixmap); m_pos = p; } int BalanceBar::convert(int p) { - return int(ceil(double(m_max-m_min)*(p)/(width()-13)+m_min)); + return int(ceil(double(m_max-m_min)*(p)/(width()-13*m_skin->ratio())+m_min)); } diff --git a/src/ui/balancebar.h b/src/ui/balancebar.h index 70fab2968..508603bc1 100644 --- a/src/ui/balancebar.h +++ b/src/ui/balancebar.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -35,7 +35,7 @@ public: ~BalanceBar(); - int value() {return m_value; }; + int value() {return m_value; } public slots: void setValue(int); @@ -60,7 +60,6 @@ protected: void mousePressEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); void mouseMoveEvent(QMouseEvent*); - }; #endif diff --git a/src/ui/configdialog.cpp b/src/ui/configdialog.cpp index 7033a5be5..f68f53791 100644 --- a/src/ui/configdialog.cpp +++ b/src/ui/configdialog.cpp @@ -139,6 +139,7 @@ void ConfigDialog::readSettings() ui.openboxCheckBox->setChecked(settings.value("General/openbox_compat", FALSE).toBool()); //skin options ui.skinCursorsCheckBox->setChecked(settings.value("General/skin_cursors", FALSE).toBool()); + ui.doubleSizeCheckBox->setChecked(settings.value("General/double_size", FALSE).toBool()); } void ConfigDialog::changePage (QListWidgetItem *current, QListWidgetItem *previous) @@ -416,7 +417,7 @@ void ConfigDialog::loadFonts() { QSettings settings (Qmmp::configFile(), QSettings::IniFormat); QString fontname = settings.value ("PlayList/Font").toString(); - QFont font; + QFont font = QApplication::font(); if(!fontname.isEmpty()) font.fromString(fontname); ui.plFontLabel->setText (font.family () + " " + QString::number(font.pointSize ())); @@ -630,6 +631,7 @@ void ConfigDialog::saveSettings() settings.setValue ("General/openbox_compat", ui.openboxCheckBox->isChecked()); settings.setValue ("MainWindow/bitmap_font", ui.useBitmapCheckBox->isChecked()); settings.setValue ("General/skin_cursors", ui.skinCursorsCheckBox->isChecked()); + settings.setValue ("General/double_size", ui.doubleSizeCheckBox->isChecked()); } void ConfigDialog::updateButtons() diff --git a/src/ui/display.cpp b/src/ui/display.cpp index 2f424e4c8..58cb78e7c 100644 --- a/src/ui/display.cpp +++ b/src/ui/display.cpp @@ -17,14 +17,10 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include -#include -#include -#include + +#include #include #include - -#include #include #include #include @@ -43,115 +39,72 @@ #include "balancebar.h" #include "mainwindow.h" #include "timeindicator.h" - #include "display.h" MainDisplay::MainDisplay (QWidget *parent) : PixmapWidget (parent) { + m_shaded = FALSE; m_skin = Skin::instance(); setPixmap (m_skin->getMain()); setCursor(m_skin->getCursor(Skin::CUR_NORMAL)); - setMaximumSize (QSize (275,116)); - setMinimumSize (QSize (275,116)); - m_mw = qobject_cast(parent); - - Button *previous = new Button (this, Skin::BT_PREVIOUS_N, Skin::BT_PREVIOUS_P, Skin::CUR_NORMAL); - previous->move (16, 88); - previous->setToolTip(tr("Previous")); - connect (previous,SIGNAL (clicked()), parent, SLOT (previous())); - Button *play = new Button (this, Skin::BT_PLAY_N, Skin::BT_PLAY_P, Skin::CUR_NORMAL); - play->move (39, 88); - play->setToolTip(tr("Play")); - connect (play,SIGNAL (clicked()),parent,SLOT (play())); - Button *pause = new Button (this, Skin::BT_PAUSE_N,Skin::BT_PAUSE_P, Skin::CUR_NORMAL); - pause->move (62, 88); - pause->setToolTip(tr("Pause")); - connect (pause,SIGNAL (clicked()),parent,SLOT (pause())); - Button *stop = new Button (this, Skin::BT_STOP_N,Skin::BT_STOP_P, Skin::CUR_NORMAL); - stop->move (85, 88); - stop->setToolTip(tr("Stop")); - connect (stop,SIGNAL (clicked()),parent,SLOT (stop())); - Button *next = new Button (this, Skin::BT_NEXT_N,Skin::BT_NEXT_P, Skin::CUR_NORMAL); - next->move (108, 88); - next->setToolTip(tr("Next")); - connect (next,SIGNAL (clicked()),parent,SLOT (next())); - Button *eject = new Button (this, Skin::BT_EJECT_N,Skin::BT_EJECT_P, Skin::CUR_NORMAL); - eject->move (136, 89); - eject->setToolTip(tr("Add file")); - connect (eject,SIGNAL (clicked()),parent,SLOT (addFile())); + m_titlebar = new TitleBar(this); + m_titlebar->move(0,0); + m_titlebar->setActive(TRUE); + m_previous = new Button (this, Skin::BT_PREVIOUS_N, Skin::BT_PREVIOUS_P, Skin::CUR_NORMAL); + m_previous->setToolTip(tr("Previous")); + connect (m_previous, SIGNAL (clicked()), parent, SLOT (previous())); + + m_play = new Button (this, Skin::BT_PLAY_N, Skin::BT_PLAY_P, Skin::CUR_NORMAL); + m_play->setToolTip(tr("Play")); + connect (m_play, SIGNAL (clicked()),parent,SLOT (play())); + m_pause = new Button (this, Skin::BT_PAUSE_N,Skin::BT_PAUSE_P, Skin::CUR_NORMAL); + m_pause->setToolTip(tr("Pause")); + connect (m_pause,SIGNAL (clicked()),parent,SLOT (pause())); + m_stop = new Button (this, Skin::BT_STOP_N,Skin::BT_STOP_P, Skin::CUR_NORMAL); + m_stop->setToolTip(tr("Stop")); + connect (m_stop,SIGNAL (clicked()),parent,SLOT (stop())); + m_next = new Button (this, Skin::BT_NEXT_N,Skin::BT_NEXT_P, Skin::CUR_NORMAL); + m_next->setToolTip(tr("Next")); + connect (m_next,SIGNAL (clicked()),parent,SLOT (next())); + m_eject = new Button (this, Skin::BT_EJECT_N,Skin::BT_EJECT_P, Skin::CUR_NORMAL); + m_eject->setToolTip(tr("Add file")); + connect (m_eject,SIGNAL (clicked()),parent,SLOT (addFile())); connect (m_skin, SIGNAL (skinChanged()), this, SLOT (updateSkin())); - posbar = new PositionBar (this); - posbar->move (16,72); - - //connect(posbar, SIGNAL(sliderMoved(int)), SLOT(setTime(int))); - MainVisual* vis = new MainVisual (this); - vis->move(24,39); - vis->show(); + m_posbar = new PositionBar (this); + m_vis = new MainVisual (this); m_eqButton = new ToggleButton (this,Skin::BT_EQ_ON_N,Skin::BT_EQ_ON_P, Skin::BT_EQ_OFF_N,Skin::BT_EQ_OFF_P); - m_eqButton->move (219,58); - m_eqButton->show(); m_eqButton->setToolTip(tr("Equalizer")); m_plButton = new ToggleButton (this,Skin::BT_PL_ON_N,Skin::BT_PL_ON_P, Skin::BT_PL_OFF_N,Skin::BT_PL_OFF_P); - m_plButton->move (241,58); - m_plButton->show(); m_plButton->setToolTip(tr("Playlist")); m_repeatButton = new ToggleButton (this,Skin::REPEAT_ON_N,Skin::REPEAT_ON_P, Skin::REPEAT_OFF_N,Skin::REPEAT_OFF_P); connect(m_repeatButton,SIGNAL(clicked(bool)),this,SIGNAL(repeatableToggled(bool))); - - m_repeatButton->move (210,89); - m_repeatButton->show(); m_repeatButton->setToolTip(tr("Repeat playlist")); - m_shuffleButton = new ToggleButton (this,Skin::SHUFFLE_ON_N,Skin::SHUFFLE_ON_P, Skin::SHUFFLE_OFF_N,Skin::SHUFFLE_OFF_P); m_shuffleButton->setToolTip(tr("Shuffle")); connect(m_shuffleButton,SIGNAL(clicked(bool)),this,SIGNAL(shuffleToggled(bool))); - m_shuffleButton->move (164,89); - m_shuffleButton->show(); - m_kbps = new SymbolDisplay(this,3); - m_kbps -> move (111,43); - m_kbps -> show(); - m_freq = new SymbolDisplay(this,2); - m_freq -> move (156,43); - m_freq -> show(); - - TextScroller *m_text = new TextScroller (this); - m_text->resize (154,15); - m_text->move (109,23); - m_text->show(); - + m_text = new TextScroller (this); m_monoster = new MonoStereo (this); - m_monoster->move (212,41); - m_monoster->show(); - m_playstatus = new PlayStatus(this); - m_playstatus->move(24,28); - m_playstatus->show(); m_volumeBar = new VolumeBar(this); connect(m_volumeBar, SIGNAL(sliderMoved(int)),SLOT(updateVolume())); - m_volumeBar->move(107,57); - m_volumeBar->show(); m_volumeBar->setToolTip(tr("Volume")); m_balanceBar = new BalanceBar(this); connect(m_balanceBar, SIGNAL(sliderMoved(int)),SLOT(updateVolume())); - m_balanceBar->move(177,57); - m_balanceBar->show(); m_balanceBar->setToolTip(tr("Balance")); m_timeIndicator = new TimeIndicator(this); - m_timeIndicator->move(34,26); - m_timeIndicator->show(); m_core = SoundCore::instance(); connect(m_core, SIGNAL(elapsedChanged(qint64)), SLOT(setTime(qint64))); @@ -160,9 +113,12 @@ MainDisplay::MainDisplay (QWidget *parent) connect(m_core, SIGNAL(channelsChanged(int)), m_monoster, SLOT(setChannels(int))); connect(m_core, SIGNAL(stateChanged(Qmmp::State)), SLOT(setState(Qmmp::State))); connect(m_core, SIGNAL(volumeChanged(int,int)), SLOT(setVolume(int, int))); + connect(m_core, SIGNAL(elapsedChanged(qint64)),m_titlebar, SLOT(setTime(qint64))); PlayListModel *model = MediaPlayer::instance()->playListModel(); connect(model, SIGNAL(repeatableListChanged(bool)), m_repeatButton, SLOT(setON(bool))); connect(model, SIGNAL(shuffleChanged(bool)), m_shuffleButton, SLOT(setON(bool))); + updatePositions(); + updateMask(); } @@ -173,14 +129,40 @@ MainDisplay::~MainDisplay() settings.setValue ("Equalizer/visible",m_eqButton->isChecked()); } +void MainDisplay::updatePositions() +{ + int r = m_skin->ratio(); + m_previous->move (r*16, r*88); + m_play->move (r*39, r*88); + m_pause->move (r*62, r*88); + m_vis->move(r*24, r*43); + m_stop->move (r*85, r*88); + m_next->move (r*108, r*88); + m_eject->move (r*136, r*89); + m_posbar->move (r*16, r*72); + m_eqButton->move (r*219, r*58); + m_plButton->move (r*241, r*58); + m_repeatButton->move (r*210, r*89); + m_shuffleButton->move (r*164, r*89); + m_kbps->move (r*111, r*43); + m_freq->move (r*156, r*43); + m_text->resize (r*154, r*15); + m_text->move (r*109, r*23); + m_monoster->move (r*212, r*41); + m_playstatus->move(r*24, r*28); + m_volumeBar->move(r*107, r*57); + m_balanceBar->move(r*177, r*57); + m_timeIndicator->move(r*34, r*26); +} + void MainDisplay::setTime (qint64 t) { - posbar->setValue (t); + m_posbar->setValue (t); m_timeIndicator->setTime(t/1000); } void MainDisplay::setDuration(qint64 t) { - posbar->setMax (t); + m_posbar->setMax (t); m_timeIndicator->setSongDuration(t/1000); } @@ -189,26 +171,20 @@ void MainDisplay::setState(Qmmp::State state) switch ((int) state) { case Qmmp::Playing: - { m_playstatus->setStatus(PlayStatus::PLAY); m_timeIndicator->setNeedToShowTime(TRUE); setDuration(m_core->totalTime()); break; - } case Qmmp::Paused: - { m_playstatus->setStatus(PlayStatus::PAUSE); break; - } case Qmmp::Stopped: - { m_playstatus->setStatus(PlayStatus::STOP); m_monoster->setChannels (0); m_timeIndicator->setNeedToShowTime(FALSE); - posbar->setValue (0); - posbar->setMax (0); - break; - } + m_posbar->setValue (0); + m_posbar->setMax (0); + m_titlebar->setTime(-1); } } @@ -223,7 +199,36 @@ void MainDisplay::setVolume(int left, int right) void MainDisplay::updateSkin() { setPixmap (m_skin->getMain()); + m_mw->resize(size()); setCursor(m_skin->getCursor(Skin::CUR_NORMAL)); + setMinimalMode(m_shaded); + updatePositions(); +} + +void MainDisplay::updateMask() +{ + m_mw->clearMask(); + m_mw->setMask(QRegion(0,0,m_mw->width(),m_mw->height())); + QRegion region = m_skin->getRegion(m_shaded? Skin::WINDOW_SHADE : Skin::NORMAL); + if (!region.isEmpty()) + m_mw->setMask(region); +} + +void MainDisplay::setMinimalMode(bool b) +{ + m_shaded = b; + int r = m_skin->ratio(); + + if(m_shaded) + m_mw->resize(r*275,r*14); + else + m_mw->resize(r*275,r*116); + updateMask(); +} + +void MainDisplay::setActive(bool b) +{ + m_titlebar->setActive(b); } void MainDisplay::setSampleRate(quint32 rate) @@ -295,3 +300,4 @@ void MainDisplay::mousePressEvent(QMouseEvent *e) } PixmapWidget::mousePressEvent(e); } + diff --git a/src/ui/display.h b/src/ui/display.h index ea2c6e53f..c776d01db 100644 --- a/src/ui/display.h +++ b/src/ui/display.h @@ -21,23 +21,14 @@ #define DISPLAY_H #include - #include #include "pixmapwidget.h" -/** - @author Ilya Kotov -*/ -class QPushButton; -class QLabel; - class TimeIndicator; -class TitleBar; class PositionBar; -class Number; class Skin; class ToggleButton; -class OutputState; +class TitleBar; class NumberDisplay; class SymbolDisplay; class MonoStereo; @@ -46,7 +37,14 @@ class VolumeBar; class BalanceBar; class MainWindow; class SoundCore; +class Button; +class TextScroller; +class MainVisual; +class TitleBar; +/** + @author Ilya Kotov +*/ class MainDisplay : public PixmapWidget { Q_OBJECT @@ -63,6 +61,8 @@ public: bool isShuffle()const; void setIsRepeatable(bool); void setIsShuffle(bool); + void setMinimalMode(bool b = TRUE); + void setActive(bool b); public slots: void setDuration(qint64); @@ -84,14 +84,20 @@ private slots: void setVolume(int left, int right); private: + void updatePositions(); + void updateMask(); QWidget* m_equlizer; QWidget* m_playlist; - QPixmap pixmap; - QPushButton *button; - QLabel *label; + bool m_shaded; Skin *m_skin; - TitleBar *titleBar; - PositionBar *posbar; + PositionBar *m_posbar; + Button *m_previous; + Button *m_play; + Button *m_pause; + Button *m_stop; + Button *m_next; + Button *m_eject; + TextScroller *m_text; ToggleButton *m_eqButton; ToggleButton *m_plButton; ToggleButton *m_shuffleButton; @@ -103,7 +109,9 @@ private: VolumeBar* m_volumeBar; BalanceBar* m_balanceBar; MainWindow* m_mw; + MainVisual* m_vis; TimeIndicator* m_timeIndicator; + TitleBar *m_titlebar; SoundCore *m_core; }; diff --git a/src/ui/dock.cpp b/src/ui/dock.cpp index e07fd10f7..c41173710 100644 --- a/src/ui/dock.cpp +++ b/src/ui/dock.cpp @@ -25,24 +25,26 @@ #include "dock.h" -Dock *Dock::pointer = 0; +Dock *Dock::m_instance = 0; -Dock *Dock::getPointer() +Dock *Dock::instance() { - if (!pointer) - pointer = new Dock(); - return pointer; + if (!m_instance) + m_instance = new Dock(); + return m_instance; } Dock::Dock (QObject *parent) : QObject (parent) { - pointer = this; + m_instance = this; m_mainWidget = 0; } Dock::~Dock() -{} +{ + m_instance = 0; +} void Dock::setMainWidget (QWidget *widget) { diff --git a/src/ui/dock.h b/src/ui/dock.h index b4b62dda2..e843ed142 100644 --- a/src/ui/dock.h +++ b/src/ui/dock.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,12 +24,10 @@ #include #include +class QAction; /** - @author Ilya Kotov + @author Ilya Kotov */ - -class QAction; - class Dock : public QObject { Q_OBJECT @@ -38,7 +36,7 @@ public: ~Dock(); - static Dock *getPointer(); + static Dock *instance(); void setMainWidget(QWidget*); void addWidget(QWidget *); void move(QWidget*, QPoint); @@ -51,7 +49,7 @@ public: private: bool isDocked(QWidget*, QWidget*); bool isUnder(QWidget*, QWidget*, int); - static Dock *pointer; + static Dock *m_instance; QWidget *m_mainWidget; QList m_widgetList; QList m_dockedList; diff --git a/src/ui/eqslider.cpp b/src/ui/eqslider.cpp index 6add1f281..4c3ef0a05 100644 --- a/src/ui/eqslider.cpp +++ b/src/ui/eqslider.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -27,8 +27,7 @@ #include "eqslider.h" -EqSlider::EqSlider(QWidget *parent) - : PixmapWidget(parent) +EqSlider::EqSlider(QWidget *parent): PixmapWidget(parent) { m_skin = Skin::instance(); connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin())); @@ -41,7 +40,6 @@ EqSlider::EqSlider(QWidget *parent) setCursor(m_skin->getCursor(Skin::CUR_EQSLID)); } - EqSlider::~EqSlider() {} @@ -49,19 +47,18 @@ void EqSlider::mousePressEvent(QMouseEvent *e) { m_moving = TRUE; press_pos = e->y(); - if (m_posy() && e->y()y() && e->y()ratio()) { press_pos = e->y()-m_pos; } else { - m_value = convert(qMax(qMin(height()-12,e->y()-6),0)); - press_pos = 6; + m_value = convert(qMax(qMin(height()-12*m_skin->ratio(),e->y()-6*m_skin->ratio()),0)); + press_pos = 6*m_skin->ratio(); if (m_value!=m_old) { emit sliderMoved(m_value); m_old = m_value; - //qDebug ("%d",m_value); } } draw(); @@ -80,7 +77,7 @@ void EqSlider::mouseMoveEvent(QMouseEvent* e) int po = e->y(); po = po - press_pos; - if (0<=po && po<=height()-12) + if (0<=po && po<=height()-12*m_skin->ratio()) { m_value = convert(po); draw(); @@ -116,13 +113,14 @@ void EqSlider::setMax(double m) void EqSlider::updateSkin() { + resize(m_skin->getEqSlider(0).size()); draw(FALSE); setCursor(m_skin->getCursor(Skin::CUR_EQSLID)); } void EqSlider::draw(bool pressed) { - int p=int(ceil(double(m_value-m_min)*(height()-12)/(m_max-m_min))); + int p=int(ceil(double(m_value-m_min)*(height()-12*m_skin->ratio())/(m_max-m_min))); m_pixmap = m_skin->getEqSlider(27-27*(m_value-m_min)/(m_max-m_min)); QPainter paint(&m_pixmap); if (pressed) @@ -135,7 +133,7 @@ void EqSlider::draw(bool pressed) double EqSlider::convert(int p) { - return (m_max - m_min)*(p)/(height() - 12) + m_min; + return (m_max - m_min)*(p)/(height() - 12*m_skin->ratio()) + m_min; } void EqSlider::wheelEvent(QWheelEvent *e) diff --git a/src/ui/eqslider.h b/src/ui/eqslider.h index bc92bad14..a766c575c 100644 --- a/src/ui/eqslider.h +++ b/src/ui/eqslider.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -22,14 +22,13 @@ #include "pixmapwidget.h" -/** - @author Ilya Kotov -*/ class QMouseEvent; class QWheelEvent; - class Skin; +/** + @author Ilya Kotov +*/ class EqSlider : public PixmapWidget { Q_OBJECT diff --git a/src/ui/eqtitlebar.cpp b/src/ui/eqtitlebar.cpp index 5ebc92800..9ca14cd91 100644 --- a/src/ui/eqtitlebar.cpp +++ b/src/ui/eqtitlebar.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -20,13 +20,12 @@ #include #include #include - +#include "eqwidget.h" #include "skin.h" #include "shadedbar.h" #include "dock.h" #include "mainwindow.h" #include "button.h" - #include "eqtitlebar.h" EqTitleBar::EqTitleBar(QWidget *parent) @@ -44,19 +43,16 @@ EqTitleBar::EqTitleBar(QWidget *parent) m_mw = qobject_cast(m_eq->parent()); m_close = new Button(this, Skin::EQ_BT_CLOSE_N, Skin::EQ_BT_CLOSE_P, Skin::CUR_EQCLOSE); connect(m_close, SIGNAL(clicked()),m_eq, SIGNAL(closed())); - m_close->move(264,3); m_shade = new Button(this, Skin::EQ_BT_SHADE1_N, Skin::EQ_BT_SHADE1_P, Skin::CUR_EQNORMAL); connect(m_shade, SIGNAL(clicked()), SLOT(shade())); - m_shade->move(254,3); QSettings settings(Qmmp::configFile(), QSettings::IniFormat); if (settings.value("Equalizer/shaded", FALSE).toBool()) shade(); - else - updateMask(); m_align = TRUE; setActive(FALSE); setCursor(m_skin->getCursor(Skin::CUR_EQTITLE)); connect(m_skin, SIGNAL(skinChanged()), SLOT(updateSkin())); + updatePositions(); } @@ -66,6 +62,19 @@ EqTitleBar::~EqTitleBar() settings.setValue("Equalizer/shaded", m_shaded); } +void EqTitleBar::updatePositions() +{ + int r = m_skin->ratio(); + m_close->move(r*264,r*3); + m_shade->move(r*254,r*3); + if(m_volumeBar) + m_volumeBar->move(r*61,r*4); + if(m_balanceBar) + m_balanceBar->move(r*164,r*4); + if(m_shade2) + m_shade2->move(r*254,r*3); +} + void EqTitleBar::setActive(bool active) { if (active) @@ -111,46 +120,45 @@ void EqTitleBar::mousePressEvent(QMouseEvent* event) void EqTitleBar::mouseMoveEvent(QMouseEvent* event) { - if (m_pos.x() < width() - 30) + if (m_pos.x() < width() - 30 * m_skin->ratio()) { QPoint npos = (event->globalPos()-m_pos); - Dock::getPointer()->move(m_eq, npos); + Dock::instance()->move(m_eq, npos); } } void EqTitleBar::mouseReleaseEvent(QMouseEvent*) { - Dock::getPointer()->updateDock(); + Dock::instance()->updateDock(); } void EqTitleBar::shade() { m_shaded = !m_shaded; + int r = m_skin->ratio(); if (m_shaded) { - m_eq->setFixedSize(275,14); setPixmap(m_skin->getEqPart(Skin::EQ_TITLEBAR_SHADED_A)); m_shade->hide(); m_shade2 = new Button(this, Skin::EQ_BT_SHADE2_N, Skin::EQ_BT_SHADE2_P, Skin::CUR_EQNORMAL); - m_shade2->move(254,3); + m_shade2->move(r*254,r*3); connect(m_shade2, SIGNAL(clicked()), SLOT(shade())); m_shade2->show(); m_volumeBar = new ShadedBar(this, Skin::EQ_VOLUME1, Skin::EQ_VOLUME2, Skin::EQ_VOLUME3); - m_volumeBar->move(61,4); + m_volumeBar->move(r*61,r*4); m_volumeBar->show(); connect(m_volumeBar, SIGNAL(sliderMoved(int)),SLOT(updateVolume())); m_balanceBar = new ShadedBar(this, Skin::EQ_BALANCE1, Skin::EQ_BALANCE2, Skin::EQ_BALANCE3); - m_balanceBar->move(164,4); - m_balanceBar->setFixedSize(42,7); - m_balanceBar->setRange(-100,100); + m_balanceBar->move(r*164,r*4); + m_balanceBar->setFixedSize(r*42,r*7); + m_balanceBar->setRange(-100*r,r*100); m_balanceBar->show(); connect(m_balanceBar, SIGNAL(sliderMoved(int)),SLOT(updateVolume())); setVolume(m_left, m_right); //show current volume and balance } else { - m_eq->setFixedSize(275,116); setPixmap(m_skin->getEqPart(Skin::EQ_TITLEBAR_A)); m_shade2->deleteLater(); m_volumeBar->deleteLater(); @@ -160,9 +168,9 @@ void EqTitleBar::shade() m_shade2 = 0; m_shade->show(); } + qobject_cast(m_eq)->setMimimalMode(m_shaded); if (m_align) - Dock::getPointer()->align(m_eq, m_shaded? -102: 102); - updateMask(); + Dock::instance()->align(m_eq, m_shaded? -102*r: 102*r); } void EqTitleBar::updateVolume() @@ -170,17 +178,8 @@ void EqTitleBar::updateVolume() m_mw->setVolume(m_volumeBar->value(), m_balanceBar->value()); } -void EqTitleBar::updateMask() -{ - m_eq->clearMask(); - m_eq->setMask(QRegion(0,0,m_eq->width(),m_eq->height())); - QRegion region = m_skin->getRegion(m_shaded? Skin::EQUALIZER_WS : Skin::EQUALIZER); - if (!region.isEmpty()) - m_eq->setMask(region); -} - void EqTitleBar::updateSkin() { - updateMask(); setCursor(m_skin->getCursor(Skin::CUR_EQTITLE)); + updatePositions(); } diff --git a/src/ui/eqtitlebar.h b/src/ui/eqtitlebar.h index d7a58c588..0e4131fb4 100644 --- a/src/ui/eqtitlebar.h +++ b/src/ui/eqtitlebar.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -22,17 +22,15 @@ #include "pixmapwidget.h" -/** - @author Ilya Kotov -*/ - class QMouseEvent; - class Skin; class MainWindow; class Button; class ShadedBar; +/** + @author Ilya Kotov +*/ class EqTitleBar : public PixmapWidget { Q_OBJECT @@ -49,10 +47,10 @@ public slots: private slots: void shade(); void updateVolume(); - void updateMask(); void updateSkin(); private: + void updatePositions(); Skin* m_skin; bool m_active; int m_left; @@ -71,7 +69,6 @@ protected: void mousePressEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); void mouseMoveEvent(QMouseEvent*); - }; #endif diff --git a/src/ui/eqwidget.cpp b/src/ui/eqwidget.cpp index 4da9625fc..42efdaf5e 100644 --- a/src/ui/eqwidget.cpp +++ b/src/ui/eqwidget.cpp @@ -24,7 +24,6 @@ #include #include #include - #include "skin.h" #include "eqslider.h" #include "eqtitlebar.h" @@ -37,56 +36,40 @@ #include "playlist.h" #include "eqwidget.h" - - EqWidget::EqWidget (QWidget *parent) : PixmapWidget (parent) { + m_shaded = FALSE; m_skin = Skin::instance(); setPixmap (m_skin->getEqPart (Skin::EQ_MAIN)); setCursor (m_skin->getCursor (Skin::CUR_EQNORMAL)); - //setPixmap(QPixmap(275,116)); m_titleBar = new EqTitleBar (this); m_titleBar -> move (0,0); - m_titleBar -> show(); connect (m_skin, SIGNAL (skinChanged()), this, SLOT (updateSkin())); m_preamp = new EqSlider (this); - m_preamp->show(); - m_preamp->move (21,38); connect (m_preamp,SIGNAL (sliderMoved (double)),SLOT (setPreamp ())); m_on = new ToggleButton (this,Skin::EQ_BT_ON_N,Skin::EQ_BT_ON_P, Skin::EQ_BT_OFF_N,Skin::EQ_BT_OFF_P); - m_on->show(); - m_on->move (14,18); connect (m_on, SIGNAL (clicked(bool)), SIGNAL(valueChanged())); m_autoButton = new ToggleButton(this, Skin::EQ_BT_AUTO_1_N, Skin::EQ_BT_AUTO_1_P, Skin::EQ_BT_AUTO_0_N, Skin::EQ_BT_AUTO_0_P); - m_autoButton->move(39, 18); - m_autoButton->show(); - m_eqg = new EQGraph(this); - m_eqg->move(87,17); - m_presetsMenu = new QMenu(this); - m_presetButton = new Button (this, Skin::EQ_BT_PRESETS_N, Skin::EQ_BT_PRESETS_P, Skin::CUR_EQNORMAL); - m_presetButton->move(217,18); - m_presetButton->show(); - connect(m_presetButton, SIGNAL(clicked()), SLOT(showPresetsMenu())); for (int i = 0; i<10; ++i) { m_sliders << new EqSlider (this); - m_sliders.at (i)->move (78+i*18,38); - m_sliders.at (i)->show(); connect (m_sliders.at (i), SIGNAL (sliderMoved (double)),SLOT (setGain())); } readSettings(); createActions(); + updatePositions(); + updateMask(); connect(SoundCore::instance(), SIGNAL(volumeChanged(int, int)), m_titleBar, SLOT(setVolume(int, int))); } @@ -98,6 +81,18 @@ EqWidget::~EqWidget() delete m_autoPresets.takeFirst(); } +void EqWidget::updatePositions() +{ + int r = m_skin->ratio(); + m_preamp->move (21*r,38*r); + m_on->move (14*r,18*r); + m_autoButton->move(39*r,18*r); + m_eqg->move(87*r,17*r); + m_presetButton->move(217*r,18*r); + for (int i = 0; i < 10; ++i) + m_sliders.at (i)->move ((78+i*18)*r,38*r); +} + double EqWidget::preamp() { return m_preamp->value(); @@ -128,6 +123,20 @@ void EqWidget::updateSkin() m_titleBar->setActive (FALSE); setPixmap (m_skin->getEqPart (Skin::EQ_MAIN)); setCursor (m_skin->getCursor (Skin::CUR_EQNORMAL)); + setMimimalMode(m_shaded); + updatePositions(); +} + +void EqWidget::setMimimalMode(bool b) +{ + m_shaded = b; + int r = m_skin->ratio(); + + if(m_shaded) + resize(r*275,r*14); + else + resize(r*275,r*116); + updateMask(); } void EqWidget::readSettings() @@ -427,3 +436,13 @@ void EqWidget::keyPressEvent (QKeyEvent *ke) ke->modifiers(), ke->text(),ke->isAutoRepeat(), ke->count()); QApplication::sendEvent(qobject_cast(parent())->playlist(), &event); } + +void EqWidget::updateMask() +{ + clearMask(); + setMask(QRegion(0,0,width(),height())); + QRegion region = m_skin->getRegion(m_shaded? Skin::EQUALIZER_WS : Skin::EQUALIZER); + if (!region.isEmpty()) + setMask(region); +} + diff --git a/src/ui/eqwidget.h b/src/ui/eqwidget.h index 9345e2e40..7a48a00b8 100644 --- a/src/ui/eqwidget.h +++ b/src/ui/eqwidget.h @@ -53,6 +53,7 @@ public: * necessary for auto-load presets */ void loadPreset(const QString &name); + void setMimimalMode(bool b = TRUE); signals: void valueChanged(); @@ -72,9 +73,11 @@ private slots: void importWinampEQF(); private: + void updatePositions(); void readSettings(); void writeSettings(); void createActions(); + void updateMask(); EQPreset *findPreset(const QString &name); virtual void keyPressEvent (QKeyEvent *); Skin *m_skin; @@ -90,6 +93,7 @@ private: QList m_presets; QList m_autoPresets; QString m_autoName; + bool m_shaded; protected: virtual void changeEvent(QEvent*); diff --git a/src/ui/forms/configdialog.ui b/src/ui/forms/configdialog.ui index 33ba3d9a8..f848cccfc 100644 --- a/src/ui/forms/configdialog.ui +++ b/src/ui/forms/configdialog.ui @@ -356,6 +356,13 @@ + + + + Double size + + + diff --git a/src/ui/listwidget.cpp b/src/ui/listwidget.cpp index 90cd4e53b..6a56d4218 100644 --- a/src/ui/listwidget.cpp +++ b/src/ui/listwidget.cpp @@ -67,9 +67,7 @@ ListWidget::~ListWidget() void ListWidget::readSettings() { QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - QString fontname = settings.value("PlayList/Font").toString(); - if (!fontname.isEmpty()) - m_font.fromString(fontname); + m_font.fromString(settings.value("PlayList/Font", QApplication::font().toString()).toString()); m_show_protocol = settings.value ("PlayList/show_protocol", FALSE).toBool(); m_show_number = settings.value ("PlayList/show_numbers", TRUE).toBool(); @@ -304,8 +302,8 @@ void ListWidget::updateList() emit positionChanged(0, qMax(0, m_model->count() - m_rows)); } - m_titles = m_model->getTitles(m_first, m_rows ); - m_times = m_model->getTimes(m_first, m_rows ); + m_titles = m_model->getTitles(m_first, m_rows); + m_times = m_model->getTimes(m_first, m_rows); m_scroll = FALSE; //add numbers for (int i = 0; i < m_titles.size() && m_show_number; ++i) @@ -316,7 +314,7 @@ void ListWidget::updateList() } //elide title QString extra_string; - for (int i=0; iwidth(extra_string); diff --git a/src/ui/mainvisual.cpp b/src/ui/mainvisual.cpp index 852244171..142618751 100644 --- a/src/ui/mainvisual.cpp +++ b/src/ui/mainvisual.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -47,9 +47,8 @@ MainVisual::MainVisual (QWidget *parent) : Visual (parent), m_vis (0), m_playing (FALSE) { m_skin = Skin::instance(); + m_ratio = m_skin->ratio(); connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSettings())); - resize(75,20); - m_pixmap = QPixmap (75,20); m_timer = new QTimer (this); connect(m_timer, SIGNAL (timeout()), this, SLOT (timeout())); m_nodes.clear(); @@ -208,18 +207,18 @@ void MainVisual::mousePressEvent (QMouseEvent *e) void MainVisual::drawBackGround() { - m_bg = QPixmap (75,20); + m_bg = QPixmap (76 * m_ratio, 16 * m_ratio); if (m_transparentAction->isChecked()) { m_bg.fill (Qt::transparent); return; } QPainter painter(&m_bg); - for (int x = 0; x < 75; x += 2) + for (int x = 0; x < 76 * m_ratio; x += 2) { painter.setPen(m_skin->getVisColor(0)); - painter.drawLine(x + 1, 0, x + 1, 20); - for (int y = 0; y < 20; y +=2) + painter.drawLine(x + 1, 0, x + 1, 16 *m_ratio); + for (int y = 0; y < 16 *m_ratio; y += 2) { painter.setPen(m_skin->getVisColor(0)); painter.drawPoint(x,y); @@ -231,6 +230,9 @@ void MainVisual::drawBackGround() void MainVisual::updateSettings() { + m_ratio = m_skin->ratio(); + resize(76 * m_ratio, 16 * m_ratio); + m_pixmap = QPixmap (76 * m_ratio, 16 * m_ratio); drawBackGround(); m_pixmap = m_bg; update(); @@ -426,9 +428,9 @@ using namespace mainvisual; Analyzer::Analyzer() : m_analyzerBarWidth (4), m_fps (20) { - m_size = QSize(75,20); clear(); m_skin = Skin::instance(); + m_size = QSize(76*m_skin->ratio(), 16*m_skin->ratio()); double peaks_speed[] = { 0.05, 0.1, 0.2, 0.4, 0.8 }; double analyzer_speed[] = { 1.2, 1.8, 2.2, 2.8, 2.4 }; @@ -528,6 +530,7 @@ bool Analyzer::process (VisualNode *node) void Analyzer::draw (QPainter *p) { + int r = m_skin->ratio(); if (m_lines) for (int j = 0; j < 75; ++j) { @@ -539,11 +542,17 @@ void Analyzer::draw (QPainter *p) p->setPen (m_skin->getVisColor (3+(int(m_intern_vis_data[j])-i))); else p->setPen (m_skin->getVisColor (18-int(m_intern_vis_data[j]))); - p->drawPoint (j, m_size.height()-i); + p->drawPoint (j*r, m_size.height() - r*i); + if(r == 2) + p->drawPoint (j*r+1, m_size.height() - r*i); } p->setPen (m_skin->getVisColor (23)); if (m_show_peaks) - p->drawPoint (j, m_size.height()-int(m_peaks[j])); + { + p->drawPoint (j*r, m_size.height() - r*m_peaks[j]); + if(r == 2) + p->drawPoint (j*r+1, m_size.height() - r*m_peaks[j]); + } } else for (int j = 0; j < 19; ++j) @@ -556,12 +565,20 @@ void Analyzer::draw (QPainter *p) p->setPen (m_skin->getVisColor (3+(int(m_intern_vis_data[j])-i))); else p->setPen (m_skin->getVisColor (18-int(m_intern_vis_data[j]))); - p->drawLine (j*4,m_size.height()-i, (j+1)*4-2,m_size.height()-i); + + p->drawLine (j*4*r,m_size.height()-r*i, (j*4+2)*r,m_size.height()-r*i); + if(r == 2) + p->drawLine (j*4*r, m_size.height()-r*i +1, (j*4+2)*r,m_size.height()-r*i+1); } p->setPen (m_skin->getVisColor (23)); if (m_show_peaks) - p->drawLine (j*4,m_size.height()-int(m_peaks[j]), - (j+1) *4-2,m_size.height()-int(m_peaks[j])); + { + p->drawLine (j*4*r,m_size.height()-r*m_peaks[j], + (j*4+2)*r,m_size.height()-r*m_peaks[j]); + if(r == 2) + p->drawLine (j*4*r,m_size.height()-r*m_peaks[j]+1, + (j*4+2)*r,m_size.height()-r*m_peaks[j]+1); + } } } diff --git a/src/ui/mainvisual.h b/src/ui/mainvisual.h index d5b0f5068..e4dd13ec1 100644 --- a/src/ui/mainvisual.h +++ b/src/ui/mainvisual.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -117,6 +117,7 @@ private: QActionGroup *m_analyzerTypeGroup; QAction *m_peaksAction; QAction *m_transparentAction; + int m_ratio; }; namespace mainvisual @@ -133,7 +134,7 @@ public: const QString name() { return "Analyzer"; - }; + } private: QSize m_size; diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index e398af084..d1e7042d1 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2009 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov m * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -70,7 +70,6 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint); #endif //setFixedSize (275,116); - resize(275,116); setWindowTitle("Qmmp"); //prepare libqmmp and libqmmpui libraries for playing @@ -84,12 +83,12 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option //user interface m_skin = new Skin(this); + resize(275 * m_skin->ratio(),116 * m_skin->ratio()); Dock *dock = new Dock(this); dock->setMainWidget(this); - display = new MainDisplay(this); - setCentralWidget(display); - display->show(); - display->setFocus (); + m_display = new MainDisplay(this); + setCentralWidget(m_display); + m_display->setFocus (); m_playlist = new PlayList(this); m_playlist->setModel(m_playListModel); @@ -102,11 +101,6 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option m_jumpDialog->setModel(m_playListModel); m_jumpDialog->hide(); - m_titlebar = new TitleBar(this); - m_titlebar->move(0,0); - m_titlebar->show(); - m_titlebar->setActive(TRUE); - createActions(); //prepare visualization Visual::initialize(this, m_visMenu, SLOT(updateActions())); @@ -123,17 +117,14 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option connect (m_playlist,SIGNAL(loadPlaylist()),SLOT(loadPlaylist())); connect (m_playlist,SIGNAL(savePlaylist()),SLOT(savePlaylist())); - connect(display,SIGNAL(shuffleToggled(bool)),m_playListModel,SLOT(prepareForShufflePlaying(bool))); - connect(display,SIGNAL(repeatableToggled(bool)),m_playListModel,SLOT(prepareForRepeatablePlaying(bool))); + connect(m_display,SIGNAL(shuffleToggled(bool)),m_playListModel,SLOT(prepareForShufflePlaying(bool))); + connect(m_display,SIGNAL(repeatableToggled(bool)),m_playListModel,SLOT(prepareForRepeatablePlaying(bool))); connect(m_equalizer, SIGNAL(valueChanged()), SLOT(updateEQ())); - connect(m_jumpDialog,SIGNAL(playRequest()),this,SLOT(play())); - //connect(m_core, SIGNAL(finished()), SLOT(next())); connect(m_core, SIGNAL(stateChanged(Qmmp::State)), SLOT(showState(Qmmp::State))); connect(m_core, SIGNAL(elapsedChanged(qint64)),m_playlist, SLOT(setTime(qint64))); - connect(m_core, SIGNAL(elapsedChanged(qint64)),m_titlebar, SLOT(setTime(qint64))); connect(m_core, SIGNAL(metaDataChanged()),SLOT(showMetaData())); connect(m_core, SIGNAL(bufferingProgress(int)), TextScroller::getPointer(), SLOT(setProgress(int))); @@ -142,8 +133,8 @@ MainWindow::MainWindow(const QStringList& args, BuiltinCommandLineOption* option connect(m_generalHandler, SIGNAL(exitCalled()), SLOT(close())); readSettings(); - display->setEQ(m_equalizer); - display->setPL(m_playlist); + m_display->setEQ(m_equalizer); + m_display->setPL(m_playlist); dock->updateDock(); //m_playListModel->readSettings(); m_playListModel->doCurrentVisibleRequest(); @@ -203,7 +194,6 @@ void MainWindow::pause(void) void MainWindow::stop() { - //display->setTime(0); m_player->stop(); } @@ -232,30 +222,21 @@ void MainWindow::showState(Qmmp::State state) switch ((int) state) { case Qmmp::Playing: - { if (m_playListModel->currentItem()) m_equalizer->loadPreset(m_playListModel->currentItem()->url().section("/",-1)); if (m_playlist->listWidget()) m_playlist->listWidget()->updateList(); //removes progress message from TextScroller break; - } case Qmmp::Paused: - { - //m_generalHandler->setState(General::Paused); break; - } case Qmmp::Stopped: - { - //m_generalHandler->setState(General::Stopped); m_playlist->setTime(-1); - m_titlebar->setTime(-1); if (m_playlist->currentItem()) setWindowTitle(m_playlist->currentItem()->text()); else setWindowTitle("Qmmp"); break; } - } } void MainWindow::showMetaData() { @@ -324,7 +305,7 @@ void MainWindow::changeEvent (QEvent * event) { if (event->type() == QEvent::ActivationChange) { - m_titlebar->setActive(isActiveWindow()); + m_display->setActive(isActiveWindow()); } } @@ -349,9 +330,9 @@ void MainWindow::readSettings() // Repeat/Shuffle m_playListModel->prepareForRepeatablePlaying(val); - display->setIsRepeatable(val); + m_display->setIsRepeatable(val); val = settings.value("Playlist/shuffle",FALSE).toBool(); - display->setIsShuffle(val); + m_display->setIsShuffle(val); m_playListModel->prepareForShufflePlaying(val); // Playlist name @@ -377,8 +358,8 @@ void MainWindow::writeSettings() // Repeat/Shuffle settings.beginGroup("Playlist"); - settings.setValue("repeatable",display->isRepeatable()); - settings.setValue("shuffle",display->isShuffle()); + settings.setValue("repeatable",m_display->isRepeatable()); + settings.setValue("shuffle",m_display->isShuffle()); // Playlist name settings.setValue("playlist_name",m_playlistName); @@ -396,6 +377,7 @@ void MainWindow::showSettings() //m_core->updateConfig(); m_visMenu->updateActions(); m_skin->reloadSkin(); + Dock::instance()->updateDock(); } delete m_confDialog; } @@ -407,8 +389,8 @@ void MainWindow::toggleVisibility() show(); raise(); activateWindow(); - m_playlist->setVisible(display->isPlaylistVisible()); - m_equalizer->setVisible(display->isEqualizerVisible()); + m_playlist->setVisible(m_display->isPlaylistVisible()); + m_equalizer->setVisible(m_display->isEqualizerVisible()); qApp->processEvents(); setFocus (); if (isMinimized()) @@ -466,7 +448,7 @@ void MainWindow::createActions() m_mainMenu->addSeparator(); m_mainMenu->addAction(tr("&About"), this, SLOT(about())); m_mainMenu->addAction(tr("&About Qt"), qApp, SLOT(aboutQt())); - Dock::getPointer()->addActions(m_mainMenu->actions()); + Dock::instance()->addActions(m_mainMenu->actions()); m_mainMenu->addSeparator(); m_mainMenu->addAction(tr("&Exit"),this, SLOT(close ()), tr("Ctrl+Q")); @@ -477,8 +459,8 @@ void MainWindow::createActions() backward->setShortcut(QKeySequence(Qt::Key_Left)); connect(backward,SIGNAL(triggered(bool)),this,SLOT(backward())); - Dock::getPointer()->addActions( QList() << forward << backward ); - Dock::getPointer()->addActions(m_mainMenu->actions()); + Dock::instance()->addActions( QList() << forward << backward ); + Dock::instance()->addActions(m_mainMenu->actions()); } @@ -632,7 +614,7 @@ void MainWindow::handleCloseRequest() QApplication::closeAllWindows(); } -void MainWindow::addUrl( ) +void MainWindow::addUrl() { AddUrlDialog::popup(this,m_playListModel); } @@ -644,7 +626,7 @@ SoundCore * MainWindow::soundCore() const MainDisplay * MainWindow::mainDisplay() const { - return display; + return m_display; } void MainWindow::keyPressEvent(QKeyEvent *ke) diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index d89def113..bb6c49001 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -113,10 +113,9 @@ private: bool seeking; SoundCore *m_core; QMenu *m_mainMenu; - MainDisplay *display; + MainDisplay *m_display; PlayList *m_playlist; PlayListModel *m_playListModel; - TitleBar *m_titlebar; ConfigDialog *m_confDialog; int m_preamp; EqWidget *m_equalizer; diff --git a/src/ui/monostereo.cpp b/src/ui/monostereo.cpp index 28d51a6bf..89f3621e5 100644 --- a/src/ui/monostereo.cpp +++ b/src/ui/monostereo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -22,12 +22,12 @@ #include "skin.h" #include "monostereo.h" -MonoStereo::MonoStereo ( QWidget *parent ) - : PixmapWidget ( parent ) +MonoStereo::MonoStereo (QWidget *parent) + : PixmapWidget (parent) { m_skin = Skin::instance(); - m_pixmap = QPixmap ( 54,12 ); - setChannels ( 0 ); + m_pixmap = QPixmap (54*m_skin->ratio(), 12*m_skin->ratio()); + setChannels (0); connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin())); } @@ -35,34 +35,35 @@ MonoStereo::MonoStereo ( QWidget *parent ) MonoStereo::~MonoStereo() {} -void MonoStereo::setChannels ( int c ) +void MonoStereo::setChannels (int c) { m_channels = c; - QPainter paint ( &m_pixmap ); - switch ( ( int ) c ) + QPainter paint (&m_pixmap); + switch ((int) c) { case 0: { - paint.drawPixmap ( 0,0,m_skin->getMSPart ( Skin::MONO_I ) ); - paint.drawPixmap ( 27,0,m_skin->getMSPart ( Skin::STEREO_I ) ); + paint.drawPixmap (0,0,m_skin->getMSPart (Skin::MONO_I)); + paint.drawPixmap (27*m_skin->ratio(),0,m_skin->getMSPart (Skin::STEREO_I)); break; } case 1: { - paint.drawPixmap ( 0,0,m_skin->getMSPart ( Skin::MONO_A ) ); - paint.drawPixmap ( 27,0,m_skin->getMSPart ( Skin::STEREO_I ) ); + paint.drawPixmap (0,0,m_skin->getMSPart (Skin::MONO_A)); + paint.drawPixmap (27*m_skin->ratio(),0,m_skin->getMSPart (Skin::STEREO_I)); break; } } - if ( c > 1 ) + if (c > 1) { - paint.drawPixmap ( 0,0,m_skin->getMSPart ( Skin::MONO_I ) ); - paint.drawPixmap ( 27,0,m_skin->getMSPart ( Skin::STEREO_A ) ); + paint.drawPixmap (0,0,m_skin->getMSPart (Skin::MONO_I)); + paint.drawPixmap (27*m_skin->ratio(),0,m_skin->getMSPart (Skin::STEREO_A)); } - setPixmap ( m_pixmap ); + setPixmap (m_pixmap); } void MonoStereo::updateSkin() { - setChannels ( m_channels ); + m_pixmap = QPixmap (54*m_skin->ratio(), 12*m_skin->ratio()); + setChannels (m_channels); } diff --git a/src/ui/monostereo.h b/src/ui/monostereo.h index d666fedcf..547a545da 100644 --- a/src/ui/monostereo.h +++ b/src/ui/monostereo.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -22,11 +22,11 @@ #include "pixmapwidget.h" -/** - @author Ilya Kotov -*/ class Skin; +/** + @author Ilya Kotov +*/ class MonoStereo : public PixmapWidget { Q_OBJECT diff --git a/src/ui/pixmapwidget.cpp b/src/ui/pixmapwidget.cpp index a0f4ff7fd..77566b162 100644 --- a/src/ui/pixmapwidget.cpp +++ b/src/ui/pixmapwidget.cpp @@ -38,7 +38,7 @@ void PixmapWidget::setPixmap(const QPixmap pixmap) update(); } -void PixmapWidget::paintEvent ( QPaintEvent *) +void PixmapWidget::paintEvent (QPaintEvent *) { QPainter paint(this); paint.drawPixmap(0,0, m_pixmap); diff --git a/src/ui/playlist.cpp b/src/ui/playlist.cpp index 3ba49322e..2bad71a74 100644 --- a/src/ui/playlist.cpp +++ b/src/ui/playlist.cpp @@ -50,46 +50,30 @@ PlayList::PlayList (QWidget *parent) { m_update = FALSE; m_resize = FALSE; - m_anchor_row = -1; + m_skin = Skin::instance(); + m_ratio = m_skin->ratio(); createMenus(); - resize (275,116); - setMinimumSize (275,116); - setBaseSize (275,116); + resize (275*m_ratio, 116*m_ratio); m_listWidget = new ListWidget (this); - m_listWidget->show(); - m_listWidget->setGeometry (12,20,243,58); - m_plslider = new PlayListSlider (this); - m_plslider->show(); - setSizeIncrement (25,29); - m_skin = Skin::instance(); + setSizeIncrement (25*m_ratio, 29*m_ratio); m_buttonAdd = new Button (this,Skin::PL_BT_ADD,Skin::PL_BT_ADD, Skin::CUR_PNORMAL); - m_buttonAdd->move (11,86); m_buttonSub = new Button (this,Skin::PL_BT_SUB,Skin::PL_BT_SUB, Skin::CUR_PNORMAL); - m_buttonSub->move (40,86); m_selectButton = new Button (this,Skin::PL_BT_SEL,Skin::PL_BT_SEL, Skin::CUR_PNORMAL); - m_selectButton->move (70,86); m_sortButton= new Button (this,Skin::PL_BT_SORT,Skin::PL_BT_SORT, Skin::CUR_PNORMAL); - m_sortButton->move (99,86); m_playlistButton = new Button (this,Skin::PL_BT_LST,Skin::PL_BT_LST, Skin::CUR_PNORMAL); m_resizeWidget = new QWidget(this); m_resizeWidget->resize(25,25); - m_resizeWidget->setGeometry(width()-25, height()-25, 25, 25); m_resizeWidget->setCursor(m_skin->getCursor (Skin::CUR_PSIZE)); - m_pl_control = new PlaylistControl (this); m_pl_control->move (0,0); - m_pl_control->show(); m_length_totalLength = new SymbolDisplay (this,14); m_length_totalLength->setAlignment (Qt::AlignLeft); - m_length_totalLength->show(); m_current_time = new SymbolDisplay (this,6); - m_current_time->show(); - m_keyboardManager = new KeyboardManager (this); connect (m_listWidget, SIGNAL (selectionChanged()), parent, SLOT (replay())); @@ -114,12 +98,44 @@ PlayList::PlayList (QWidget *parent) m_titleBar->move (0,0); readSettings(); setCursor(m_skin->getCursor(Skin::CUR_PNORMAL)); + updatePositions(); } PlayList::~PlayList() {} +void PlayList::updatePositions() +{ + int sx = (width()-275*m_ratio)/25; + int sy = (height()-116*m_ratio)/29; + if (sx < 0 || sy < 0) //skip shaded mode + return; + + setMinimumSize (275*m_ratio, 116*m_ratio); + setBaseSize (275*m_ratio,116*m_ratio); + + m_titleBar->resize (275*m_ratio+25*sx, 20*m_ratio); + m_plslider->resize (20*m_ratio, 58*m_ratio+sy*29); + + m_listWidget->resize (243*m_ratio+25*sx, 58*m_ratio+29*sy); + m_listWidget->move (12*m_ratio,20*m_ratio); + + m_buttonAdd->move (11*m_ratio, 86*m_ratio+29*sy); + m_buttonSub->move (40*m_ratio, 86*m_ratio+29*sy); + m_selectButton->move (70*m_ratio, 86*m_ratio+29*sy); + m_sortButton->move (99*m_ratio, 86*m_ratio+29*sy); + + m_pl_control->move (128*m_ratio+sx*25, 100*m_ratio+29*sy); + m_playlistButton->move (228*m_ratio+sx*25,86*m_ratio+29*sy); + + m_length_totalLength -> move (131*m_ratio+sx*25,88*m_ratio+29*sy); + m_current_time->move (190*m_ratio+sx*25,101*m_ratio+29*sy); + + m_plslider->move (255*m_ratio+sx*25,20*m_ratio); + m_resizeWidget->move(width() - 25, height() - 29); +} + void PlayList::createMenus() { m_addMenu = new QMenu (this); @@ -310,7 +326,7 @@ void PlayList::createActions() connect (saveListAct, SIGNAL (triggered()), this, SIGNAL (savePlaylist())); //this->addActions (m_playlistMenu->actions()); - Dock::getPointer()->addActions (m_actions); + Dock::instance()->addActions (m_actions); } void PlayList::closeEvent (QCloseEvent *e) @@ -322,8 +338,8 @@ void PlayList::closeEvent (QCloseEvent *e) void PlayList::paintEvent (QPaintEvent *) { - int m_sx = (width()-275) /25; - int m_sy = (height()-116) /29; + int m_sx = (width()-275*m_ratio) /25; + int m_sy = (height()-116*m_ratio) /29; drawPixmap (m_sx, m_sy); } @@ -331,48 +347,27 @@ void PlayList::drawPixmap (int sx, int sy) { QPainter paint; paint.begin (this); - paint.drawPixmap (0,20,m_skin->getPlPart (Skin::PL_LFILL)); - for (int i = 1; igetPlPart (Skin::PL_LFILL)); + for (int i = 1; igetPlPart (Skin::PL_LFILL)); + paint.drawPixmap (0,20*m_ratio+29*i,m_skin->getPlPart (Skin::PL_LFILL)); } - paint.drawPixmap (0,78+29*sy,m_skin->getPlPart (Skin::PL_LSBAR)); + paint.drawPixmap (0,78*m_ratio+29*sy,m_skin->getPlPart (Skin::PL_LSBAR)); for (int i = 0; igetPlPart (Skin::PL_SFILL1)); + paint.drawPixmap (125*m_ratio+i*25,78*m_ratio+sy*29,m_skin->getPlPart (Skin::PL_SFILL1)); } - paint.drawPixmap (125+sx*25,78+sy*29,m_skin->getPlPart (Skin::PL_RSBAR)); + paint.drawPixmap (125*m_ratio+sx*25,78*m_ratio+sy*29,m_skin->getPlPart (Skin::PL_RSBAR)); paint.end(); } -void PlayList::resizeEvent (QResizeEvent *e) +void PlayList::resizeEvent (QResizeEvent *) { - int sx = (e->size().width()-275) /25; - int sy = (e->size().height()-116) /29; - if (sx < 0 || sy < 0) - return; - - m_titleBar->resize (275+25*sx,20); - m_plslider->resize (20,58+sy*29); - - m_listWidget->resize (243+25*sx,58+29*sy); - - m_buttonAdd->move (11,86+29*sy); - m_buttonSub->move (40,86+29*sy); - m_selectButton->move (70,86+29*sy); - m_sortButton->move (99,86+29*sy); - - m_pl_control->move (128+sx*25,100+29*sy); - m_playlistButton->move (228+sx*25,86+29*sy); - - m_length_totalLength -> move (131+sx*25,88+29*sy); - m_current_time->move (190+sx*25,101+29*sy); - - m_plslider->move (255+sx*25,20); - m_resizeWidget->move(250 + sx * 25, 91 + sy * 29); + updatePositions(); } + void PlayList::mousePressEvent (QMouseEvent *e) { m_pos = e->pos (); @@ -411,7 +406,7 @@ void PlayList::mouseReleaseEvent (QMouseEvent *) /*if (m_resize) m_listWidget->updateList();*/ m_resize = FALSE; - Dock::getPointer()->updateDock(); + Dock::instance()->updateDock(); } void PlayList::setModel (PlayListModel *model) { @@ -541,5 +536,17 @@ void PlayList::updateSkin() { setCursor(m_skin->getCursor(Skin::CUR_PNORMAL)); // TODO shaded m_resizeWidget->setCursor(m_skin->getCursor (Skin::CUR_PSIZE)); + if(m_ratio != m_skin->ratio()) //update minimal size if needed + { + int prev = m_ratio; //save previous ratio + m_ratio = m_skin->ratio(); + if(height() < 116*prev) //minimal mode + setMinimumSize (275*m_ratio, 14*m_ratio); + else + setMinimumSize (275*m_ratio, 116*m_ratio); + setBaseSize (275*m_ratio,116*m_ratio); + setSizeIncrement (25*m_ratio, 29*m_ratio); + updatePositions(); + } update(); } diff --git a/src/ui/playlist.h b/src/ui/playlist.h index 1cf9fe454..5219d7bbf 100644 --- a/src/ui/playlist.h +++ b/src/ui/playlist.h @@ -83,6 +83,7 @@ class PlayList : public QWidget private: + void updatePositions(); QString formatTime (int sec); void drawPixmap (int, int); void writeSettings(); @@ -113,7 +114,7 @@ class PlayList : public QWidget QPoint m_pos; bool m_resize; bool m_update; - int m_anchor_row; + int m_ratio; KeyboardManager* m_keyboardManager; protected: diff --git a/src/ui/playlistslider.cpp b/src/ui/playlistslider.cpp index 6a36b8740..c682906c6 100644 --- a/src/ui/playlistslider.cpp +++ b/src/ui/playlistslider.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,7 +29,6 @@ PlayListSlider::PlayListSlider(QWidget *parent) : QWidget(parent) { m_skin = Skin::instance(); - m_moving = FALSE; m_pressed = FALSE; m_min = 0; @@ -57,26 +56,25 @@ void PlayListSlider::paintEvent(QPaintEvent *) paint.drawPixmap(0,58+i*29,m_skin->getPlPart(Skin::PL_RFILL)); } if (m_pressed) - paint.drawPixmap(5,p,m_skin->getButton(Skin::PL_BT_SCROLL_P)); + paint.drawPixmap(5*m_skin->ratio(),p,m_skin->getButton(Skin::PL_BT_SCROLL_P)); else - paint.drawPixmap(5,p,m_skin->getButton(Skin::PL_BT_SCROLL_N)); + paint.drawPixmap(5*m_skin->ratio(),p,m_skin->getButton(Skin::PL_BT_SCROLL_N)); m_pos = p; } void PlayListSlider::mousePressEvent(QMouseEvent *e) { - m_moving = TRUE; m_pressed = TRUE; press_pos = e->y(); - if (m_posy() && e->y()y() && e->y()ratio()) { press_pos = e->y()-m_pos; } else { - m_value = convert(qMax(qMin(height()-18,e->y()-9),0)); - press_pos = 9; + m_value = convert(qMax(qMin(height()-18*m_skin->ratio(),e->y()-9*m_skin->ratio()),0)); + press_pos = 9*m_skin->ratio(); if (m_value!=m_old) { emit sliderMoved(m_value); @@ -101,7 +99,7 @@ void PlayListSlider::mouseMoveEvent(QMouseEvent* e) int po = e->y(); po = po - press_pos; - if (0<=po && po<=height()-18) + if (0<=po && po<=height()-18*m_skin->ratio()) { m_value = convert(po); update(); @@ -132,6 +130,6 @@ void PlayListSlider::updateSkin() int PlayListSlider::convert(int p) { - return int(floor(double(m_max-m_min)*(p)/(height()-18)+m_min)); + return int(floor(double(m_max-m_min)*(p)/(height()-18*m_skin->ratio())+m_min)); } diff --git a/src/ui/playlistslider.h b/src/ui/playlistslider.h index a8eb45c66..cd42a6c3a 100644 --- a/src/ui/playlistslider.h +++ b/src/ui/playlistslider.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/ui/playlisttitlebar.cpp b/src/ui/playlisttitlebar.cpp index 52a9cfd3b..e084ce31d 100644 --- a/src/ui/playlisttitlebar.cpp +++ b/src/ui/playlisttitlebar.cpp @@ -21,7 +21,7 @@ #include #include #include - +#include #include #include "dock.h" @@ -40,19 +40,20 @@ PlayListTitleBar::PlayListTitleBar(QWidget *parent) m_shaded = FALSE; m_align = FALSE; m_skin = Skin::instance(); - setSizeIncrement(25,1); + m_ratio = m_skin->ratio(); connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin())); m_pl = qobject_cast(parent); m_mw = qobject_cast(m_pl->parent()); m_close = new Button(this,Skin::PL_BT_CLOSE_N, Skin::PL_BT_CLOSE_P, Skin::CUR_PCLOSE); connect (m_close, SIGNAL(clicked()), m_pl, SIGNAL(closed())); - m_close->move(264,3); + m_shade = new Button(this, Skin::PL_BT_SHADE1_N, Skin::PL_BT_SHADE1_P, Skin::CUR_PWINBUT); connect(m_shade, SIGNAL(clicked()), SLOT(shade())); - m_shade->move(255,3); - resize(275,20); - setMinimumWidth(275); + + resize(275*m_ratio,20*m_ratio); + setMinimumWidth(275*m_ratio); + readSettings(); QSettings settings (Qmmp::configFile(), QSettings::IniFormat); m_pl->resize (settings.value ("PlayList/size", QSize (275, 116)).toSize()); @@ -61,6 +62,7 @@ PlayListTitleBar::PlayListTitleBar(QWidget *parent) resize(m_pl->width(),height()); m_align = TRUE; setCursor(m_skin->getCursor(Skin::CUR_PTBAR)); + updatePositions(); } @@ -71,20 +73,26 @@ PlayListTitleBar::~PlayListTitleBar() settings.setValue ("PlayList/shaded", m_shaded); } -void PlayListTitleBar::drawPixmap(int sx) +void PlayListTitleBar::updatePositions() { - m_close->move(264+sx*25,3); - m_shade->move(255+sx*25,3); + int sx = (width()-275*m_ratio)/25; + m_ratio = m_skin->ratio(); + m_close->move(m_ratio*264+sx*25,m_ratio*3); + m_shade->move(m_ratio*255+sx*25,m_ratio*3); if (m_shade2) - m_shade2->move(255+sx*25,3); - QPixmap pixmap(275+sx*25,20); - pixmap.fill("black"); + m_shade2->move(m_ratio*255+sx*25,m_ratio*3); +} + +void PlayListTitleBar::updatePixmap() +{ + int sx = ((m_shaded ? m_pl->width() : width())-275*m_ratio)/25; + QPixmap pixmap(275*m_ratio+sx*25,20*m_ratio); QPainter paint; paint.begin(&pixmap); if (m_shaded) { paint.drawPixmap(0,0,m_skin->getPlPart(Skin::PL_TITLEBAR_SHADED2)); - for (int i = 1; igetPlPart(Skin::PL_TFILL_SHADED)); } @@ -93,31 +101,31 @@ void PlayListTitleBar::drawPixmap(int sx) if (m_active) { if (m_shaded) - paint.drawPixmap(225+sx*25,0,m_skin->getPlPart(Skin::PL_TITLEBAR_SHADED1_A)); + paint.drawPixmap(225*m_ratio+sx*25,0,m_skin->getPlPart(Skin::PL_TITLEBAR_SHADED1_A)); else { paint.drawPixmap(0,0,m_skin->getPlPart(Skin::PL_CORNER_UL_A)); - for (int i = 1; igetPlPart(Skin::PL_TFILL1_A)); } - paint.drawPixmap(100-12+12*sx,0,m_skin->getPlPart(Skin::PL_TITLEBAR_A)); - paint.drawPixmap(250+sx*25,0,m_skin->getPlPart(Skin::PL_CORNER_UR_A)); + paint.drawPixmap((100-12)*m_ratio+12*sx,0,m_skin->getPlPart(Skin::PL_TITLEBAR_A)); + paint.drawPixmap(250*m_ratio+sx*25,0,m_skin->getPlPart(Skin::PL_CORNER_UR_A)); } } else { if (m_shaded) - paint.drawPixmap(275-50+sx*25,0,m_skin->getPlPart(Skin::PL_TITLEBAR_SHADED1_I)); + paint.drawPixmap(225*m_ratio+sx*25,0,m_skin->getPlPart(Skin::PL_TITLEBAR_SHADED1_I)); else { paint.drawPixmap(0,0,m_skin->getPlPart(Skin::PL_CORNER_UL_I)); - for (int i = 1; igetPlPart(Skin::PL_TFILL1_I)); } - paint.drawPixmap(100-12+12*sx,0,m_skin->getPlPart(Skin::PL_TITLEBAR_I)); - paint.drawPixmap(250+sx*25,0,m_skin->getPlPart(Skin::PL_CORNER_UR_I)); + paint.drawPixmap((100-12)*m_ratio+12*sx,0,m_skin->getPlPart(Skin::PL_TITLEBAR_I)); + paint.drawPixmap(250*m_ratio+sx*25,0,m_skin->getPlPart(Skin::PL_CORNER_UR_I)); } } if (m_shaded) @@ -126,20 +134,22 @@ void PlayListTitleBar::drawPixmap(int sx) col.setNamedColor(QString(m_skin->getPLValue("mbbg"))); paint.setBrush(QBrush(col)); paint.setPen(col); - paint.drawRect(8,1, 235 + sx*25, 11); + paint.drawRect(8*m_ratio, m_ratio, 235*m_ratio + sx*25, 11*m_ratio); //draw text paint.setFont(m_font); paint.setPen(QString(m_skin->getPLValue("mbfg"))); - paint.drawText(9, 11, m_truncatedText); + paint.drawText(9*m_ratio, 11*m_ratio, m_truncatedText); } paint.end(); setPixmap(pixmap); } -void PlayListTitleBar::resizeEvent(QResizeEvent *e) +void PlayListTitleBar::resizeEvent(QResizeEvent *) { - truncate(); - drawPixmap((e->size().width()-275)/25); + QFontMetrics metrics(m_font); + m_truncatedText = metrics.elidedText (m_text, Qt::ElideRight, width() - 35*m_ratio); + updatePixmap(); + updatePositions(); } void PlayListTitleBar::mousePressEvent(QMouseEvent* event) @@ -147,30 +157,23 @@ void PlayListTitleBar::mousePressEvent(QMouseEvent* event) switch ((int) event->button ()) { case Qt::LeftButton: - { pos = event->pos(); - - if (m_shaded && (width() - 30) < pos.x() && pos.x() < (width() - 22)) + if (m_shaded && (width() - 30*m_ratio) < pos.x() && pos.x() < (width() - 22*m_ratio)) { m_resize = TRUE; - m_pl->setCursor (Qt::SizeHorCursor); + setCursor (Qt::SizeHorCursor); } - - break; - } case Qt::RightButton: - { m_mw->menu()->exec(event->globalPos()); } - } } void PlayListTitleBar::mouseReleaseEvent(QMouseEvent*) { - Dock::getPointer()->updateDock(); + Dock::instance()->updateDock(); m_resize = FALSE; - m_pl->setCursor (Qt::ArrowCursor); + setCursor (Qt::ArrowCursor); } void PlayListTitleBar::mouseMoveEvent(QMouseEvent* event) @@ -179,17 +182,17 @@ void PlayListTitleBar::mouseMoveEvent(QMouseEvent* event) QPoint oldpos = npos; if (m_shaded && m_resize) { - m_pl->resize((event->x() + 25), m_pl->height()); - resize((event->x() + 25), height()); + resize((event->x() + 25*m_ratio), height()); + m_pl->resize((event->x() + 25*m_ratio), m_pl->height()); } - else if (pos.x() < width() - 30) - Dock::getPointer()->move(m_pl, npos); + else if (pos.x() < width() - 30*m_ratio) + Dock::instance()->move(m_pl, npos); } void PlayListTitleBar::setActive(bool a) { m_active = a; - drawPixmap((width()-275)/25); + updatePixmap(); } @@ -202,17 +205,20 @@ void PlayListTitleBar::setModel(PlayListModel *model) void PlayListTitleBar::readSettings() { QSettings settings (Qmmp::configFile(), QSettings::IniFormat); - QString fontname = settings.value("PlayList/Font","").toString(); - if (fontname.isEmpty ()) - fontname = QFont("Helvetica [Cronyx]", 8).toString(); - m_font.fromString(fontname); + m_font.fromString(settings.value("PlayList/Font", QApplication::font().toString()).toString()); m_font.setPointSize(8); } void PlayListTitleBar::updateSkin() { - drawPixmap((width()-275)/25); setCursor(m_skin->getCursor(Skin::CUR_PTBAR)); + if(m_ratio != m_skin->ratio()) + { + m_ratio = m_skin->ratio(); + setMinimumWidth(275*m_ratio); + updatePositions(); + } + updatePixmap(); } void PlayListTitleBar::shade() @@ -222,7 +228,7 @@ void PlayListTitleBar::shade() if (m_shaded) { m_height = m_pl->height(); - m_pl->setFixedHeight(14); + m_pl->setFixedHeight(14*m_ratio); m_shade->hide(); m_shade2 = new Button(this, Skin::PL_BT_SHADE2_N, Skin::PL_BT_SHADE2_P, Skin::CUR_PWSNORM); m_shade2->move(254,3); @@ -231,7 +237,7 @@ void PlayListTitleBar::shade() } else { - m_pl->setMinimumSize (275,116); + m_pl->setMinimumSize (275*m_ratio,116*m_ratio); m_pl->setMaximumSize (10000,10000); m_pl->resize(width(),m_height); m_shade2->deleteLater(); @@ -241,7 +247,8 @@ void PlayListTitleBar::shade() showCurrent(); update(); if (m_align) - Dock::getPointer()->align(m_pl, m_shaded? -m_height+14: m_height-14); + Dock::instance()->align(m_pl, m_shaded? -m_height+14*m_ratio: m_height-14*m_ratio); + updatePositions(); } void PlayListTitleBar::showCurrent() @@ -259,20 +266,9 @@ void PlayListTitleBar::showCurrent() else m_text.clear(); } - truncate(); - drawPixmap((width()-275)/25); -} -void PlayListTitleBar::truncate() -{ - m_truncatedText = m_text; QFontMetrics metrics(m_font); - bool truncate = FALSE; - while (metrics.width(m_truncatedText) > (this->width() - 35)) - { - truncate = TRUE; - m_truncatedText = m_truncatedText.left(m_truncatedText.length()-1); - } - if (truncate) - m_truncatedText = m_truncatedText.left(m_truncatedText.length()-3).trimmed()+"..."; + m_truncatedText = metrics.elidedText (m_text, Qt::ElideRight, width() - 35*m_ratio); + + updatePixmap(); } diff --git a/src/ui/playlisttitlebar.h b/src/ui/playlisttitlebar.h index c82df5ad3..3762db61c 100644 --- a/src/ui/playlisttitlebar.h +++ b/src/ui/playlisttitlebar.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -52,8 +52,8 @@ private slots: void shade(); private: - void drawPixmap(int); - void truncate(); + void updatePositions(); + void updatePixmap(); Skin *m_skin; QPoint pos; bool m_active; @@ -65,6 +65,7 @@ private: bool m_shaded; bool m_align, m_resize; int m_height; + int m_ratio; PlayListModel* m_model; QString m_text; QString m_truncatedText; diff --git a/src/ui/positionbar.cpp b/src/ui/positionbar.cpp index 378df94a8..12396f713 100644 --- a/src/ui/positionbar.cpp +++ b/src/ui/positionbar.cpp @@ -50,17 +50,16 @@ PositionBar::~PositionBar() void PositionBar::mousePressEvent(QMouseEvent *e) { - m_moving = TRUE; press_pos = e->x(); - if (m_posx() && e->x()x() && e->x()ratio()) { press_pos = e->x()-m_pos; } else { - m_value = convert(qMax(qMin(width()-30,e->x()-15),0)); - press_pos = 15; + m_value = convert(qMax(qMin(width()-30*m_skin->ratio(),e->x()-15*m_skin->ratio()),0)); + press_pos = 15*m_skin->ratio(); if (m_value!=m_old) { emit sliderMoved(m_value); @@ -77,7 +76,7 @@ void PositionBar::mouseMoveEvent (QMouseEvent *e) qint64 po = e->x(); po = po - press_pos; - if (0<=po && po<=width()-30) + if (0<=po && po<=width()-30*m_skin->ratio()) { m_value = convert(po); draw(); @@ -113,15 +112,14 @@ void PositionBar::setMax(qint64 max) void PositionBar::updateSkin() { + resize(m_skin->getPosBar().size()); draw(FALSE); setCursor(m_skin->getCursor(Skin::CUR_POSBAR)); - //setPixmap(m_skin->getPosBar()); - //setButtonPixmap(Skin::BT_POSBAR_N); } void PositionBar::draw(bool pressed) { - qint64 p=qint64(ceil(double(m_value-m_min)*(width()-30)/(m_max-m_min))); + qint64 p=qint64(ceil(double(m_value-m_min)*(width()-30*m_skin->ratio())/(m_max-m_min))); m_pixmap = m_skin->getPosBar(); if (m_max > 0) { @@ -131,11 +129,11 @@ void PositionBar::draw(bool pressed) else paint.drawPixmap(p,0,m_skin->getButton(Skin::BT_POSBAR_N)); } - setPixmap(m_pixmap); + setPixmap(m_pixmap); m_pos = p; } qint64 PositionBar::convert(qint64 p) { - return qint64(ceil(double(m_max-m_min)*(p)/(width()-30)+m_min)); + return qint64(ceil(double(m_max-m_min)*(p)/(width()-30*m_skin->ratio())+m_min)); } diff --git a/src/ui/skin.cpp b/src/ui/skin.cpp index 440a1ab26..177fd4450 100644 --- a/src/ui/skin.cpp +++ b/src/ui/skin.cpp @@ -78,6 +78,7 @@ void Skin::setSkin (const QString& path) { QSettings settings(Qmmp::configFile(), QSettings::IniFormat); m_use_cursors = settings.value("General/skin_cursors", FALSE).toBool(); + m_double_size = settings.value("General/double_size", FALSE).toBool(); settings.setValue("skin_path",path); qDebug ("Skin: using %s",qPrintable(path)); m_skin_dir = QDir (path); @@ -110,6 +111,40 @@ void Skin::setSkin (const QString& path) loadBalance(); loadRegion(); loadCursors(); + if(m_double_size) + { + uint key; + foreach(key, buttons.keys()) + buttons[key] = scalePixmap(buttons[key]); + foreach(key, titlebar.keys()) + titlebar[key] = scalePixmap(titlebar[key]); + foreach(key, m_pl_parts.keys()) + m_pl_parts[key] = scalePixmap(m_pl_parts[key]); + foreach(key, m_eq_parts.keys()) + m_eq_parts[key] = scalePixmap(m_eq_parts[key]); + foreach(key, m_ms_parts.keys()) + m_ms_parts[key] = scalePixmap(m_ms_parts[key]); + foreach(key, m_parts.keys()) + m_parts[key] = scalePixmap(m_parts[key]); + foreach(QChar c, m_letters.keys()) + m_letters[c] = scalePixmap(m_letters[c]); + m_main = scalePixmap(m_main); + posbar = scalePixmap(posbar); + int i; + for(i = 0; i < m_numbers.size(); ++i) + m_numbers[i] = scalePixmap(m_numbers[i]); + + for(i = 0; i < m_eq_bar.size(); ++i) + m_eq_bar[i] = scalePixmap(m_eq_bar[i]); + + for(i = 0; i < m_eq_spline.size(); ++i) + m_eq_spline[i] = scalePixmap(m_eq_spline[i]); + + for(i = 0; i < m_volume.size(); ++i) + m_volume[i] = scalePixmap(m_volume[i]); + for(i = 0; i < m_balance.size(); ++i) + m_balance[i] = scalePixmap(m_balance[i]); + } emit skinChanged(); } @@ -782,6 +817,12 @@ QPixmap * Skin::getDummyPixmap(const QString& name) return 0; } +QPixmap Skin::scalePixmap(const QPixmap &pix, int ratio) +{ + return pix.scaled(pix.width() * ratio, pix.height() * ratio, + Qt::KeepAspectRatio); +} + const QString Skin::findFile(const QString &name, QDir dir) { dir.setFilter (QDir::Files | QDir::Hidden | QDir::NoSymLinks); diff --git a/src/ui/skin.h b/src/ui/skin.h index bb16d7687..adb4b6c20 100644 --- a/src/ui/skin.h +++ b/src/ui/skin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * Based on Promoe, an XMMS2 Client * @@ -41,6 +41,10 @@ public: static Skin *instance(); static QPixmap getPixmap(const QString&, QDir); + int ratio() + { + return m_double_size ? 2 : 1; + } const QPixmap getMain() const { return m_main; @@ -339,6 +343,7 @@ private: * to load pixmap from default skin. */ QPixmap *getDummyPixmap(const QString&); + QPixmap scalePixmap(const QPixmap &pix, int ratio = 2); static Skin *m_instance; QDir m_skin_dir; QMap buttons; @@ -360,6 +365,7 @@ private: QList m_balance; QList m_vis_colors; bool m_use_cursors; + bool m_double_size; void loadMain(); void loadButtons(); diff --git a/src/ui/timeindicator.cpp b/src/ui/timeindicator.cpp index 931e22b90..679edad10 100644 --- a/src/ui/timeindicator.cpp +++ b/src/ui/timeindicator.cpp @@ -26,11 +26,11 @@ #include "skin.h" #include "timeindicator.h" -TimeIndicator::TimeIndicator ( QWidget *parent ) - : PixmapWidget ( parent ) +TimeIndicator::TimeIndicator (QWidget *parent) + : PixmapWidget (parent) { m_skin = Skin::instance(); - m_pixmap = QPixmap ( 65,13 ); + m_pixmap = QPixmap (65 * m_skin->ratio(),13 * m_skin->ratio()); m_elapsed = true; m_time = m_songDuration = 0; readSettings(); @@ -47,34 +47,35 @@ TimeIndicator::TimeIndicator ( QWidget *parent ) void TimeIndicator::setTime ( int t ) { m_time = t; - m_pixmap.fill ( Qt::transparent ); - QPainter paint ( &m_pixmap ); + m_pixmap.fill (Qt::transparent); + int r = m_skin->ratio(); + QPainter paint (&m_pixmap); if (!m_elapsed) { t = m_songDuration - t; - paint.drawPixmap(QPoint(2,0),m_skin->getNumber( 10 )); + paint.drawPixmap(r*2,0,m_skin->getNumber(10)); } if (t < 0) t = 0; - paint.drawPixmap(QPoint(13,0),m_skin->getNumber( t/600%10 )); - paint.drawPixmap(QPoint(26,0),m_skin->getNumber( t/60%10 )); - paint.drawPixmap(QPoint(43,0),m_skin->getNumber( t%60/10 )); - paint.drawPixmap(QPoint(56,0),m_skin->getNumber( t%60%10 )); + paint.drawPixmap(r*13,0,m_skin->getNumber(t/600%10)); + paint.drawPixmap(r*26,0,m_skin->getNumber(t/60%10)); + paint.drawPixmap(r*43,0,m_skin->getNumber(t%60/10)); + paint.drawPixmap(r*56,0,m_skin->getNumber(t%60%10)); - setPixmap ( m_pixmap ); + setPixmap (m_pixmap); } void TimeIndicator::reset() { - m_pixmap.fill ( Qt::transparent ); - QPainter paint ( &m_pixmap ); - setPixmap ( m_pixmap ); + m_pixmap.fill (Qt::transparent); + QPainter paint (&m_pixmap); + setPixmap (m_pixmap ); } -void TimeIndicator::mousePressEvent(QMouseEvent* e ) +void TimeIndicator::mousePressEvent(QMouseEvent* e) { if (m_needToShowTime && e->button() & Qt::LeftButton) { @@ -97,6 +98,7 @@ TimeIndicator::~TimeIndicator() void TimeIndicator::updateSkin() { + m_pixmap = QPixmap (65 * m_skin->ratio(),13 * m_skin->ratio()); if (m_needToShowTime) setTime(m_time); } @@ -109,7 +111,6 @@ void TimeIndicator::readSettings() settings.endGroup(); } - void TimeIndicator::writeSettings() { QSettings settings(Qmmp::configFile(), QSettings::IniFormat); @@ -118,11 +119,9 @@ void TimeIndicator::writeSettings() settings.endGroup(); } - void TimeIndicator::setNeedToShowTime(bool need) { m_needToShowTime = need; - //if (!need) reset(); if (!need) m_timer->start(); else diff --git a/src/ui/titlebar.cpp b/src/ui/titlebar.cpp index cd92c24d3..130d46d28 100644 --- a/src/ui/titlebar.cpp +++ b/src/ui/titlebar.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -30,6 +30,7 @@ #include "dock.h" #include "titlebarcontrol.h" #include "shadedvisual.h" +#include "display.h" #include "titlebar.h" // TODO skin cursor with shade mode @@ -39,32 +40,30 @@ TitleBar::TitleBar(QWidget *parent) m_align = FALSE; m_skin = Skin::instance(); setPixmap(m_skin->getTitleBar(Skin::TITLEBAR_A)); - m_mw = qobject_cast(parent); + m_mw = qobject_cast(parent->parent()); m_shaded = FALSE; + m_shade2 = 0; m_currentTime = 0; + m_control = 0; + m_visual = 0; //buttons m_menu = new Button(this,Skin::BT_MENU_N,Skin::BT_MENU_P, Skin::CUR_MAINMENU); connect(m_menu,SIGNAL(clicked()),this,SLOT(showMainMenu())); m_menu->move(6,3); m_minimize = new Button(this,Skin::BT_MINIMIZE_N,Skin::BT_MINIMIZE_P, Skin::CUR_MIN); - m_minimize->move(244,3); connect(m_minimize, SIGNAL(clicked()), m_mw, SLOT(showMinimized())); m_shade = new Button(this,Skin::BT_SHADE1_N,Skin::BT_SHADE1_P, Skin::CUR_WINBUT); - m_shade->move(254,3); connect(m_shade, SIGNAL(clicked()), SLOT(shade())); m_close = new Button(this,Skin::BT_CLOSE_N,Skin::BT_CLOSE_P, Skin::CUR_CLOSE); - m_close->move(264,3); connect(m_close, SIGNAL(clicked()), m_mw, SLOT(handleCloseRequest())); setActive(FALSE); connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin())); - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); if (settings.value("Display/shaded", FALSE).toBool()) shade(); - else - updateMask(); m_align = TRUE; setCursor(m_skin->getCursor(Skin::CUR_TITLEBAR)); + updatePositions(); } TitleBar::~TitleBar() @@ -73,13 +72,30 @@ TitleBar::~TitleBar() settings.setValue("Display/shaded", m_shaded); } +void TitleBar::updatePositions() +{ + int r = m_skin->ratio(); + m_menu->move(r*6, r*3); + m_minimize->move(r*244, r*3); + m_shade->move(r*254, r*3); + m_close->move(r*264, r*3); + if(m_shade2) + m_shade2->move(r*254, r*3); + if(m_currentTime) + m_currentTime->move(r*127, r*4); + if(m_control) + m_control->move(r*168, r*2); + if(m_visual) + m_visual->move(r*79,r*5); +} + void TitleBar::mousePressEvent(QMouseEvent* event) { switch ((int) event->button ()) { case Qt::LeftButton: m_pos = event->pos(); - Dock::getPointer()->calculateDistances(); + Dock::instance()->calculateDistances(); break; case Qt::RightButton: m_mw->menu()->exec(event->globalPos()); @@ -88,14 +104,14 @@ void TitleBar::mousePressEvent(QMouseEvent* event) void TitleBar::mouseReleaseEvent(QMouseEvent*) { - Dock::getPointer()->updateDock(); + Dock::instance()->updateDock(); } void TitleBar::mouseMoveEvent(QMouseEvent* event) { - if (m_pos.x() < width() - 37) + if (m_pos.x() < width() - m_skin->ratio() * 37) { QPoint npos = (event->globalPos()-m_pos); - Dock::getPointer()->move(m_mw, npos); + Dock::instance()->move(m_mw, npos); } } @@ -120,8 +136,8 @@ void TitleBar::setActive(bool a) void TitleBar::updateSkin() { setActive(FALSE); - updateMask(); setCursor(m_skin->getCursor(Skin::CUR_TITLEBAR)); + updatePositions(); } void TitleBar::showMainMenu() @@ -132,37 +148,31 @@ void TitleBar::showMainMenu() void TitleBar::shade() { m_shaded = !m_shaded; - + int r = m_skin->ratio(); if (m_shaded) { - m_mw->setFixedSize(275,14); setPixmap(m_skin->getTitleBar(Skin::TITLEBAR_SHADED_A)); m_shade->hide(); m_shade2 = new Button(this,Skin::BT_SHADE2_N, Skin::BT_SHADE2_P, Skin::CUR_WSNORMAL); - m_shade2->move(254,3); connect(m_shade2, SIGNAL(clicked()), SLOT(shade())); m_shade2->show(); m_currentTime = new SymbolDisplay(this, 6); - m_currentTime->move(127,4); m_currentTime->show(); m_currentTime->display("--:--"); m_control = new TitleBarControl(this); - m_control->move(168,2); m_control->show(); - connect (m_control, SIGNAL (nextClicked()), parent(), SLOT (next())); - connect (m_control, SIGNAL (previousClicked()), parent(), SLOT (previous())); - connect (m_control, SIGNAL (playClicked()), parent(), SLOT (play())); - connect (m_control, SIGNAL (pauseClicked()), parent(), SLOT (pause())); - connect (m_control, SIGNAL (stopClicked()), parent(), SLOT (stop())); - connect (m_control, SIGNAL (ejectClicked()), parent(), SLOT (addFile())); + connect (m_control, SIGNAL (nextClicked()), m_mw, SLOT (next())); + connect (m_control, SIGNAL (previousClicked()), m_mw, SLOT (previous())); + connect (m_control, SIGNAL (playClicked()), m_mw, SLOT (play())); + connect (m_control, SIGNAL (pauseClicked()), m_mw, SLOT (pause())); + connect (m_control, SIGNAL (stopClicked()), m_mw, SLOT (stop())); + connect (m_control, SIGNAL (ejectClicked()), m_mw, SLOT (addFile())); m_visual = new ShadedVisual(this); Visual::add(m_visual); m_visual->show(); - m_visual->move(79,5); } else { - m_mw->setFixedSize(275,116); setPixmap(m_skin->getTitleBar(Skin::TITLEBAR_A)); m_shade2->deleteLater(); m_currentTime->deleteLater(); @@ -171,11 +181,14 @@ void TitleBar::shade() m_visual->deleteLater(); m_shade2 = 0; m_currentTime = 0; + m_control = 0; + m_visual = 0; m_shade->show(); } + qobject_cast (parent())->setMinimalMode(m_shaded); if (m_align) - Dock::getPointer()->align(m_mw, m_shaded? -102: 102); - updateMask(); + Dock::instance()->align(m_mw, m_shaded? -r*102: r*102); + updatePositions(); } QString TitleBar::formatTime ( int sec ) @@ -202,11 +215,3 @@ void TitleBar::setTime(qint64 time) m_currentTime->display(formatTime(time/1000)); } -void TitleBar::updateMask() -{ - m_mw->clearMask(); - m_mw->setMask(QRegion(0,0,m_mw->width(),m_mw->height())); - QRegion region = m_skin->getRegion(m_shaded? Skin::WINDOW_SHADE : Skin::NORMAL); - if (!region.isEmpty()) - m_mw->setMask(region); -} diff --git a/src/ui/titlebar.h b/src/ui/titlebar.h index d7c1f5fca..a4b036fba 100644 --- a/src/ui/titlebar.h +++ b/src/ui/titlebar.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by Ilya Kotov * + * Copyright (C) 2007-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -27,18 +27,17 @@ #include "playlist.h" #include "mainwindow.h" -/** - @author Ilya Kotov -*/ class MainWindow; class QMouseEvent; - class Skin; class Button; class SymbolDisplay; class TitleBarControl; class ShadedVisual; +/** + @author Ilya Kotov +*/ class TitleBar : public PixmapWidget { Q_OBJECT @@ -48,7 +47,6 @@ public: ~TitleBar(); void setActive(bool); - //void setInfo(const OutputState &st); public slots: void setTime(qint64 time); @@ -73,7 +71,7 @@ private: bool m_align; TitleBarControl *m_control; ShadedVisual *m_visual; - void updateMask(); + void updatePositions(); protected: void mousePressEvent(QMouseEvent*); diff --git a/src/ui/translations/qmmp_cs.ts b/src/ui/translations/qmmp_cs.ts index 94d6b13e3..e574a6943 100644 --- a/src/ui/translations/qmmp_cs.ts +++ b/src/ui/translations/qmmp_cs.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Povoleno - - - - - + + + + + Description Popis - - - - - + + + + + Filename Soubor - + Artist Umělec - + Album Album - + Title Název - + Track number Číslo stopy - + Disc number Číslo disku - + Composer Skladatel - + File name Název souboru - + File path Cesta k souboru - + Genre Žánr - + Year Rok - + Comment Komentář @@ -266,7 +266,7 @@ - + Playlist Seznam skladeb @@ -314,7 +314,7 @@ - + ... ... @@ -334,63 +334,68 @@ - + + Double size + + + + Metadata Metadata - + Load metadata from files Číst ze souborů metadata - + Song Display Zobrazení skladby - + Title format: Formát titulku: - + Show song numbers Zobrazit čísla skladeb - + Preferences Nastavení - - + + Information Informace - + Input Vstup - + Output Výstup - + Compatibility Kompatibilita - + Openbox compatibility Kompatibilita s Openbox - + Close Zavřít @@ -400,112 +405,112 @@ Síť - + File Dialog Souborový dialog - + Proxy Proxy - + Enable proxy usage Povolit používání proxy - + Proxy host name: Adresa proxy: - + Proxy port: Port proxy: - + Use authentication with proxy Použít autorizaci pro proxy - + Proxy user name: Uživatelské jméno: - + Proxy password: Heslo: - + Archived skin Sbalené téma - + Unarchived skin Rozbalené téma - + Visualization Vizualizace - + Effects Efekty - + General Obecné - + Audio Zvuk - + Use software volume control Používat softwarové ovládání hlasitosti - + Visibility Control Viditelnost - + Hide on close Skrýt při zavření - + Start hidden Spustit skryté - + Convert underscores to blanks Převést podtržítka na mezery - + Convert %20 to blanks Převést %20 na mezery - + Select Skin Files Vybrat soubory s tématy - + Skin files Soubory s tématy @@ -520,29 +525,29 @@ Obnovit - + Show protocol Zobrazit protokol - + Transparency Průhlednost - + Main window Hlavní okno - - - + + + 0 0 - + Equalizer Ekvalizér @@ -550,53 +555,53 @@ EqWidget - - + + preset předvolba - + &Load/Delete &Načíst/Odstranit - + &Save Preset &Uložit předvolbu - + &Save Auto-load Preset Uložit &automatickou předvolbu - + &Import &Importovat - + &Clear &Vynulovat - + Saving Preset Uložení předvolby - + Preset name: Název předvolby: - + preset # předvolba # - + Import Preset Importovat předvolbu @@ -645,62 +650,62 @@ MainDisplay - + Previous Předchozí - + Play Přehrát - + Pause Pozastavit - + Stop Zastavit - + Next Další - + Add file Přidat soubor - + Equalizer Ekvalizér - + Playlist Seznam skladeb - + Repeat playlist Opakovat seznam skladeb - + Shuffle Zamíchat - + Volume Hlasitost - + Balance Vyvážení @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Režim vizualizace - + Analyzer Frekvenční analýza - + Scope Osciloskop - + Off Vypnuto - + Analyzer Mode Režim analýzy - + Normal Normální - + Fire Oheň - + Vertical Lines Sloupce - + Lines Úzké - + Bars Široké - + Peaks Špičky - + Refresh Rate Obnovovací frekvence - + 50 fps 50 Hz - + 25 fps 25 Hz - + 10 fps 10 Hz - + 5 fps 5 Hz - + Analyzer Falloff Pokles analyzátoru - - + + Slowest Nejpomalejší - - + + Slow Pomalý - - + + Medium Střední - - + + Fast Rychlý - - + + Fastest Nejrychlejší - + Peaks Falloff Pokles špiček - + Background Pozadí - + Transparent Průhledné @@ -842,173 +847,173 @@ MainWindow - + Default Seznam - + Choose a directory Výběr adresáře - + Select one or more files to open Vyberte jeden či více souborů k otevření - + &Play Pře&hrát - + X X - + &Pause Pau&za - + C C - + &Stop &Stop - + V V - + &Previous &Předchozí - + Z Z - + &Next &Další - + B B - + &Jump To File Přeskočit na soubo&r - + J J - + &Settings &Nastavení - + Ctrl+P Ctrl+P - + &About O &aplikaci - + &Exit U&končit - + Ctrl+Q Ctrl+Q - - + + Playlist Files Seznamy skladeb - + Open Playlist Načíst seznam skladeb - + Save Playlist Uložit seznam skladeb - + Space Mezerník - + &About Qt O knihovně &Qt - + &Play/Pause &Přehrát/Pauza - + All Supported Bitstreams Všechny podporované formáty - + &Repeat Track &Opakovat stopu - + &Shuffle Za&míchat - + R O - + Ctrl+R Ctrl+R - + S M - + &Repeat Playlist &Opakovat seznam skladeb - + Tools Nástroje @@ -1016,194 +1021,194 @@ PlayList - + &Add File Přidat &soubor - + F F - + &Add Directory Přidat &adresář - + D D - + &Remove Selected &Odstranit vybrané - + Del Del - + &Remove All Odstranit &vše - + &Remove Unselected Odstranit &nevybrané - + Remove unavailable files Odstranit nedostupné soubory - + &View Track Details Zobrazit &informace o skladbě - + Alt+I Alt+I - + Sort List Seřadit seznam - - + + By Title Podle názvu skladby - - + + By Album - - + + By Artist - - + + By Filename Podle názvu souboru - - + + By Path + Filename Podle cesty a názvu souboru - - + + By Date Podle data - + Sort Selection Seřadit výběr - + Randomize List Zamíchat seznam - + Reverse List Obrátit pořadí seznamu - + Invert Selection Invertovat výběr - + &Select None &Zrušit výběr - + &Select All &Vybrat vše - + Ctrl+A Ctrl+A - + &New List &Nový seznam - + Shift+N Shift+N - + &Load List Načíst &seznam - + O O - + &Save List &Uložit seznam - + Shift+S Shift+S - + &Add Url Přidat &URL - + U U - - + + By Track Number Podle čísla skladby - + &Queue &Fronta - + Q Q - + Actions Činnosti diff --git a/src/ui/translations/qmmp_de.ts b/src/ui/translations/qmmp_de.ts index 4d8f4a336..8a6e10ac0 100644 --- a/src/ui/translations/qmmp_de.ts +++ b/src/ui/translations/qmmp_de.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Aktiviert - - - - - + + + + + Description Beschreibung - - - - - + + + + + Filename Dateiname - + Artist Interpret - + Album Album - + Title Titel - + Track number Stücknummer - + Disc number CD-Nummer - + Genre Genre - + Composer Komponist - + File name Dateiname - + File path Dateipfad - + Year Jahr - + Comment Kommentar @@ -266,7 +266,7 @@ - + Playlist Wiedergabeliste @@ -314,7 +314,7 @@ - + ... ... @@ -334,63 +334,68 @@ - + + Double size + + + + Metadata Metadaten - + Load metadata from files Metadaten aus Dateien laden - + Song Display Titelanzeige - + Title format: Titelformat: - + Show song numbers Titelnummern anzeigen - + Preferences Konfiguration - - + + Information Information - + Input Eingabe - + Output Ausgabe - + Compatibility Kompatibilität - + Openbox compatibility Openbox-Kompatibilität - + Close Schließen @@ -400,112 +405,112 @@ Verbindung - + File Dialog Datei-Dialog - + Proxy Proxyserver - + Enable proxy usage Proxyserver verwenden - + Proxy host name: Name des Proxyservers: - + Proxy port: Port: - + Use authentication with proxy Authentisierung verwenden - + Proxy user name: Benutzername: - + Proxy password: Passwort: - + Archived skin Archiviertes Design - + Unarchived skin Nicht archiviertes Design - + Visualization Visualisierung - + Effects Effekte - + General Sonstige - + Audio Audio - + Use software volume control Softwaregesteuerte Lautstärkeregelung - + Visibility Control Tray-Steuerung - + Hide on close Beim Schließen in den Systemabschnitt der Kontrollleiste minimieren - + Start hidden Minimiert starten - + Convert underscores to blanks Unterstriche in Leerzeichen umwandeln - + Convert %20 to blanks %20 in Leerzeichen umwandeln - + Select Skin Files Design-Dateien auswählen - + Skin files Design-Dateien @@ -520,29 +525,29 @@ Aktualisieren - + Show protocol Protokoll anzeigen - + Transparency Transparenz - + Main window Hauptfenster - - - + + + 0 0 - + Equalizer Equalizer @@ -550,53 +555,53 @@ EqWidget - - + + preset Voreinstellung - + &Load/Delete &Laden/Löschen - + &Save Preset &Voreinstellung speichern - + &Save Auto-load Preset &Automatische Voreinstellungen speichern - + &Import &Importieren - + &Clear &Zurücksetzen - + Saving Preset Voreinstellung speichern - + Preset name: Name der Voreinstellung: - + preset # Voreinstellung # - + Import Preset Voreinstellung importieren @@ -645,62 +650,62 @@ MainDisplay - + Previous Vorheriger Titel - + Play Wiedergabe - + Pause Pause - + Stop Stopp - + Next Nächster Titel - + Add file Datei hinzufügen - + Equalizer Equalizer - + Playlist Wiedergabeliste - + Repeat playlist Wiedergabeliste wiederholen - + Shuffle Zufallswiedergabe - + Volume Lautstärke - + Balance Balance @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Visualisierungsmodus - + Analyzer Analyzer - + Scope Oszilloskop - + Off Aus - + Analyzer Mode Analyzer-Modus - + Normal Normal - + Fire Feuer - + Vertical Lines Vertikale Linien - + Lines Linien - + Bars Balken - + Peaks Spitzen - + Refresh Rate Wiederholfrequenz - + 50 fps 50 fps - + 25 fps 25 fps - + 10 fps 10 fps - + 5 fps 5 fps - + Analyzer Falloff Analyzer-Abfall - - + + Slowest Sehr langsam - - + + Slow Langsam - - + + Medium Mittel - - + + Fast Schnell - - + + Fastest Sehr schnell - + Peaks Falloff Peaks-Abfall - + Background Hintergrund - + Transparent Transparent @@ -842,173 +847,173 @@ MainWindow - + Default Standard - + Choose a directory Verzeichnis wählen - + Select one or more files to open Dateien hinzufügen - + &Play &Wiedergabe - + X X - + &Pause &Pause - + C C - + &Stop &Stopp - + V V - + &Previous &Vorheriger Titel - + Z Z - + &Next &Nächster Titel - + B B - + &Jump To File Springe zu &Titel - + J J - + &Settings &Einstellungen - + Ctrl+P Strg+P - + &About Ü&ber - + &Exit Be&enden - + Ctrl+Q Strg+Q - - + + Playlist Files Wiedergabelisten - + Open Playlist Wiedergabeliste öffnen - + Save Playlist Wiedergabeliste speichern - + Space Leertaste - + &About Qt Übe&r Qt - + &Play/Pause Wieder&gabe/Pause - + All Supported Bitstreams Alle unterstützten Formate - + &Repeat Track Tite&l wiederholen - + &Shuffle &Zufallswiedergabe - + R R - + Ctrl+R Strg+R - + S S - + &Repeat Playlist W&iedergabeliste wiederholen - + Tools Werkzeuge @@ -1016,194 +1021,194 @@ PlayList - + &Add File &Datei hinzufügen - + F F - + &Add Directory &Verzeichnis hinzufügen - + D D - + &Remove Selected &Ausgewählte entfernen - + Del Entf - + &Remove All Alle &entfernen - + &Remove Unselected &Nicht ausgewählte entfernen - + Remove unavailable files Nichtverfügbare Dateien entfernen - + &View Track Details &Titeldetails anzeigen - + Alt+I Alt+I - + Sort List Wiedergabeliste sortieren - - + + By Title Nach Titel - - + + By Album - - + + By Artist - - + + By Filename Nach Dateinamen - - + + By Path + Filename Nach Pfad + Dateinamen - - + + By Date Nach Datum - + Sort Selection Auswahl sortieren - + Randomize List Wiedergabeliste mischen - + Reverse List Wiedergabeliste umkehren - + Invert Selection Auswahl umkehren - + &Select None &Auswahl aufheben - + &Select All Alle aus&wählen - + Ctrl+A Strg+A - + &New List &Neue Wiedergabeliste - + Shift+N Umschalt+N - + &Load List Wiedergabeliste &laden - + O O - + &Save List Wiedergabeliste &speichern - + Shift+S Umschalt+S - + &Add Url &URL hinzufügen - + U U - - + + By Track Number Nach Titelnummer - + &Queue &Warteschlange - + Q Q - + Actions Aktionen diff --git a/src/ui/translations/qmmp_it.ts b/src/ui/translations/qmmp_it.ts index 27bf464ec..1dd459f59 100644 --- a/src/ui/translations/qmmp_it.ts +++ b/src/ui/translations/qmmp_it.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Attivo - - - - - + + + + + Description Descrizione - - - - - + + + + + Filename File - + Artist Interprete - + Album Album - + Title Titolo - + Track number - + Disc number - + Genre Genere - + Composer - + File name - + File path - + Year Anno - + Comment Commento @@ -288,48 +288,48 @@ - + ... ... - + Metadata Metadati - + Load metadata from files Carica i metadati dai brani - + Song Display Mostra il brano - + Title format: Formato del titolo : - + Input Entrata - + Output Uscita - + Preferences Impostazioni preferite - - + + Information Informazioni @@ -340,7 +340,7 @@ - + Playlist Lista dei brani @@ -355,17 +355,17 @@ Avanzato - + Close Chiudi - + Archived skin Tema archiviato - + Unarchived skin Tema non archiviato @@ -375,27 +375,27 @@ Connettività - + Visualization Visualizzazione - + Effects Effetti - + General Generale - + File Dialog Menu brani - + Audio Audio @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers - + Use software volume control Utilizza il controllo volume del programma - + Visibility Control Controllo dell'aspetto - + Hide on close Nascondi alla chiusura - + Start hidden Avvia nascosto - + Compatibility Compatibilità - + Openbox compatibility Compatibilità openbox - + Proxy Proxy - + Enable proxy usage Attiva il proxy - + Proxy host name: Nome del server : - + Proxy port: Porta del server : - + Use authentication with proxy Usa autenticazione con il proxy - + Proxy user name: Utente: - + Proxy password: Password : - + Convert underscores to blanks Converti il carattere « _ » in spazi - + Convert %20 to blanks Converti il carattere « %20 » in spazi - + Select Skin Files Seleziona aspetto - + Skin files Aspetto @@ -520,29 +525,29 @@ Aggiorna - + Show protocol Motra protocollo - + Transparency Transparenza - + Main window Finestra principale - - - + + + 0 0 - + Equalizer Equalizzatore @@ -550,53 +555,53 @@ EqWidget - - + + preset Impostazione - + &Load/Delete &Carica/Elimina - + &Save Preset &Salva preimpostazione - + &Save Auto-load Preset &Salvare preimpostazioni caricate automaticamente - + &Clear &Cancella - + Saving Preset Salvataggio preimpostazioni - + Preset name: Nome delle preimpostazioni: - + preset # Preimpostazione # - + &Import &Importa - + Import Preset Importa preimpostazione @@ -645,62 +650,62 @@ MainDisplay - + Previous Brano precedente - + Play Esegui - + Pause Sospendi - + Stop Ferma - + Next Brano successivo - + Add file Aggiungi brani - + Equalizer Equalizzatore - + Playlist Lista brani - + Repeat playlist Ripeti la lista brani - + Shuffle Ordine casuale - + Volume Volume - + Balance Bilanciamento @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Modo visualizzazione - + Analyzer Analizzatore - + Scope Oscilloscopio - + Off Chiudi - + Analyzer Mode Modo analizzatore - + Normal Normale - + Fire Fuoco - + Vertical Lines Linee verticali - + Lines Linee - + Bars Barre - + Peaks Picchi - + Refresh Rate Velocità di aggiornamento - + 50 fps 50 fps - + 25 fps 25 fps - + 10 fps 10 fps - + 5 fps 5 fps - + Analyzer Falloff Ricaduta analizzatore - - + + Slowest Molto lenta - - + + Slow Lenta - - + + Medium Media - - + + Fast Rapida - - + + Fastest Molto veloce - + Peaks Falloff Ricadua picchi - + Background Sfondo - + Transparent Transparente @@ -842,173 +847,173 @@ MainWindow - + Default Défault - + Choose a directory Scegliere una cartella - + Select one or more files to open Seleziona uno o più brani da aprire - + &Play &Esegui - + X X - + &Pause &Pausa - + C C - + &Stop &Arresta - + V V - + &Previous &Precedente - + Z Z - + &Next &Successivo - + B B - + &Jump To File &Vai al brano - + J J - + &Settings &Configurazione - + Ctrl+P Ctrl+P - + &Exit &Esci - + Ctrl+Q Ctrl+Q - + Open Playlist Apri lista di brani - + Save Playlist Salva lista di brani - + &About &Informazioni - - + + Playlist Files Brani della lista - + Space Spazio - + &About Qt &Informazioni su Qt - + &Play/Pause &Esegui / Pausa - + All Supported Bitstreams Elenco di tutti i tipi di flusso accettati - + &Repeat Track &Ripeti brano - + &Shuffle &Ordine casuale - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist &Ripeti lista brani - + Tools Strumenti @@ -1016,194 +1021,194 @@ PlayList - + F F - + D D - + Alt+I Alt+I - + Ctrl+A Ctrl+A - + O O - + &Add File &Aggiungi brani - + &Add Directory &Aggiungi cartelle - + &Remove Selected &Elimina la selezione - + &Remove All &Elimina tutto - + &Remove Unselected &Elimina i non selezionati - + Remove unavailable files Rimuovi files non disponibili - + &View Track Details &Dettagli della traccia - + Sort List Riordina la lista - - + + By Title Per titolo - - + + By Album - - + + By Artist - - + + By Filename Per titolo del brano - - + + By Path + Filename per percorso più titolo del brano - - + + By Date Per data - + Sort Selection Riordina la selezione - + Randomize List Mescola i brnai della lista - + Reverse List Inverti la lista - + Invert Selection Inverti la selezione - + &Select None &Non scegliere alcun brano - + &Select All &Seleziona tutto - + &New List &Nuova lista - + Shift+N Shift+N - + &Load List &Carica lista - + &Save List &Salva lista - + Shift+S Shift+S - + Del Canc - + &Add Url &Aggiungi URL - + U U - - + + By Track Number Per numero di traccia - + &Queue &Metti in coda - + Q Q - + Actions Azioni diff --git a/src/ui/translations/qmmp_lt.ts b/src/ui/translations/qmmp_lt.ts index 3b96c6904..e29dd4ce9 100644 --- a/src/ui/translations/qmmp_lt.ts +++ b/src/ui/translations/qmmp_lt.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Įjungtas - - - - - + + + + + Description Aprašymas - - - - - + + + + + Filename Bylos pavadinimas - + Artist Atlikėjas - + Album Albumas - + Title Pavadinimas - + Track number - + Disc number - + Composer - + File name - + File path - + Genre Žanras - + Year Metai - + Comment Komentaras @@ -288,48 +288,48 @@ - + ... ... - + Metadata Meta duomenys - + Load metadata from files Įkelti meta duomenis iš bylų - + Song Display Dainų sąrašas - + Title format: Pavadinimo formatas: - + Input Įvestis - + Output Išvestis - + Preferences Nustatymai - - + + Information Informacija @@ -340,7 +340,7 @@ - + Playlist Grojaraštis @@ -355,17 +355,17 @@ Papildomi - + Close Užverti - + Archived skin Suspausta tema - + Unarchived skin Išskleista tema @@ -375,27 +375,27 @@ Tinklas - + Visualization Vizualizacija - + Effects Efektai - + General Bendri - + File Dialog Pasirinkimo langas - + Audio Audio @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers Rodyti takelių numerius - + Use software volume control Naudoti programinį garso valdymą - + Visibility Control Matomumo valdymas - + Hide on close Paslėpti išjungus - + Start hidden Įjungti paslėptą - + Compatibility Suderinamumas - + Openbox compatibility Openbox suderinamumas - + Proxy Proxy - + Enable proxy usage Įjungti proxy palaikymą - + Proxy host name: Proxy serveris: - + Proxy port: Proxy portas: - + Use authentication with proxy Naudoti proxy autentifikavimą - + Proxy user name: Proxy vartotojo vardas: - + Proxy password: Proxy slaptažodis: - + Convert underscores to blanks Convert underscores to blanks - + Convert %20 to blanks Konvertuoti %20 į tarpus - + Select Skin Files Pasirinkti temų bylas - + Skin files Temų bylos @@ -520,29 +525,29 @@ Atnaujinti - + Show protocol Rodyti protokolą - + Transparency Permatomumas - + Main window Pagrindinis langas - - - + + + 0 - + Equalizer Glodintuvas @@ -550,53 +555,53 @@ EqWidget - - + + preset Nustatymas - + &Load/Delete &Įkelti/Pašalinti - + &Save Preset &Išsaugoti nustatymus - + &Save Auto-load Preset &Išsaugoti auto-nustatymą - + &Clear &išvalyti - + Saving Preset Išsaugojamas nustatymas - + Preset name: Nustatymo pavadinimas: - + preset # Nustatymas # - + &Import &Importuoti - + Import Preset Importuoti nustatymus @@ -645,62 +650,62 @@ MainDisplay - + Previous Ankstesnis - + Play Groti - + Pause Pristabdyti - + Stop Sustoti - + Next Sekantis - + Add file Pridėti bylą - + Equalizer Glotintuvas - + Playlist Grojaraštis - + Repeat playlist Gartoti grojaraštį - + Shuffle Atsitiktine tvarka - + Volume Garsumas - + Balance Balansas @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Vizualizacijos metodas - + Analyzer Analizatorius - + Scope Scope - + Off Išjungta - + Analyzer Mode Analizatoriaus metodas - + Normal Įprastinis - + Fire Ugnis - + Vertical Lines Vertikalios linijos - + Lines Linijos - + Bars Bangos - + Peaks Pikai - + Refresh Rate Atnaujinimo dažnumas - + 50 fps - + 25 fps - + 10 fps - + 5 fps - + Analyzer Falloff Analyzer Falloff - - + + Slowest Lėčiausias - - + + Slow Lėtas - - + + Medium - - + + Fast Greitas - - + + Fastest Greičiausias - + Peaks Falloff Peaks Falloff - + Background Fonas - + Transparent Permatomumas @@ -842,173 +847,173 @@ MainWindow - + Default - + Choose a directory Pasirinkite aplanką - + Select one or more files to open Pasirinkite vieną ar kelias bylas atvėrimui - + &Play &Groti - + X - + &Pause &Pristabdyti - + C - + &Stop &Sustabdyti - + V - + &Previous &Ankstesnis - + Z - + &Next &Sekantis - + B - + &Jump To File &Pereiti prie bylos - + J - + &Settings &Nustatymai - + Ctrl+P - + &Exit &Išeiti - + Ctrl+Q - + Open Playlist Atverti grojaraštį - + Save Playlist Išsaugoti grojaraštį - + &About &Apie - - + + Playlist Files Grojaraščio bylos - + Space - + &About Qt &Apie Qt - + &Play/Pause &Groti/Pristabdyti - + All Supported Bitstreams Palaikomi bylų tipai - + &Repeat Track &Kartoti takelį - + &Shuffle &Atsitiktine tvarka - + R - + Ctrl+R - + S - + &Repeat Playlist &Kartoti grojaraštį - + Tools Įrankiai @@ -1016,194 +1021,194 @@ PlayList - + F - + D - + Alt+I - + Ctrl+A - + O - + &Add File &Pridėti bylą - + &Add Directory &Pridėti aplanką - + &Remove Selected &Pašalinti pasirinktus - + &Remove All &Pašalinti visus - + &Remove Unselected &Pašalinti NEpasirinktus - + Remove unavailable files - + &View Track Details &Takelio informacija - + Sort List Rūšiuoti - - + + By Title Pagal dainos pavadinimą - - + + By Album - - + + By Artist - - + + By Filename Pagal bylos pavadinimą - - + + By Path + Filename Pagal kelią iki bylos - - + + By Date Pagal datą - + Sort Selection Rūšiuoti pasirinktus - + Randomize List Sumaišyti sąrašą - + Reverse List Apversti - + Invert Selection Atšaukti pasirinkimą - + &Select None &Nepasirinkti nei vieno - + &Select All &Pasirinkti visus - + &New List &Naujas sąrašas - + Shift+N - + &Load List &Įkelti sąrašą - + &Save List &Išsaugoti sąrašą - + Shift+S - + Del - + &Add Url &Pridėti interneto adresą - + U - - + + By Track Number Pagal takelio numerį - + &Queue &Į eilę - + Q - + Actions Veiksmai diff --git a/src/ui/translations/qmmp_pl_PL.ts b/src/ui/translations/qmmp_pl_PL.ts index 2903bb7da..ca488dc3f 100644 --- a/src/ui/translations/qmmp_pl_PL.ts +++ b/src/ui/translations/qmmp_pl_PL.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Włączone - - - - - + + + + + Description Opis - - - - - + + + + + Filename Nazwa pliku - + Artist Artysta - + Album Album - + Title Tytuł - + Track number Numer utworu - + Disc number Numer albumu - + Genre Gatunek - + Composer Kompozytor - + File name Nazwa pliku - + File path Lokalizacja - + Year Rok - + Comment Komentarz @@ -288,48 +288,48 @@ - + ... ... - + Metadata Metadane - + Load metadata from files Załaduj metadane z pliku - + Song Display Wyświetlanie utworu - + Title format: Format tytułu: - + Input Wejście - + Output Wyjście - + Preferences Ustawienia - - + + Information Informacje @@ -340,7 +340,7 @@ - + Playlist Lista odtwarzania @@ -355,17 +355,17 @@ Zaawansowane - + Close Zamknij - + Archived skin Skompresowana skórka - + Unarchived skin Niekompresowana skórka @@ -375,27 +375,27 @@ Sieć - + Visualization Wizualizacje - + Effects Efekty - + General Ogólne - + File Dialog Okno dialogowe - + Audio Dźwięk @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers Wyświetl numery utworów na liście odtwarzania - + Use software volume control Użyj programowej regulacji głośności - + Visibility Control Sterowanie - + Hide on close Zminimalizuj przy zamykaniu - + Start hidden Uruchom zminimalizowany - + Compatibility Kompatybilność - + Openbox compatibility Zgodność z Openbox - + Proxy Proxy - + Enable proxy usage Włącz proxy - + Proxy host name: Nazwa hosta proxy: - + Proxy port: Port proxy: - + Use authentication with proxy Użyj autoryzacji z proxy - + Proxy user name: Nazwa użytkownika: - + Proxy password: Hasło: - + Convert underscores to blanks Konwertuj podkreślenia na spacje - + Convert %20 to blanks Konwertuj sekwencje %20 na spacje - + Select Skin Files Wybierz skórę - + Skin files Pliki skór @@ -520,29 +525,29 @@ Odśwież - + Show protocol Pokaż protokół - + Transparency Przezroczystość - + Main window Okno główne - - - + + + 0 0 - + Equalizer Equalizer @@ -550,53 +555,53 @@ EqWidget - - + + preset preset - + &Load/Delete Wczytaj/&Usuń - + &Save Preset Zapi&sz Preset - + &Save Auto-load Preset Zapi&sz Auto-ładowanie Preset'u - + &Clear &Wyczyść - + Saving Preset Zapisywanie Preset'u - + Preset name: Nazwa Preset'u: - + preset # preset # - + &Import &Importuj - + Import Preset Importuj Preset @@ -645,62 +650,62 @@ MainDisplay - + Previous Poprzedni - + Play Odtwarzaj - + Pause Pauza - + Stop Zatrzymaj - + Next Następny - + Add file Dodaj plik - + Equalizer Equalizer - + Playlist Lista odtwarzania - + Repeat playlist Powtórz listę odtwarzania - + Shuffle Losowo - + Volume Głośność - + Balance Balans @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Tryb wizualizacji - + Analyzer Analizator - + Scope - + Off Wyłączone - + Analyzer Mode Tryb Analizatora - + Normal Normalny - + Fire Ogień - + Vertical Lines Pionowe Linie - + Lines Linie - + Bars Słupki - + Peaks Piki - + Refresh Rate Odświeżanie - + 50 fps - + 25 fps - + 10 fps - + 5 fps - + Analyzer Falloff Prędkość Analizatora - - + + Slowest Najwolniej - - + + Slow Wolno - - + + Medium Średnio - - + + Fast Szybko - - + + Fastest Najszybciej - + Peaks Falloff Opadanie Pików - + Background Tło - + Transparent Przezroczystość @@ -842,173 +847,173 @@ MainWindow - + Default Domyślne - + Choose a directory Wybierz katalog - + Select one or more files to open Wybierz jeden lub więcej plików do otwarcia - + &Play &Odtwarzaj - + X X - + &Pause &Wstrzymaj - + C C - + &Stop &Zatrzymaj - + V V - + &Previous &Poprzedni - + Z Z - + &Next &Następny - + B B - + &Jump To File &Skocz do pliku - + J J - + &Settings &Ustawienia - + Ctrl+P Ctrl+P - + &Exit &Wyjście - + Ctrl+Q Ctrl+Q - + Open Playlist Otwórz listę odtwarzania - + Save Playlist Zapisz listę odtwarzania - + &About &O programie - - + + Playlist Files Pliki listy odtwarzania - + Space - + &About Qt &O Qt - + &Play/Pause &Odtwarzaj/Wstrzymaj - + All Supported Bitstreams Wszystkie wspierane formaty - + &Repeat Track &Powtórz utwór - + &Shuffle &Losowo - + R - + Ctrl+R - + S - + &Repeat Playlist Powtó&rz listę odtwarzania - + Tools Narzędzia @@ -1016,194 +1021,194 @@ PlayList - + F F - + D D - + Alt+I Alt+I - + Ctrl+A Ctrl+A - + O O - + &Add File &Dodaj plik - + &Add Directory Dodaj &katalog - + &Remove Selected &Usuń zaznaczone - + &Remove All Usuń &wszystkie - + &Remove Unselected Usuń &niezaznaczone - + Remove unavailable files Usuń niedostępne pliki - + &View Track Details &Pokaż informacje o pliku - + Sort List Sortuj listę - - + + By Title Według nazwy - - + + By Album - - + + By Artist - - + + By Filename Według nazwy pliku - - + + By Path + Filename Według Ścieżki + Nazwy pliku - - + + By Date Wg Daty - + Sort Selection Sortuj zaznaczone - + Randomize List Tasuj listę - + Reverse List Odwróć listę - + Invert Selection Odwróć zaznaczenie - + &Select None &Odznacz wszystkie - + &Select All &Zaznacz wszystkie - + &New List &Nowa lista - + Shift+N Shift+N - + &Load List &Ładuj listę - + &Save List &Zapisz listę - + Shift+S Shift+S - + Del Del - + &Add Url Dod&aj Url - + U U - - + + By Track Number Wg numeru utworu - + &Queue &Kolejkuj - + Q Q - + Actions Akcje diff --git a/src/ui/translations/qmmp_pt_BR.ts b/src/ui/translations/qmmp_pt_BR.ts index b547e17f8..5bd59e057 100644 --- a/src/ui/translations/qmmp_pt_BR.ts +++ b/src/ui/translations/qmmp_pt_BR.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Ligado - - - - - + + + + + Description Descrição - - - - - + + + + + Filename Nome do Arquivo - + Artist Artista - + Album Álbum - + Title Título - + Track number - + Disc number - + Genre Gênero - + Composer - + File name - + File path - + Year Ano - + Comment Comentário @@ -288,48 +288,48 @@ - + ... ... - + Metadata MetaData - + Load metadata from files Carregar arquivo MetaData - + Song Display Mostrar música - + Title format: Tipo de Formato: - + Input Entrada - + Output Saída - + Preferences Preferências - - + + Information Informações @@ -340,7 +340,7 @@ - + Playlist Lista de músicas @@ -355,17 +355,17 @@ Avançado - + Close Fechar - + Archived skin - + Unarchived skin @@ -375,27 +375,27 @@ - + Visualization - + Effects - + General - + File Dialog - + Audio @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers - + Use software volume control - + Visibility Control - + Hide on close - + Start hidden - + Compatibility - + Openbox compatibility - + Proxy - + Enable proxy usage - + Proxy host name: - + Proxy port: - + Use authentication with proxy - + Proxy user name: - + Proxy password: - + Convert underscores to blanks - + Convert %20 to blanks - + Select Skin Files - + Skin files @@ -520,29 +525,29 @@ Recarregar - + Show protocol - + Transparency - + Main window - - - + + + 0 - + Equalizer @@ -550,53 +555,53 @@ EqWidget - - + + preset preset - + &Load/Delete &Carregar/Deletar - + &Save Preset %Salvar preset - + &Save Auto-load Preset &Salvar Auto-Carregar preset - + &Clear &Limpar - + Saving Preset Salvando Preset - + Preset name: Nome Preset: - + preset # Preset # - + &Import &Importar - + Import Preset Importar Preset @@ -645,62 +650,62 @@ MainDisplay - + Previous - + Play - + Pause - + Stop - + Next - + Add file - + Equalizer - + Playlist Lista de músicas - + Repeat playlist - + Shuffle - + Volume - + Balance @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode - + Analyzer - + Scope - + Off - + Analyzer Mode - + Normal - + Fire - + Vertical Lines - + Lines - + Bars - + Peaks - + Refresh Rate - + 50 fps - + 25 fps - + 10 fps - + 5 fps - + Analyzer Falloff - - + + Slowest - - + + Slow - - + + Medium - - + + Fast - - + + Fastest - + Peaks Falloff - + Background - + Transparent @@ -842,173 +847,173 @@ MainWindow - + Default Padrão - + Choose a directory Escolher o diretorio - + Select one or more files to open Selecionar um ou mais arquivos - + &Play Tocar - + X - + &Pause Pausar - + C - + &Stop Parar - + V - + &Previous Anterior - + Z - + &Next Próximo - + B - + &Jump To File Pular para arquivo - + J - + &Settings Configurações - + Ctrl+P - + &Exit Sair - + Ctrl+Q - + Open Playlist Abrir Playlist - + Save Playlist Salvar Playlist - + &About &Sobre - - + + Playlist Files ФArquivos de lista de músicas - + Space - + &About Qt - + &Play/Pause - + All Supported Bitstreams - + &Repeat Track - + &Shuffle - + R - + Ctrl+R - + S - + &Repeat Playlist - + Tools @@ -1016,194 +1021,194 @@ PlayList - + F - + D - + Alt+I - + Ctrl+A - + O - + &Add File &Adicionar arquivo - + &Add Directory &Adicionar Diretorio - + &Remove Selected &Remover selecionadas - + &Remove All &Remover tudo - + &Remove Unselected &Remover não selecionadas - + Remove unavailable files - + &View Track Details &Ver detalhes da Faixa - + Sort List Classificar lista - - + + By Title Por Título - - + + By Album - - + + By Artist - - + + By Filename Por Nome - - + + By Path + Filename Por Dirertório + Nome - - + + By Date Por Data - + Sort Selection Classificar por Seleção - + Randomize List Lista Eleatória - + Reverse List Lista Revertida - + Invert Selection Inverter Seleção - + &Select None &Nenhum selecionado - + &Select All &Selecionar tudo - + &New List &Nova lista - + Shift+N - + &Load List &Carregar lista - + &Save List &Salvar lista - + Shift+S - + Del - + &Add Url - + U - - + + By Track Number - + &Queue Na fila - + Q - + Actions diff --git a/src/ui/translations/qmmp_ru.ts b/src/ui/translations/qmmp_ru.ts index 354908858..0304c30b0 100644 --- a/src/ui/translations/qmmp_ru.ts +++ b/src/ui/translations/qmmp_ru.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Включён - - - - - + + + + + Description Описание - - - - - + + + + + Filename Имя файла - + Artist Исполнитель - + Album Альбом - + Title Название - + Track number Номер трека - + Disc number Номер диска - + Genre Жанр - + Composer Композитор - + File name Имя файла - + File path Путь к файлу - + Year Год - + Comment Комментарий @@ -288,48 +288,48 @@ - + ... ... - + Metadata Метаданные - + Load metadata from files Считывать метаданные из файлов - + Song Display Список песен - + Title format: Формат названия: - + Input Ввод - + Output Вывод - + Preferences Настройки - - + + Information Информация @@ -340,7 +340,7 @@ - + Playlist Список @@ -355,17 +355,17 @@ Дополнительно - + Close Закрыть - + Archived skin Упакованная тема - + Unarchived skin Распакованная тема @@ -375,27 +375,27 @@ Сеть - + Visualization Визуализация - + Effects Эффекты - + General Общие - + File Dialog Файловый диалог - + Audio Аудио @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers Показывать номера песен - + Use software volume control Использовать программную регулировку громкости - + Visibility Control Управление видимостью - + Hide on close Скрывать при закрытии - + Start hidden Запускать скрытым - + Compatibility Совместимость - + Openbox compatibility Совместимость с Openbox - + Proxy Прокси - + Enable proxy usage Использовать прокси - + Proxy host name: Прокси сервер: - + Proxy port: Прокси порт: - + Use authentication with proxy Использовать авторизацию на прокси - + Proxy user name: Имя пользователя прокси: - + Proxy password: Пароль прокси: - + Convert underscores to blanks Преобразовывать подчёркивание в пробел - + Convert %20 to blanks Преобразовывать %20 в пробел - + Select Skin Files Выберите файлы обложек - + Skin files Файлы обложек @@ -520,29 +525,29 @@ Обновить - + Show protocol Показывать протокол - + Transparency Прозрачность - + Main window Главное окно - - - + + + 0 - + Equalizer Эквалайзер @@ -550,53 +555,53 @@ EqWidget - - + + preset предустановка - + &Load/Delete &Загрузить/Удалить - + &Save Preset &Сохранить предустановку - + &Save Auto-load Preset &Сохранить авто-предустановку - + &Clear &Очистить - + Saving Preset Сохранение предустановки - + Preset name: Имя предустановки: - + preset # предустановка # - + &Import &Импортировать - + Import Preset Импорт предустановки @@ -645,62 +650,62 @@ MainDisplay - + Previous Предыдущий фрагмент - + Play Воспроизвести - + Pause Приостановить - + Stop Стоп - + Next Следующий фрагмент - + Add file Добавить файл - + Equalizer Эквалайзер - + Playlist Список - + Repeat playlist Повторять список - + Shuffle В случайном порядке - + Volume Громкость - + Balance Баланс @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Режим визуализации - + Analyzer Анализатор - + Scope Осциллограф - + Off Выключено - + Analyzer Mode Режим анализатора - + Normal Обычный - + Fire Огонь - + Vertical Lines Вертикальные линии - + Lines Линии - + Bars Полоски - + Peaks Пики - + Refresh Rate Частота обновления - + 50 fps - + 25 fps - + 10 fps - + 5 fps - + Analyzer Falloff Падение анализатора - - + + Slowest Самое медленное - - + + Slow Медленное - - + + Medium Среднее - - + + Fast Быстрое - - + + Fastest Самое быстрое - + Peaks Falloff Падение пиков - + Background Фон - + Transparent Прозрачность @@ -842,173 +847,173 @@ MainWindow - + Default - + Choose a directory Выберите директорию - + Select one or more files to open Выберите один или несколько файлов - + &Play &Воспроизвести - + X - + &Pause &Приостановить - + C - + &Stop &Стоп - + V - + &Previous &Предыдущий фрагмент - + Z - + &Next &Следующий фрагмент - + B - + &Jump To File &Перейти к файлу - + J - + &Settings &Настройки - + Ctrl+P - + &Exit &Выход - + Ctrl+Q - + Open Playlist Открыть список - + Save Playlist Сохранить список - + &About &О программе - - + + Playlist Files Файлы списков - + Space - + &About Qt &О библиотеке Qt - + &Play/Pause &Воспр/приост - + All Supported Bitstreams Все форматы - + &Repeat Track &Повторять трек - + &Shuffle &В случайном порядке - + R - + Ctrl+R - + S - + &Repeat Playlist &Повторять список - + Tools Сервис @@ -1016,194 +1021,194 @@ PlayList - + F - + D - + Alt+I - + Ctrl+A - + O - + &Add File &Добавить файл - + &Add Directory &Добавить директорию - + &Remove Selected &Удалить выделенное - + &Remove All &Удалить всё - + &Remove Unselected &Удалить невыделенное - + Remove unavailable files Удалить недоступные файлы - + &View Track Details &Информация - + Sort List Сортировать - - + + By Title По названию - - + + By Album По альбому - - + + By Artist По исполнителю - - + + By Filename По имени файла - - + + By Path + Filename По пути и файлу - - + + By Date По дате - + Sort Selection Сортировать выделенное - + Randomize List Перемешать - + Reverse List Перевернуть - + Invert Selection Инвертировать выделение - + &Select None &Снять выделение - + &Select All &Выделить всё - + &New List &Новый лист - + Shift+N - + &Load List &Загрузить лист - + &Save List &Сохранить лист - + Shift+S - + Del - + &Add Url &Добавить URL - + U - - + + By Track Number По номеру трека - + &Queue &В очередь - + Q - + Actions Действия diff --git a/src/ui/translations/qmmp_tr.ts b/src/ui/translations/qmmp_tr.ts index a49091cbf..21de0dd00 100644 --- a/src/ui/translations/qmmp_tr.ts +++ b/src/ui/translations/qmmp_tr.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled Etkinleştirildi - - - - - + + + + + Description Açıklama - - - - - + + + + + Filename Dosya adı - + Artist Sanatçı - + Album Albüm - + Title Başlık - + Track number - + Disc number - + Genre Tarz - + Composer - + File name - + File path - + Year Yıl - + Comment Yorum @@ -288,48 +288,48 @@ - + ... ... - + Metadata Veri bilgisi - + Load metadata from files Veri bilgisini dosyadan yükle - + Song Display Şarkı Göstergesi - + Title format: Başlık formatı: - + Input Giriş - + Output Çıkış - + Preferences Tercihler - - + + Information Bilgi @@ -340,7 +340,7 @@ - + Playlist Çalma Listesi @@ -355,17 +355,17 @@ Gelişmiş - + Close Kapat - + Archived skin Arşivlenmiş kabuk - + Unarchived skin Arşivlenmemiş kabuk @@ -375,27 +375,27 @@ Bağlanırlık - + Visualization Görsellik - + Effects Efektler - + General Genel - + File Dialog Dosya Diyaloğu - + Audio Ses @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers Şarkı numaralarını göster - + Use software volume control Yazılımsal ses kontrolünü kullan - + Visibility Control Görünürlük Kontrolü - + Hide on close Kapatınca saklan - + Start hidden Gizli başlat - + Compatibility Uyumluluk - + Openbox compatibility Openbox uyumluluğu - + Proxy Vekil sunucu - + Enable proxy usage Vekil sunucu kullanımını etkinleştir - + Proxy host name: Vekil sunucu adı: - + Proxy port: Vekil sunucu portu: - + Use authentication with proxy Vekil sunucu yetkilendirmesi kullan - + Proxy user name: Vekil sunucu kullanıcı adı: - + Proxy password: Vekil sunucu parolası: - + Convert underscores to blanks Alt çizgileri boşluğa çevir - + Convert %20 to blanks %20 yi boşluğa çevir - + Select Skin Files Kabuk Dosyası Seç - + Skin files Kabuk dosyaları @@ -520,29 +525,29 @@ Yenile - + Show protocol Protokolü göster - + Transparency Transparanlık - + Main window Ana pencere - - - + + + 0 0 - + Equalizer Ekolayzır @@ -550,53 +555,53 @@ EqWidget - - + + preset tanımlanmış ayar - + &Load/Delete &Yükle/Sil - + &Save Preset Tanımlanmış &Ayarları Kaydet - + &Save Auto-load Preset &Otomatik Tanımlanmış Ayarları Kaydet - + &Clear &Temizle - + Saving Preset Tanımlanmış Ayarla Kaydediliyor - + Preset name: Tanımlanmış ayar adı: - + preset # tanımlanmış ayar # - + &Import &İçe Aktar - + Import Preset Tanımlanmış Ayarları Al @@ -645,62 +650,62 @@ MainDisplay - + Previous Önceki - + Play Oynat - + Pause Duraklat - + Stop Durdur - + Next Sonraki - + Add file Dosya ekle - + Equalizer Ekolayzır - + Playlist Çalma Listesi - + Repeat playlist Çalma Listesini Yinele - + Shuffle Rastgele - + Volume Ses - + Balance Denge @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode Görselleştirme Modu - + Analyzer Çözümleyici - + Scope Kapsam - + Off Kapat - + Analyzer Mode Çözümleyici Modu - + Normal Normal - + Fire Ateş - + Vertical Lines Dikey Satırlar - + Lines Satırlar - + Bars Çubuklar - + Peaks Tepeler - + Refresh Rate Tazeleme Oranı - + 50 fps 50 fps - + 25 fps 25 fps - + 10 fps 10 fps - + 5 fps 5 fps - + Analyzer Falloff Çözümleyici Düşüşü - - + + Slowest En yavaş - - + + Slow Yavaş - - + + Medium Orta - - + + Fast Hızlı - - + + Fastest En hızlı - + Peaks Falloff Tepe Düşüşü - + Background Arkaplan - + Transparent Transparan @@ -842,173 +847,173 @@ MainWindow - + Default Öntanımlı - + Choose a directory Bir dizin seçin - + Select one or more files to open Açmak için bir yada daha çok dosya seçin - + &Play &Çal - + X X - + &Pause &Duraklat - + C C - + &Stop &Durdur - + V V - + &Previous &Önceki - + Z Z - + &Next &Sonraki - + B B - + &Jump To File &Parçaya Git - + J J - + &Settings &Ayarlar - + Ctrl+P Ctrl+P - + &Exit &Çıkış - + Ctrl+Q Ctrl+Q - + Open Playlist Çalma Listesini Aç - + Save Playlist Çalma Listesini Kaydet - + &About &Hakkında - - + + Playlist Files Çalma Listesi Dosyaları - + Space Boşluk - + &About Qt &Qt Hakkında - + &Play/Pause &Oynat/Duraklat - + All Supported Bitstreams Tüm Desteklenen Bitstreamler - + &Repeat Track &Parçayı Yinele - + &Shuffle &Rastgele - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist &Çalma Listesini Yinele - + Tools Araçlar @@ -1016,194 +1021,194 @@ PlayList - + F F - + D D - + Alt+I Alt+I - + Ctrl+A Ctrl+A - + O O - + &Add File &Dosya Ekle - + &Add Directory &Dizin Ekle - + &Remove Selected &Seçileni Kaldır - + &Remove All &Hepsini Kaldır - + &Remove Unselected &Seçilmemişleri Kaldır - + Remove unavailable files - + &View Track Details &Parça Detaylarını Göster - + Sort List Listeyi Sınıflandır - - + + By Title Başlığa Göre - - + + By Album - - + + By Artist - - + + By Filename Dosya Adına Göre - - + + By Path + Filename Dosya Yolu + Dosya Adına Göre - - + + By Date Tarihe Göre - + Sort Selection Seçilenleri Sınıflandır - + Randomize List Rastgele Listele - + Reverse List Listeyi Ters Çevir - + Invert Selection Seçimi Tersine Çevir - + &Select None &Hiçbirini Seçme - + &Select All &Tümünü Seç - + &New List &Yeni Liste - + Shift+N Shift+N - + &Load List &Liste Yükle - + &Save List &Listeyi Kaydet - + Shift+S Shift+S - + Del Del - + &Add Url &Url Ekle - + U U - - + + By Track Number Parça Numarasına Göre - + &Queue &Kuyruğa ekle - + Q Q - + Actions Eylemler diff --git a/src/ui/translations/qmmp_uk_UA.ts b/src/ui/translations/qmmp_uk_UA.ts index a0d6b9302..4cc242d86 100644 --- a/src/ui/translations/qmmp_uk_UA.ts +++ b/src/ui/translations/qmmp_uk_UA.ts @@ -1,6 +1,6 @@ - - + + AboutDialog @@ -173,72 +173,84 @@ ConfigDialog - + + + + + Enabled Увімкнено - + + + + + Description Пояснення - + + + + + Filename Ім'я файлу - + Artist Виконавець - + Album Альбом - + Title Назва - + Track number Номер треку - + Disc number Номер диску - + Genre Жанр - + Composer Композитор - + File name Ім'я файлу - + File path Шлях файлу - + Year Рік - + Comment Коментар @@ -268,52 +280,56 @@ Список: + ??? ??? - + + + ... ... - + Metadata Метадані - + Load metadata from files Зчитувати метадані з файлів - + Song Display Список пісень - + Title format: Формат назви: - + Input Введення - + Output Виведення - + Preferences Налаштування - + + Information Інформація @@ -323,7 +339,8 @@ Зовнішній вигляд - + + Playlist Список @@ -338,17 +355,17 @@ Додатково - + Close Закрити - + Archived skin Упакована тема - + Unarchived skin Розпакована тема @@ -358,27 +375,27 @@ Мережа - + Visualization Візуалізація - + Effects Ефекти - + General Загальне - + File Dialog Файловий діалог - + Audio Звук @@ -403,92 +420,97 @@ Використовувати курсори скіна - + + Double size + + + + Show song numbers Відображати номера пісень - + Use software volume control Використовувати програмний контроль гучності - + Visibility Control Керування видимістю - + Hide on close Ховати при закритті - + Start hidden Запускати схованим - + Compatibility Сумісність - + Openbox compatibility Сумісність з Openbox - + Proxy Проксі - + Enable proxy usage Використосувати проксі - + Proxy host name: Сервер проксі: - + Proxy port: Порт проксі: - + Use authentication with proxy Використовувати авторизацію на проксі - + Proxy user name: Ім'я користвача проксі: - + Proxy password: Пароль проксі: - + Convert underscores to blanks Конвертувати підкреслювання в пробіл - + Convert %20 to blanks Конвертувати %20 в пробіл - + Select Skin Files Вибрати файли скінів - + Skin files Файли скінів @@ -503,27 +525,29 @@ Поновити - + Show protocol Показати протокол - + Transparency Прозорість - + Main window Головне вікно - + + + 0 - + Equalizer Еквалайзер @@ -531,52 +555,53 @@ EqWidget - + + preset предвстановлення - + &Load/Delete &Завантажити/Видалити - + &Save Preset &Зберегти предвстановлення - + &Save Auto-load Preset &Зберегти авто-предвстановлення - + &Clear &Очистити - + Saving Preset Збережені предвстановлення - + Preset name: Ім'я предвстановлення: - + preset # предвстановлення # - + &Import &Імпортувати - + Import Preset Імпорт предвстановлення @@ -584,11 +609,14 @@ JumpToTrackDialog + Unqueue Зняти з черги + + Queue В чергу @@ -622,62 +650,62 @@ MainDisplay - + Previous Назад - + Play Відтворити - + Pause Пауза - + Stop Стоп - + Next Вперед - + Add file Додати файл - + Equalizer Еквалайзер - + Playlist Список - + Repeat playlist Повторити список - + Shuffle Перемішати - + Volume Гучність - + Balance Баланс @@ -685,127 +713,132 @@ MainVisual - + Visualization Mode Режим візуалізації - + Analyzer Аналізатор - + Scope Осцилограф - + Off Вимкнено - + Analyzer Mode Режим аналізатора - + Normal Звичайний - + Fire Вогонь - + Vertical Lines Вертикальні лінії - + Lines Лінії - + Bars Смужки - + Peaks Піки - + Refresh Rate Частота оновлення - + 50 fps 50 ф/с - + 25 fps 25 ф/с - + 10 fps 10 ф/с - + 5 fps 5 ф/с - + Analyzer Falloff Падіння аналізатора - + + Slowest Найповільніше - + + Slow Повільне - + + Medium Середнє - + + Fast Швидке - + + Fastest Найшвидше - + Peaks Falloff Падіння піків - + Background Тло - + Transparent Прозорість @@ -813,172 +846,174 @@ MainWindow - + + Default За умовчанням - + Choose a directory Виберіть теку - + Select one or more files to open Виберіть один чи кілька файлів - + &Play &Відтворити - + X - + &Pause &Пауза - + C - + &Stop &Стоп - + V - + &Previous &Назад - + Z - + &Next &Вперед - + B - + &Jump To File &Перейти до файлу - + J - + &Settings &Налаштування - + Ctrl+P - + &Exit &Вихід - + Ctrl+Q - + Open Playlist Відкрити список - + Save Playlist Зберегти список - + &About &Про програму - + + Playlist Files Файли списків - + Space - + &About Qt &Про Qt - + &Play/Pause &Грати/Пауза - + All Supported Bitstreams Усі формати - + &Repeat Track &Повторити трек - + &Shuffle &Перемішати - + R - + Ctrl+R - + S - + &Repeat Playlist &Повторити список - + Tools Утиліти @@ -986,187 +1021,194 @@ PlayList - + F - + D - + Alt+I - + Ctrl+A - + O - + &Add File &Додати файл - + &Add Directory &Додати теку - + &Remove Selected &Видалити вибране - + &Remove All &Видалити все - + &Remove Unselected &Видалити не вибране - + Remove unavailable files Видалити недоступні файли - + &View Track Details &Інформація - + Sort List Сортувати - + + By Title За назвою - + + By Album За альбомом - + + By Artist За артистом - + + By Filename За ім'ям файлу - + + By Path + Filename За шляхом та файлом - + + By Date За датою - + Sort Selection Сортувати вибране - + Randomize List Перемішати - + Reverse List Перевернути - + Invert Selection Інвертувати вибране - + &Select None &Зняти виділення - + &Select All &Вибрати все - + &New List &Новий список - + Shift+N - + &Load List &Завантажити список - + &Save List &Зберегти список - + Shift+S - + Del - + &Add Url &Додати адресу - + U - + + By Track Number - + &Queue &В чергу - + Q - + Actions Дії diff --git a/src/ui/translations/qmmp_zh_CN.ts b/src/ui/translations/qmmp_zh_CN.ts index 7bdfa2213..9c4cc46d7 100644 --- a/src/ui/translations/qmmp_zh_CN.ts +++ b/src/ui/translations/qmmp_zh_CN.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled 启用 - - - - - + + + + + Description 描述 - - - - - + + + + + Filename 文件名 - + Artist 艺术家 - + Album 专辑 - + Title 标题 - + Track number - + Disc number - + Genre 流派 - + Composer - + File name - + File path - + Year 年代 - + Comment 备注 @@ -288,48 +288,48 @@ - + ... ... - + Metadata 元数据 - + Load metadata from files 从文件载入元数据 - + Song Display 显示歌曲 - + Title format: 标题格式: - + Input 输入 - + Output 输出 - + Preferences 参数设置 - - + + Information 信息 @@ -340,7 +340,7 @@ - + Playlist 播放列表 @@ -355,17 +355,17 @@ 高级 - + Close 关闭 - + Archived skin 压缩皮肤 - + Unarchived skin 未压缩皮肤 @@ -375,27 +375,27 @@ 连接 - + Visualization 可视化 - + Effects 特效 - + General 常规 - + File Dialog 文件对话 - + Audio 音频 @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers 显示曲目编号 - + Use software volume control 使用软设备音量控制 - + Visibility Control 可见性控制 - + Hide on close 关闭时隐藏 - + Start hidden 启动时隐藏 - + Compatibility - + Openbox compatibility - + Proxy 代理 - + Enable proxy usage 启用代理 - + Proxy host name: 主机名: - + Proxy port: 端口: - + Use authentication with proxy 需要身份验证 - + Proxy user name: 用户名: - + Proxy password: 密码: - + Convert underscores to blanks 转换下划线为空格 - + Convert %20 to blanks 转换 %20 为空格 - + Select Skin Files 选择皮肤文件 - + Skin files 皮肤文件 @@ -520,29 +525,29 @@ 刷新 - + Show protocol 显示协议 - + Transparency 透明度 - + Main window 主窗口 - - - + + + 0 0 - + Equalizer 均衡器 @@ -550,53 +555,53 @@ EqWidget - - + + preset 预设 - + &Load/Delete 载入/删除(&L) - + &Save Preset 保存预设(&S) - + &Save Auto-load Preset 保存自动载入预设(&S) - + &Clear 清除(&C) - + Saving Preset 保存预设 - + Preset name: 预设名称: - + preset # 预设 # - + &Import 导入(&I) - + Import Preset 导入预设 @@ -645,62 +650,62 @@ MainDisplay - + Previous 上一曲 - + Play 播放 - + Pause 暂停 - + Stop 停止 - + Next 下一曲 - + Add file 添加文件 - + Equalizer 均衡器 - + Playlist 播放列表 - + Repeat playlist 重复播放列表 - + Shuffle 乱序 - + Volume 音量 - + Balance 平衡 @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode 可视化模式 - + Analyzer 分析器 - + Scope 示波器 - + Off 关闭 - + Analyzer Mode 分析模式 - + Normal 标准 - + Fire 火花 - + Vertical Lines 垂直线 - + Lines 线形 - + Bars 条形 - + Peaks 峰值 - + Refresh Rate 刷新率 - + 50 fps 50 fps - + 25 fps 25 fps - + 10 fps 10 fps - + 5 fps 5 fps - + Analyzer Falloff 分析器下降速度 - - + + Slowest 最慢 - - + + Slow - - + + Medium - - + + Fast - - + + Fastest 最快 - + Peaks Falloff 峰值下降速度 - + Background 背景 - + Transparent 透明 @@ -842,173 +847,173 @@ MainWindow - + Default 默认 - + Choose a directory 选择一个目录 - + Select one or more files to open 选择打开一个或更多文件 - + &Play 播放(&P) - + X X - + &Pause 暂停(&P) - + C C - + &Stop 停止(&S) - + V V - + &Previous 上一曲(&P) - + Z Z - + &Next 下一曲(&N) - + B B - + &Jump To File 跳到文件(&J) - + J J - + &Settings 设置(&S) - + Ctrl+P Ctrl+P - + &Exit 退出(&E) - + Ctrl+Q Ctrl+Q - + Open Playlist 打开播放列表 - + Save Playlist 保存播放列表 - + &About 关于(&A) - - + + Playlist Files 播放列表文件 - + Space 空格 - + &About Qt 关于 Qt (&A) - + &Play/Pause 播放/暂停(&P) - + All Supported Bitstreams 支持的全部文件 - + &Repeat Track 重复音轨(&R) - + &Shuffle 乱序(&S) - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist 重复播放列表(&R) - + Tools 工具 @@ -1016,194 +1021,194 @@ PlayList - + F F - + D D - + Alt+I Alt+I - + Ctrl+A Ctrl+A - + O O - + &Add File 添加文件(&A) - + &Add Directory 添加文件夹(&A) - + &Remove Selected 删除所选(&R) - + &Remove All 删除全部(&R) - + &Remove Unselected 删除未选(&R) - + Remove unavailable files - + &View Track Details 查看音轨详细信息(&V) - + Sort List 列表排序 - - + + By Title 按标题 - - + + By Album - - + + By Artist - - + + By Filename 按文件名 - - + + By Path + Filename 按路径+文件名 - - + + By Date 按日期 - + Sort Selection 选择排序 - + Randomize List 随机产生列表 - + Reverse List 逆序列表 - + Invert Selection 反选 - + &Select None 无选择(&S) - + &Select All 选择全部(&S) - + &New List 新建列表(&N) - + Shift+N Shift+N - + &Load List 载入列表(&L) - + &Save List 保存列表(&S) - + Shift+S Shift+S - + Del Del - + &Add Url 添加 URL (&A) - + U U - - + + By Track Number 按音轨 - + &Queue 队列(&Q) - + Q Q - + Actions 动作 diff --git a/src/ui/translations/qmmp_zh_TW.ts b/src/ui/translations/qmmp_zh_TW.ts index ca6fc894e..021b1eebc 100644 --- a/src/ui/translations/qmmp_zh_TW.ts +++ b/src/ui/translations/qmmp_zh_TW.ts @@ -173,84 +173,84 @@ ConfigDialog - - - - - + + + + + Enabled 啟用 - - - - - + + + + + Description 說明 - - - - - + + + + + Filename 檔名 - + Artist 藝術家 - + Album 專輯 - + Title 標題 - + Track number - + Disc number - + Genre 流派 - + Composer - + File name - + File path - + Year 年代 - + Comment 備註 @@ -288,48 +288,48 @@ - + ... ... - + Metadata 元資料 - + Load metadata from files 從檔案載入元資料 - + Song Display 察看歌曲 - + Title format: 標題格式: - + Input 匯入 - + Output 匯出 - + Preferences 引數設定 - - + + Information 資訊 @@ -340,7 +340,7 @@ - + Playlist 播放清單 @@ -355,17 +355,17 @@ 進階 - + Close 關閉 - + Archived skin 封包皮膚 - + Unarchived skin 未封包皮膚 @@ -375,27 +375,27 @@ 連線 - + Visualization 可視化 - + Effects 特效 - + General 常規 - + File Dialog 檔案對話 - + Audio 聲訊 @@ -420,92 +420,97 @@ - + + Double size + + + + Show song numbers 顯示曲目編號 - + Use software volume control 使用軟裝置音量控制 - + Visibility Control 可見性控制 - + Hide on close 關閉時隱藏 - + Start hidden 啟動時隱藏 - + Compatibility - + Openbox compatibility - + Proxy 代理 - + Enable proxy usage 啟用代理 - + Proxy host name: 主機名: - + Proxy port: 通訊埠: - + Use authentication with proxy 需要身份驗證 - + Proxy user name: 用戶名: - + Proxy password: 密碼: - + Convert underscores to blanks 轉換底線為空格 - + Convert %20 to blanks 轉換 %20 為空格 - + Select Skin Files 選取皮膚檔案 - + Skin files 皮膚檔案 @@ -520,29 +525,29 @@ 刷新 - + Show protocol 顯示協議 - + Transparency 透明度 - + Main window 主窗口 - - - + + + 0 0 - + Equalizer 均衡器 @@ -550,53 +555,53 @@ EqWidget - - + + preset 預設 - + &Load/Delete 載入/移除(&L) - + &Save Preset 儲存預設(&S) - + &Save Auto-load Preset 儲存自動載入預設(&S) - + &Clear 清除(&C) - + Saving Preset 儲存預設 - + Preset name: 預設名稱: - + preset # 預設 # - + &Import 導入(&I) - + Import Preset 導入預設 @@ -645,62 +650,62 @@ MainDisplay - + Previous 上一曲 - + Play 播放 - + Pause 暫停 - + Stop 停止 - + Next 下一曲 - + Add file 添加檔案 - + Equalizer 均衡器 - + Playlist 播放清單 - + Repeat playlist 重復播放清單 - + Shuffle 亂序 - + Volume 音量 - + Balance 平衡 @@ -708,132 +713,132 @@ MainVisual - + Visualization Mode 可視化型態 - + Analyzer 解析器 - + Scope 示波器 - + Off 關閉 - + Analyzer Mode 解析型態 - + Normal 標準 - + Fire 火花 - + Vertical Lines 垂直線 - + Lines 線形 - + Bars 條形 - + Peaks 峰值 - + Refresh Rate 刷新率 - + 50 fps 50 fps - + 25 fps 25 fps - + 10 fps 10 fps - + 5 fps 5 fps - + Analyzer Falloff 解析器下降速度 - - + + Slowest 最慢 - - + + Slow - - + + Medium - - + + Fast - - + + Fastest 最快 - + Peaks Falloff 峰值下降速度 - + Background 背景 - + Transparent 透明 @@ -842,173 +847,173 @@ MainWindow - + Default 預設 - + Choose a directory 選取一個目錄 - + Select one or more files to open 選取開啟一個或更多檔案 - + &Play 播放(&P) - + X X - + &Pause 暫停(&P) - + C C - + &Stop 停止(&S) - + V V - + &Previous 上一曲(&P) - + Z Z - + &Next 下一曲(&N) - + B B - + &Jump To File 跳到檔案(&J) - + J J - + &Settings 設定(&S) - + Ctrl+P Ctrl+P - + &Exit 結束(&E) - + Ctrl+Q Ctrl+Q - + Open Playlist 開啟播放清單 - + Save Playlist 儲存播放清單 - + &About 關於(&A) - - + + Playlist Files 播放清單檔案 - + Space 空格 - + &About Qt 關於 Qt (&A) - + &Play/Pause 播放/暫停(&P) - + All Supported Bitstreams 支援的全部檔案 - + &Repeat Track 重復音軌(&R) - + &Shuffle 亂序(&S) - + R R - + Ctrl+R Ctrl+R - + S S - + &Repeat Playlist 重復播放清單(&R) - + Tools 工具 @@ -1016,194 +1021,194 @@ PlayList - + F F - + D D - + Alt+I Alt+I - + Ctrl+A Ctrl+A - + O O - + &Add File 添加檔案(&A) - + &Add Directory 添加檔案夾(&A) - + &Remove Selected 移除所選(&R) - + &Remove All 移除全部(&R) - + &Remove Unselected 移除未選(&R) - + Remove unavailable files - + &View Track Details 檢視音軌詳細資訊(&V) - + Sort List 清單排序 - - + + By Title 按標題 - - + + By Album - - + + By Artist - - + + By Filename 按檔名 - - + + By Path + Filename 按路徑+檔名 - - + + By Date 按日期 - + Sort Selection 選取排序 - + Randomize List 隨機產生清單 - + Reverse List 逆串列表 - + Invert Selection 反選 - + &Select None 無選取(&S) - + &Select All 選取全部(&S) - + &New List 新建清單(&N) - + Shift+N Shift+N - + &Load List 載入清單(&L) - + &Save List 儲存清單(&S) - + Shift+S Shift+S - + Del Del - + &Add Url 添加 URL (&A) - + U U - - + + By Track Number 按音軌 - + &Queue 佇列(&Q) - + Q Q - + Actions 動作 diff --git a/src/ui/volumebar.cpp b/src/ui/volumebar.cpp index 91c94379f..ae010e4f2 100644 --- a/src/ui/volumebar.cpp +++ b/src/ui/volumebar.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,8 +29,7 @@ #include "volumebar.h" -VolumeBar::VolumeBar(QWidget *parent) - : PixmapWidget(parent) +VolumeBar::VolumeBar(QWidget *parent) : PixmapWidget(parent) { m_skin = Skin::instance(); connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin())); @@ -49,22 +48,18 @@ VolumeBar::~VolumeBar() void VolumeBar::mousePressEvent(QMouseEvent *e) { - m_moving = TRUE; press_pos = e->x(); - if(m_posx() && e->x()x() && e->x()ratio()) { press_pos = e->x()-m_pos; } else { - m_value = convert(qMax(qMin(width()-18,e->x()-6),0)); - press_pos = 6; - if (m_value!=m_old) - { + m_value = convert(qMax(qMin(width()-18*m_skin->ratio(),e->x()-6*m_skin->ratio()),0)); + press_pos = 6*m_skin->ratio(); + if (m_value != m_old) emit sliderMoved(m_value); - - } } draw(); } @@ -76,7 +71,7 @@ void VolumeBar::mouseMoveEvent (QMouseEvent *e) int po = e->x(); po = po - press_pos; - if(0<=po && po<=width()-18) + if(0<=po && po<=width()-18*m_skin->ratio()) { m_value = convert(po); draw(); @@ -108,13 +103,14 @@ void VolumeBar::setMax(int max) void VolumeBar::updateSkin() { + resize(m_skin->getVolumeBar(0).size()); draw(FALSE); setCursor(m_skin->getCursor(Skin::CUR_VOLBAL)); } void VolumeBar::draw(bool pressed) { - int p=int(ceil(double(m_value-m_min)*(width()-18)/(m_max-m_min))); + int p=int(ceil(double(m_value-m_min)*(width()-18*m_skin->ratio())/(m_max-m_min))); m_pixmap = m_skin->getVolumeBar(27*(m_value-m_min)/(m_max-m_min)); QPainter paint(&m_pixmap); if(pressed) @@ -127,5 +123,5 @@ void VolumeBar::draw(bool pressed) int VolumeBar::convert(int p) { - return int(ceil(double(m_max-m_min)*(p)/(width()-18)+m_min)); + return int(ceil(double(m_max-m_min)*(p)/(width()-18*m_skin->ratio())+m_min)); } diff --git a/src/ui/volumebar.h b/src/ui/volumebar.h index 45fb84321..21b577cf3 100644 --- a/src/ui/volumebar.h +++ b/src/ui/volumebar.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2006-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -22,13 +22,12 @@ #include "pixmapwidget.h" -/** - @author Ilya Kotov -*/ - class Skin; class MainWindow; +/** + @author Ilya Kotov +*/ class VolumeBar : public PixmapWidget { Q_OBJECT @@ -37,8 +36,14 @@ public: ~VolumeBar(); - int value() { return m_value; }; - int isPressed() {return m_moving; } + int value() + { + return m_value; + } + int isPressed() + { + return m_moving; + } public slots: void setValue(int); @@ -64,8 +69,6 @@ protected: void mousePressEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); void mouseMoveEvent(QMouseEvent*); - - }; #endif -- cgit v1.2.3-13-gbd6f