diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-09-13 17:15:02 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-09-13 17:15:02 +0000 |
| commit | e7ea59067e6c975a16926647376175f0f2ab2afa (patch) | |
| tree | 69c4334adc7cf7decb5d6d2c171165501bf236f1 | |
| parent | 3ffc8b54aff2cf907d4c35dc9a9972005db51f36 (diff) | |
| download | qmmp-e7ea59067e6c975a16926647376175f0f2ab2afa.tar.gz qmmp-e7ea59067e6c975a16926647376175f0f2ab2afa.tar.bz2 qmmp-e7ea59067e6c975a16926647376175f0f2ab2afa.zip | |
removed unused code
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@552 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/qmmp/output.cpp | 126 | ||||
| -rw-r--r-- | src/qmmp/output.h | 11 |
2 files changed, 6 insertions, 131 deletions
diff --git a/src/qmmp/output.cpp b/src/qmmp/output.cpp index 5126a9a48..0a0e6cef1 100644 --- a/src/qmmp/output.cpp +++ b/src/qmmp/output.cpp @@ -39,97 +39,14 @@ void Output::setStateHandler(StateHandler *handler) } Output::~Output() -{ - /*foreach(Visual *visual, m_vis_map.values ()) - { - visual->setOutput(0); - visual->close(); - } - /*foreach (Visual *visual , visuals) //external - { - visual->setOutput(0); - }*/ -} - -void Output::addVisual ( Visual *v ) -{ - if (visuals.indexOf (v) == -1) - { - visuals.append (v); -// v->setOutput(this); - qDebug("Output: added external visualization"); - } -} - - -void Output::removeVisual (Visual *v) -{ - //v->setOutput(0); - visuals.removeAll (v); - if (m_vis_map.key(v)) - { - VisualFactory *factory = m_vis_map.key(v); - m_vis_map.remove(factory); - } -} - -void Output::processCloseEvent(Visual *v, QCloseEvent *event) -{ - if (event->spontaneous () && m_vis_map.key(v)) - { - VisualFactory *factory = m_vis_map.key(v); - m_vis_map.remove(factory); - Visual::setEnabled(factory, FALSE); - //dispatch(OutputState::VisualRemoved); - } -} - -void Output::addVisual(VisualFactory *factory, QWidget *parent) -{ - if (m_vis_map.value(factory)) - return; - Visual::setEnabled(factory, TRUE); - Visual* visual = factory->create(parent); - visual->setWindowFlags(Qt::Window); - if (visual) - { - //visual->setOutput(this); - qDebug("Output: added visual factory: %s", - qPrintable(factory->properties().name)); - m_vis_map.insert (factory, visual); - visual->show(); - } -} +{} -void Output::removeVisual(VisualFactory *factory) -{ - if (m_vis_map.value(factory)) - { - m_vis_map.value(factory)->close(); - m_vis_map.remove (factory); - } - Visual::setEnabled(factory, FALSE); -} - -void Output::dispatchVisual ( Buffer *buffer, unsigned long written, - int chan, int prec ) +void Output::dispatchVisual (Buffer *buffer, unsigned long written, + int chan, int prec) { if (!buffer) return; - Visual* visual = 0; - /*foreach (visual , visuals) //external - { - visual->mutex()->lock (); - visual->add ( buffer, written, chan, prec ); - visual->mutex()->unlock(); - } - foreach (visual , m_vis_map.values ()) //internal - { - visual->mutex()->lock (); - visual->add ( buffer, written, chan, prec ); - visual->mutex()->unlock(); - }*/ - foreach (visual, *Visual::visuals()) + foreach (Visual *visual, *Visual::visuals()) { visual->mutex()->lock (); visual->add ( buffer, written, chan, prec ); @@ -140,45 +57,14 @@ void Output::dispatchVisual ( Buffer *buffer, unsigned long written, void Output::clearVisuals() { - Visual *visual = 0; - foreach (visual, visuals ) + foreach (Visual *visual, *Visual::visuals()) { visual->mutex()->lock (); - visual->clear(); - visual->mutex()->unlock(); - } - foreach(visual, m_vis_map.values ()) - { - visual->mutex()->lock (); - visual->clear(); + visual->clear (); visual->mutex()->unlock(); } } -/*void Output::dispatch(OutputState::Type st) -{ - if (st == OutputState::Stopped) - clearVisuals(); - emit stateChanged ( OutputState(st) ); -}*/ - -/*void Output::dispatch(long s, unsigned long w, int b, int f, int p, int c) -{ - emit stateChanged ( OutputState(s, w, b, f, p, c) ); -}*/ - -/*void Output::dispatch ( const OutputState &st ) -{ - if (st.type() == OutputState::Stopped) - clearVisuals(); - emit stateChanged ( st ); -} - -void Output::dispatchVolume(int L, int R) -{ - emit stateChanged ( OutputState(L, R) ); -}*/ - void Output::checkVolume() { int ll = 0, lr = 0; diff --git a/src/qmmp/output.h b/src/qmmp/output.h index 7b0ce4a0b..3703519e6 100644 --- a/src/qmmp/output.h +++ b/src/qmmp/output.h @@ -48,17 +48,8 @@ public: Recycler *recycler(); QMutex *mutex(); - void setStateHandler(StateHandler *handler); - //visualization - void addVisual(Visual*); - void removeVisual(Visual*); - void addVisual(VisualFactory *factory, QWidget *parent); - void removeVisual(VisualFactory *factory); - void processCloseEvent(Visual *v, QCloseEvent *event); - - static void registerFactory(OutputFactory *); static Output *create(QObject *); static QList<OutputFactory*> *outputFactories(); @@ -84,8 +75,6 @@ protected: private: QMutex m_mutex; Recycler m_recycler; - QList<Visual*> visuals; //external visualization - QMap<VisualFactory*, Visual*> m_vis_map; //internal visualization int m_bl, m_br; StateHandler *m_handler; |
