summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog4
-rw-r--r--muse2/muse/app.cpp21
-rw-r--r--muse2/muse/arranger/arranger.cpp23
-rw-r--r--muse2/muse/arranger/arranger.h1
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp2
5 files changed, 48 insertions, 3 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 803419d9..c12fd56a 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,7 @@
+31.12.2010:
+ - Possible fix for arranger focussing problems. (Tim)
+ Added parent->setFocusProxy(canvas) just after canvas created.
+ Also added to pianoroll.
30.12.2010:
- Suggestion by OOM team: Add default velocity controllers to pianoroll and drum edit. (Tim)
*Feature: Appearance part color names now can now be edited. (Tim)
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 968c9388..3758bcb9 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -764,6 +764,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
setIconSize(ICON_SIZE);
setFocusPolicy(Qt::WheelFocus);
+ //setFocusPolicy(Qt::NoFocus);
muse = this; // hack
clipListEdit = 0;
midiSyncConfig = 0;
@@ -1469,7 +1470,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
arranger = new Arranger(this, "arranger");
setCentralWidget(arranger);
-
+
connect(tools1, SIGNAL(toolChanged(int)), arranger, SLOT(setTool(int)));
connect(arranger, SIGNAL(editPart(Track*)), SLOT(startEditor(Track*)));
connect(arranger, SIGNAL(dropSongFile(const QString&)), SLOT(loadProjectFile(const QString&)));
@@ -3417,6 +3418,24 @@ void MusE::kbAccel(int key)
else if (key == shortcuts[SHRT_PLAY_SONG].key ) {
song->setPlay(true);
}
+
+ /*
+ else if (key == shortcuts[SHRT_POS_DEC].key) {
+ int pos = song->pos();
+ int frames = pos - AL::sigmap.rasterStep(pos, *_raster);
+ if (frames < 0)
+ frames = 0;
+ Pos p(frames,true);
+ song->setPos(0, p, true, true, true);
+ return;
+ }
+ else if (key == shortcuts[SHRT_POS_INC].key) {
+ Pos p(pos[0] + AL::sigmap.rasterStep(pos[0], *_raster), true);
+ song->setPos(0, p, true, true, true); //CDW
+ return;
+ }
+ */
+
else if (key == shortcuts[SHRT_GOTO_LEFT].key) {
if (!song->record())
song->setPos(0, song->lPos());
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp
index 95196933..6d722f34 100644
--- a/muse2/muse/arranger/arranger.cpp
+++ b/muse2/muse/arranger/arranger.cpp
@@ -107,6 +107,9 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
showTrackinfoFlag = true;
cursVal = MAXINT;
+
+ //setFocusPolicy(Qt::StrongFocus);
+
//---------------------------------------------------
// ToolBar
// create toolbar in toplevel widget
@@ -137,7 +140,8 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
raster->setCurrentIndex(1);
toolbar->addWidget(raster);
connect(raster, SIGNAL(activated(int)), SLOT(_setRaster(int)));
- raster->setFocusPolicy(Qt::NoFocus);
+ ///raster->setFocusPolicy(Qt::NoFocus);
+ raster->setFocusPolicy(Qt::TabFocus);
// Song len
label = new QLabel(tr("Len"));
@@ -163,7 +167,8 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
typeBox->setCurrentIndex(0);
typeBox->setToolTip(tr("midi song type"));
typeBox->setWhatsThis(tr("midi song type"));
- typeBox->setFocusPolicy(Qt::NoFocus);
+ ///typeBox->setFocusPolicy(Qt::NoFocus);
+ typeBox->setFocusPolicy(Qt::TabFocus);
toolbar->addWidget(typeBox);
connect(typeBox, SIGNAL(activated(int)), SLOT(modeChange(int)));
@@ -365,6 +370,8 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
canvas->setCanvasTools(arrangerTools);
canvas->setOrigin(-offset, 0);
canvas->setFocus();
+ parent->setFocusProxy(canvas); // Tim.
+
connect(canvas, SIGNAL(setUsedTool(int)), this, SIGNAL(setUsedTool(int)));
connect(canvas, SIGNAL(trackChanged(Track*)), list, SLOT(selectTrack(Track*)));
connect(list, SIGNAL(keyPressExt(QKeyEvent*)), canvas, SLOT(redirKeypress(QKeyEvent*)));
@@ -417,6 +424,14 @@ Arranger::Arranger(QMainWindow* parent, const char* name)
if(canvas->part())
midiTrackInfo->setTrack(canvas->part()->track()); // Tim.
showTrackInfo(showTrackinfoFlag);
+
+ // Take care of some tabbies!
+ setTabOrder(tempo200, trackInfo);
+ setTabOrder(trackInfo, infoScroll);
+ setTabOrder(infoScroll, list);
+ setTabOrder(list, canvas);
+ setTabOrder(canvas, ib);
+ setTabOrder(ib, hscroll);
}
//---------------------------------------------------------
@@ -942,6 +957,7 @@ void Arranger::showTrackInfo(bool flag)
void Arranger::genTrackInfo(QWidget* parent)
{
trackInfo = new WidgetStack(parent, "trackInfoStack");
+ //trackInfo->setFocusPolicy(Qt::TabFocus); // p4.0.9
noTrackInfo = new QWidget(trackInfo);
noTrackInfo->setAutoFillBackground(true);
@@ -958,6 +974,7 @@ void Arranger::genTrackInfo(QWidget* parent)
noTrackInfo->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
midiTrackInfo = new MidiTrackInfo(trackInfo);
+ //midiTrackInfo->setFocusPolicy(Qt::TabFocus); // p4.0.9
trackInfo->addWidget(noTrackInfo, 0);
trackInfo->addWidget(midiTrackInfo, 1);
trackInfo->addWidget(0, 2);
@@ -1006,11 +1023,13 @@ void Arranger::switchInfo(int n)
if (w)
delete w;
w = new AudioStrip(trackInfo, (AudioTrack*)selected);
+ //w->setFocusPolicy(Qt::TabFocus); // p4.0.9
connect(song, SIGNAL(songChanged(int)), w, SLOT(songChanged(int)));
connect(muse, SIGNAL(configChanged()), w, SLOT(configChanged()));
w->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
trackInfo->addWidget(w, 2);
w->show();
+ //setTabOrder(midiTrackInfo, w); // p4.0.9
tgrid->activate();
tgrid->update(); // muse-2 Qt4
}
diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h
index af3cc4b0..d8e2c3fc 100644
--- a/muse2/muse/arranger/arranger.h
+++ b/muse2/muse/arranger/arranger.h
@@ -21,6 +21,7 @@ class QMenu;
class QScrollBar;
class QToolButton;
class QWheelEvent;
+class QKeyEvent;
class Header;
class TList;
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index 53b92f91..56507466 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -410,6 +410,8 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
canvas = new PianoCanvas(this, split1, xscale, yscale);
vscroll = new ScrollScale(-3, 7, yscale, KH * 75, Qt::Vertical, split1);
+ setFocusProxy(canvas); // Tim.
+
int offset = -(config.division/4);
canvas->setOrigin(offset, 0);
canvas->setCanvasTools(pianorollTools);