traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/traverso/widgets MeterWidget.cpp M...


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src/traverso/widgets MeterWidget.cpp M...
Date: Fri, 15 Feb 2008 20:33:00 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       08/02/15 20:33:00

Modified files:
        src/traverso/widgets: MeterWidget.cpp MeterWidget.h 
                              SpectralMeterWidget.cpp 

Log message:
        * header include cleanups, make fft work again

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/MeterWidget.cpp?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/MeterWidget.h?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/SpectralMeterWidget.cpp?cvsroot=traverso&r1=1.1&r2=1.2

Patches:
Index: MeterWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/MeterWidget.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- MeterWidget.cpp     15 Feb 2008 20:14:20 -0000      1.1
+++ MeterWidget.cpp     15 Feb 2008 20:33:00 -0000      1.2
@@ -24,14 +24,10 @@
 
 #include "Command.h"
 #include "ContextPointer.h"
-#include "InputEngine.h"
 #include "PluginChain.h"
 #include "ProjectManager.h"
 #include "Project.h"
 #include "Sheet.h"
-#include "Themer.h"
-
-#include <QDebug>
 
 // Always put me below _all_ includes, this is needed
 // in case we run with memory leak detection enabled!

Index: MeterWidget.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/MeterWidget.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- MeterWidget.h       15 Feb 2008 20:14:20 -0000      1.1
+++ MeterWidget.h       15 Feb 2008 20:33:00 -0000      1.2
@@ -22,7 +22,6 @@
 #ifndef METER_WIDGET_H
 #define METER_WIDGET_H
 
-#include <QWidget>
 #include <QTimer>
 
 #include <ViewPort.h>
@@ -64,7 +63,6 @@
        void hide_event();
        void show_event();
 
-       void            set_sheet( Sheet* );
        
 protected:
        MeterWidget*    m_widget;
@@ -74,10 +72,10 @@
        Project*        m_project;
        Sheet*          m_sheet;
 
-public slots:
-       void            set_project( Project* );
+       void            set_sheet( Sheet* );
        
 private slots:
+       void            set_project( Project* );
        virtual void    update_data() {};
        void            transport_started();
        void            transport_stopped();

Index: SpectralMeterWidget.cpp
===================================================================
RCS file: 
/sources/traverso/traverso/src/traverso/widgets/SpectralMeterWidget.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- SpectralMeterWidget.cpp     15 Feb 2008 20:14:20 -0000      1.1
+++ SpectralMeterWidget.cpp     15 Feb 2008 20:33:00 -0000      1.2
@@ -20,6 +20,7 @@
 */
 
 #include "SpectralMeterWidget.h"
+
 #include <Config.h>
 #include <Information.h>
 #include <PluginChain.h>
@@ -53,42 +54,17 @@
 
 
 SpectralMeterWidget::SpectralMeterWidget(QWidget* parent)
-       : MeterWidget(parent, 0)
+       : MeterWidget(parent, new SpectralMeterView(this))
 {
        PENTERCONS;
 }
 
 
-SpectralMeterView * SpectralMeterWidget::get_item()
-{
-       if (!m_item) {
-               m_item = new SpectralMeterView(this);
-               
-               scene()->addItem(m_item);
-               m_item->setPos(0,0);
-               m_item->resize();
-               
-               Project* project = pm().get_project(); 
-               m_item->set_project(project);
-               if (project) {
-                       m_item->set_sheet(project->get_current_sheet());
-               }
-       
-               setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-               setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-       }
-       
-       return (SpectralMeterView*)m_item;
-}
-
-
-
-
 SpectralMeterView::SpectralMeterView(SpectralMeterWidget* widget)
        : MeterView(widget)
 {
 
-       m_config = new SpectralMeterConfigWidget(m_widget);
+       m_config = 0;
        load_configuration();
        
        upper_freq_log = log10(upper_freq);
@@ -116,9 +92,6 @@
                m_freq_labels.push_back(80.0f * pow(10.0,i));
                m_freq_labels.push_back(90.0f * pow(10.0,i));
        }
-
-       connect(m_config, SIGNAL(configChanged()), this, 
SLOT(load_configuration()));
-
 }
 
 void SpectralMeterView::paint(QPainter *painter, const 
QStyleOptionGraphicsItem *option, QWidget *widget)
@@ -463,6 +436,11 @@
                return 0;
        }
 
+       if (!m_config) {
+               m_config = new SpectralMeterConfigWidget(m_widget);
+               connect(m_config, SIGNAL(configChanged()), this, 
SLOT(load_configuration()));
+       }
+
        m_config->show();
        
        return 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]