[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/traverso CorrelationMeterWidget.cp...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/traverso CorrelationMeterWidget.cp... |
Date: |
Tue, 15 Jan 2008 19:56:07 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 08/01/15 19:56:07
Modified files:
src/traverso : CorrelationMeterWidget.cpp
SpectralMeterWidget.cpp
src/traverso/songcanvas: ClipsViewPort.cpp CurveNodeView.h
CurveView.h FadeView.h SongView.h
SongWidget.cpp TimeLineViewPort.cpp
TrackPanelView.h TrackPanelViewPort.cpp
ViewItem.cpp ViewItem.h
Log message:
* Added ViewItem::is_viewitem(QGraphicsItem* item);, somehow using
qgraphicsitem_cast doesn't work for me, this solution does
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/CorrelationMeterWidget.cpp?cvsroot=traverso&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/SpectralMeterWidget.cpp?cvsroot=traverso&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/ClipsViewPort.cpp?cvsroot=traverso&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/CurveNodeView.h?cvsroot=traverso&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/CurveView.h?cvsroot=traverso&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/FadeView.h?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongView.h?cvsroot=traverso&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongWidget.cpp?cvsroot=traverso&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/TimeLineViewPort.cpp?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/TrackPanelView.h?cvsroot=traverso&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/TrackPanelViewPort.cpp?cvsroot=traverso&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/ViewItem.cpp?cvsroot=traverso&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/ViewItem.h?cvsroot=traverso&r1=1.18&r2=1.19
Patches:
Index: CorrelationMeterWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/CorrelationMeterWidget.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- CorrelationMeterWidget.cpp 11 Jan 2008 15:37:52 -0000 1.28
+++ CorrelationMeterWidget.cpp 15 Jan 2008 19:56:07 -0000 1.29
@@ -95,7 +95,7 @@
printf("CorrelationMeterWidget::get_pointed_view_items\n");
QList<QGraphicsItem *> itemlist =
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
foreach(QGraphicsItem* item, itemlist) {
- if (item->type() == ViewItem::Type) {
+ if (ViewItem::is_viewitem(item)) {
list.append((ViewItem*)item);
}
}
Index: SpectralMeterWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/SpectralMeterWidget.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- SpectralMeterWidget.cpp 11 Jan 2008 15:37:52 -0000 1.47
+++ SpectralMeterWidget.cpp 15 Jan 2008 19:56:07 -0000 1.48
@@ -98,7 +98,7 @@
{
QList<QGraphicsItem *> itemlist =
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
foreach(QGraphicsItem* item, itemlist) {
- if (item->type() == ViewItem::Type) {
+ if (ViewItem::is_viewitem(item)) {
list.append((ViewItem*)item);
}
}
Index: songcanvas/ClipsViewPort.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/ClipsViewPort.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- songcanvas/ClipsViewPort.cpp 11 Jan 2008 15:37:52 -0000 1.29
+++ songcanvas/ClipsViewPort.cpp 15 Jan 2008 19:56:07 -0000 1.30
@@ -57,7 +57,7 @@
{
QList<QGraphicsItem *> itemlist =
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
foreach(QGraphicsItem* item, itemlist) {
- if (item->type() == ViewItem::Type) {
+ if (ViewItem::is_viewitem(item)) {
list.append((ViewItem*)item);
}
}
Index: songcanvas/CurveNodeView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/CurveNodeView.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- songcanvas/CurveNodeView.h 26 Apr 2007 17:24:34 -0000 1.7
+++ songcanvas/CurveNodeView.h 15 Jan 2008 19:56:07 -0000 1.8
@@ -36,10 +36,7 @@
CurveNodeView(SongView* sv, CurveView* curveview, CurveNode* node,
Curve* guicurve);
~CurveNodeView();
- enum {Type = UserType + 9};
-
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
- int type() const;
void calculate_bounding_rect();
void set_selected();
void reset_size();
@@ -57,9 +54,6 @@
void update_pos();
};
-
-inline int CurveNodeView::type() const {return Type;}
-
#endif
//eof
Index: songcanvas/CurveView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/CurveView.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- songcanvas/CurveView.h 26 Nov 2007 19:16:29 -0000 1.18
+++ songcanvas/CurveView.h 15 Jan 2008 19:56:07 -0000 1.19
@@ -97,13 +97,10 @@
CurveView(SongView* sv, ViewItem* parentViewItem, Curve* curve);
~CurveView();
- enum {Type = UserType + 8};
-
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
int get_vector(int xstart, int pixelcount, float *arg);
bool has_nodes() const;
float get_default_value();
- int type() const;
void calculate_bounding_rect();
void load_theme_data();
@@ -148,9 +145,6 @@
void curveModified();
};
-
-inline int CurveView::type() const {return Type;}
-
#endif
//eof
Index: songcanvas/FadeView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/FadeView.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- songcanvas/FadeView.h 29 Dec 2007 02:03:37 -0000 1.6
+++ songcanvas/FadeView.h 15 Jan 2008 19:56:07 -0000 1.7
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: FadeView.h,v 1.6 2007/12/29 02:03:37 benjie Exp $
+$Id: FadeView.h,v 1.7 2008/01/15 19:56:07 r_sijrier Exp $
*/
#ifndef FADE_VIEW_H
@@ -42,8 +42,6 @@
FadeView(SongView* sv, AudioClipView* parent, FadeCurve* fadeCuve);
~FadeView();
- enum {Type = UserType + 4};
-
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
int get_vector(int xstart, int pixelcount, float * arg);
void calculate_bounding_rect();
@@ -51,7 +49,6 @@
FadeCurve* get_fade() const {return m_fadeCurve;}
- int type() const;
void load_theme_data();
private:
@@ -73,7 +70,6 @@
void fadeModified();
};
-inline int FadeView::type() const {return Type;}
#endif
Index: songcanvas/SongView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongView.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- songcanvas/SongView.h 27 Dec 2007 22:27:23 -0000 1.39
+++ songcanvas/SongView.h 15 Jan 2008 19:56:07 -0000 1.40
@@ -91,6 +91,7 @@
void set_shuttle_factor_values(int x, int y);
int hscrollbar_value() const;
int vscrollbar_value() const;
+ int get_peak_cache_zoom_factor() const {return m_peakCacheZoomFactor;}
qint64 timeref_scalefactor;
@@ -107,6 +108,7 @@
int m_shuttleXfactor;
int m_shuttleYfactor;
int m_sceneHeight;
+ int m_peakCacheZoomFactor;
bool m_dragShuttle;
QTimer m_shuttletimer;
QScrollBar* m_vScrollBar;
Index: songcanvas/SongWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongWidget.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- songcanvas/SongWidget.cpp 11 Jan 2008 15:37:52 -0000 1.24
+++ songcanvas/SongWidget.cpp 15 Jan 2008 19:56:07 -0000 1.25
@@ -141,7 +141,7 @@
{
QList<QGraphicsItem *> itemlist =
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
foreach(QGraphicsItem* item, itemlist) {
- if (item->type() == ViewItem::Type) {
+ if (ViewItem::is_viewitem(item)) {
list.append((ViewItem*)item);
}
}
Index: songcanvas/TimeLineViewPort.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/songcanvas/TimeLineViewPort.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- songcanvas/TimeLineViewPort.cpp 11 Jan 2008 15:37:52 -0000 1.10
+++ songcanvas/TimeLineViewPort.cpp 15 Jan 2008 19:56:07 -0000 1.11
@@ -60,7 +60,7 @@
{
QList<QGraphicsItem *> itemlist =
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
foreach(QGraphicsItem* item, itemlist) {
- if (item->type() == ViewItem::Type) {
+ if (ViewItem::is_viewitem(item)) {
list.append((ViewItem*)item);
}
}
Index: songcanvas/TrackPanelView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/TrackPanelView.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- songcanvas/TrackPanelView.h 7 May 2007 18:14:38 -0000 1.13
+++ songcanvas/TrackPanelView.h 15 Jan 2008 19:56:07 -0000 1.14
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: TrackPanelView.h,v 1.13 2007/05/07 18:14:38 n_doebelin Exp $
+$Id: TrackPanelView.h,v 1.14 2008/01/15 19:56:07 r_sijrier Exp $
*/
#ifndef TRACK_PANEL_VIEW_H
@@ -123,11 +123,8 @@
TrackPanelView(TrackView* trackView);
~TrackPanelView();
- enum {Type = UserType + 7};
-
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
void calculate_bounding_rect();
- int type() const;
Track* get_track() const {return m_track;}
@@ -154,8 +151,6 @@
void update_track_name();
};
-inline int TrackPanelView::type() const {return Type;}
-
#endif
Index: songcanvas/TrackPanelViewPort.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/songcanvas/TrackPanelViewPort.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- songcanvas/TrackPanelViewPort.cpp 11 Jan 2008 15:37:52 -0000 1.12
+++ songcanvas/TrackPanelViewPort.cpp 15 Jan 2008 19:56:07 -0000 1.13
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- $Id: TrackPanelViewPort.cpp,v 1.12 2008/01/11 15:37:52 r_sijrier Exp $
+ $Id: TrackPanelViewPort.cpp,v 1.13 2008/01/15 19:56:07 r_sijrier Exp $
*/
#include "TrackPanelViewPort.h"
@@ -45,7 +45,7 @@
{
QList<QGraphicsItem *> itemlist =
items(cpointer().on_first_input_event_x(), cpointer().on_first_input_event_y());
foreach(QGraphicsItem* item, itemlist) {
- if (item->type() == ViewItem::Type) {
+ if (ViewItem::is_viewitem(item)) {
list.append((ViewItem*)item);
}
}
Index: songcanvas/ViewItem.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/ViewItem.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- songcanvas/ViewItem.cpp 5 Nov 2007 15:49:32 -0000 1.5
+++ songcanvas/ViewItem.cpp 15 Jan 2008 19:56:07 -0000 1.6
@@ -17,7 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: ViewItem.cpp,v 1.5 2007/11/05 15:49:32 r_sijrier Exp $
*/
@@ -31,6 +30,3 @@
m_parentViewItem = parentViewItem;
setCursor(themer()->get_cursor("Default"));
}
-
-
-//eof
Index: songcanvas/ViewItem.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/ViewItem.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- songcanvas/ViewItem.h 11 Jan 2008 15:37:52 -0000 1.18
+++ songcanvas/ViewItem.h 15 Jan 2008 19:56:07 -0000 1.19
@@ -17,7 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: ViewItem.h,v 1.18 2008/01/11 15:37:52 r_sijrier Exp $
*/
#ifndef VIEW_ITEM_H
@@ -62,7 +61,7 @@
virtual void calculate_bounding_rect() {
for (int i=0; i< QGraphicsItem::children().size(); ++i) {
QGraphicsItem* item = QGraphicsItem::children().at(i);
- if (item->type() == Type) {
+ if (is_viewitem(item)) {
((ViewItem*)item)->calculate_bounding_rect();
}
}
@@ -80,6 +79,11 @@
SongView* get_songview() const {return m_sv;}
+ static bool is_viewitem(QGraphicsItem* item) {
+ return item->type() == Type;
+ }
+
+
protected:
SongView* m_sv;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src/traverso CorrelationMeterWidget.cp...,
Remon Sijrier <=