Cleanup TextBar.h and remove now unused VolumeSlider
This commit is contained in:
parent
c30d2c2285
commit
345f5d930e
5 changed files with 11 additions and 108 deletions
|
@ -15,8 +15,15 @@
|
|||
|
||||
#include "Display.h"
|
||||
#include "TextBar.h"
|
||||
#include "Skin.h"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
#include <QPixmap>
|
||||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
|
||||
TextScroller::TextScroller (QWidget *parent, uint w,
|
||||
uint h, const QString &name) :
|
||||
|
|
|
@ -16,18 +16,11 @@
|
|||
#ifndef __TEXTBOX_H__
|
||||
#define __TEXTBOX_H__
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QPainter>
|
||||
#include <QWidget>
|
||||
#include <QFont>
|
||||
#include <QTimer>
|
||||
#include <QBrush>
|
||||
#include <QPalette>
|
||||
#include <QBitmap>
|
||||
class QPixmap;
|
||||
class QTimer;
|
||||
|
||||
#include "Skin.h"
|
||||
class Skin;
|
||||
|
||||
class TextScroller : public QWidget
|
||||
{
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
/**
|
||||
* This file is a part of Promoe, an XMMS2 Client.
|
||||
*
|
||||
* Copyright (C) 2005-2008 XMMS2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "VolumeSlider.h"
|
||||
|
||||
#include "Skin.h"
|
||||
|
||||
Slider::Slider (QWidget *parent, uint name_min, uint name_max,
|
||||
uint name_on, uint name_off, int min, int max) : PixmapSlider (parent)
|
||||
{
|
||||
Skin *skin = Skin::getInstance();
|
||||
|
||||
connect (skin, SIGNAL (skinChanged (Skin *)),
|
||||
this, SLOT (setPixmaps(Skin *)));
|
||||
|
||||
setSliderOffset (QPoint (0, 1));
|
||||
|
||||
m_name_min = name_min;
|
||||
m_name_max = name_max;
|
||||
m_name_on = name_on;
|
||||
m_name_off = name_off;
|
||||
|
||||
setMinimum (min);
|
||||
setMaximum (max);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Slider::setPixmaps (Skin *skin)
|
||||
{
|
||||
QPixmapList bglist;
|
||||
for (uint32_t i = m_name_min; i <= m_name_max; i++) {
|
||||
bglist.append (skin->getItem(i));
|
||||
}
|
||||
setBackground (bglist);
|
||||
|
||||
if (!skin->getItem(m_name_on).isNull() && !skin->getItem(m_name_off).isNull()) {
|
||||
setSliders (skin->getItem(m_name_on), skin->getItem(m_name_off));
|
||||
} else {
|
||||
setSliders (QPixmap (), QPixmap ());
|
||||
}
|
||||
|
||||
QPixmap pixmap_slider = skin->getItem(m_name_min);
|
||||
setFixedSize(pixmap_slider.size());
|
||||
resize(pixmap_slider.size());
|
||||
|
||||
update();
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/**
|
||||
* This file is a part of Promoe, an XMMS2 Client.
|
||||
*
|
||||
* Copyright (C) 2005-2008 XMMS2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __VOLUMESLIDER_H__
|
||||
#define __VOLUMESLIDER_H__
|
||||
|
||||
#include "pixmapslider.h"
|
||||
class Skin;
|
||||
|
||||
class Slider : public PixmapSlider
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Slider (QWidget *parent, uint min, uint max, uint on, uint off, int, int);
|
||||
|
||||
public slots:
|
||||
void setPixmaps (Skin *skin);
|
||||
|
||||
private:
|
||||
uint m_name_min;
|
||||
uint m_name_max;
|
||||
uint m_name_on;
|
||||
uint m_name_off;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -28,6 +28,7 @@
|
|||
#include "TextBar.h"
|
||||
#include "NumberDisplay.h"
|
||||
#include "TimeDisplay.h"
|
||||
#include "Skin.h"
|
||||
#include "SmallNumberDisplay.h"
|
||||
#include "stereomono.h"
|
||||
#include "posbar.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue