//label=new QLabel();
//vbox->addWidget(label);
setMinimumHeight(10);
+ setMinimumWidth(10);
col << Qt::green << Qt::green << Qt::green << Qt::green << Qt::green << Qt::green << Qt::green << Qt::green << Qt::green << Qt::green ;
col << Qt::yellow << Qt::yellow << Qt::yellow << Qt::yellow << Qt::yellow ;
col << Qt::darkYellow << Qt::darkYellow << Qt::darkYellow;
//p.fillRect(0,0,(unsigned char)channels[0]*width()/255,height()/2,QBrush(Qt::SolidPattern));
//p.fillRect(0,height()/2,(unsigned char)channels[1]*width()/255,height()/2,QBrush(Qt::SolidPattern));
int numchan = channels.size();
+ bool horiz=width() > height();
for (int i = 0; i < numchan; i++) {
- int maxx = (unsigned char)channels[i] * width() / 127;
- int xdelta = width() / 20;
- int y1 = height() * i / numchan;
- int _h = height() / numchan - 1;
+ int maxx= (unsigned char)channels[i] * (horiz ? width() : height() ) / 127;
+ int xdelta=(horiz ? width():height() ) /20 ;
+ int _y2= (horiz ? height() :width () ) / numchan - 1 ;
+ int _y1=(horiz ? height():width() ) *i/numchan;
+ int _x2=maxx > xdelta ? xdelta - (horiz?1:3) : maxx - (horiz ?1 :3 );
+
for (int x = 0; x < 20; x++) {
+ int _x1= x *xdelta;
if (maxx > 0) {
- p.fillRect(x * xdelta, y1, maxx > xdelta ? xdelta - 1 : maxx - 1, _h, QBrush(col.at(x), Qt::SolidPattern));
+ //p.fillRect(x * xdelta, y1, maxx > xdelta ? xdelta - 1 : maxx - 1, _h, QBrush(col.at(x), Qt::SolidPattern));
+ p.fillRect(horiz?_x1:_y1, horiz?_y1:height()-_x1, horiz?_x2:_y2,horiz? _y2:-_x2, QBrush(col.at(x), Qt::SolidPattern));
maxx -= xdelta;
}
}
- p.fillRect(peeks.at(i)*width()/127-2,y1,3,_h,QBrush(Qt::black,Qt::SolidPattern));
+ int xp=peeks.at(i)*(horiz?width():height())/127-2;
+ p.fillRect(horiz?xp:_y1,horiz?_y1:height()-xdelta-xp,horiz?3:_y2,horiz?_y2:3,QBrush(Qt::black,Qt::SolidPattern));
}
p.end();
}
#include "transitionsettings.h"
#include "renderwidget.h"
#include "renderer.h"
+#include "audiosignal.h"
#ifndef NO_JOGSHUTTLE
#include "jogshuttle.h"
#endif /* NO_JOGSHUTTLE */
m_scopesList.append(m_histogramDock);
+ m_audiosignal = new AudioSignal(m_projectMonitor);
+ m_audiosignalDock = new QDockWidget(i18n("AudioSignal"), this);
+ m_audiosignalDock->setObjectName("audiosignal");
+ m_audiosignalDock->setWidget(m_audiosignal);
+ addDockWidget(Qt::TopDockWidgetArea, m_audiosignalDock);
+ if (m_projectMonitor){
+ connect(m_projectMonitor->render, SIGNAL(showAudioSignal(const QByteArray&)), m_audiosignal, SLOT(showAudio(const QByteArray&)) );
+ }
+ if (m_clipMonitor){
+ connect(m_clipMonitor->render, SIGNAL(showAudioSignal(const QByteArray&)), m_audiosignal, SLOT(showAudio(const QByteArray&)) );
+ }
+ //connect(m_histogramDock, SIGNAL(visibilityChanged(bool)), this, SLOT(slotUpdateScopeFrameRequest()));
+ //connect(m_histogram, SIGNAL(requestAutoRefresh(bool)), this, SLOT(slotUpdateScopeFrameRequest()));
+
m_undoViewDock = new QDockWidget(i18n("Undo History"), this);
m_undoViewDock->setObjectName("undo_history");
m_undoView = new QUndoView();
class Waveform;
class RGBParade;
class KActionCollection;
-
+class AudioSignal;
class MainWindow : public KXmlGuiWindow
{
QDockWidget *m_histogramDock;
Histogram *m_histogram;
+ QDockWidget *m_audiosignalDock;
+ AudioSignal *m_audiosignal;
+
QDockWidget *m_undoViewDock;
QUndoView *m_undoView;
QUndoGroup *m_commandStack;
#include "monitorscene.h"
#include "abstractclipitem.h"
#include "kdenlivesettings.h"
-#include "audiosignal.h"
#include <KDebug>
#include <KLocale>
Monitor::Monitor(QString name, MonitorManager *manager, QString profile, QWidget *parent) :
QWidget(parent),
render(NULL),
- m_audiosignal(NULL),
m_name(name),
m_monitorManager(manager),
m_currentClip(NULL),
m_monitorRefresh->setRenderer(render);
}
- QVBoxLayout *audioBox = new QVBoxLayout;
- audioBox->setContentsMargins(0, 0, 0, 0);
- m_audiosignal = new AudioSignal();
- audioBox->addWidget(m_audiosignal);
- m_ui.audio_monitor->setLayout(audioBox);
- connect(render, SIGNAL(showAudioSignal(const QByteArray)), m_audiosignal, SLOT(showAudio(const QByteArray)));
connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
connect(render, SIGNAL(durationChanged(int)), this, SLOT(adjustRulerSize(int)));
connect(render, SIGNAL(rendererStopped(int)), this, SLOT(rendererStopped(int)));
class ClipItem;
class QGraphicsView;
class QGraphicsPixmapItem;
-class AudioSignal;
class MonitorRefresh : public QWidget
{
private:
Ui::Monitor_UI m_ui;
- AudioSignal *m_audiosignal;
QString m_name;
MonitorManager *m_monitorManager;
DocClipBase *m_currentClip;