diff options
author | Werner Schweer <ws.seh.de> | 2006-10-05 09:36:43 +0000 |
---|---|---|
committer | Werner Schweer <ws.seh.de> | 2006-10-05 09:36:43 +0000 |
commit | d7bb9793f112db0087a2d402685d0f07566d9491 (patch) | |
tree | eda96109cad99f163a1a58269bde895819a93362 | |
parent | 91da1c4495f7e08a1021ddc29557154bae5f3912 (diff) |
see ChangeLog
-rw-r--r-- | muse/ChangeLog | 3 | ||||
-rw-r--r-- | muse/all.h | 1 | ||||
-rw-r--r-- | muse/awl/tcanvas.cpp | 18 | ||||
-rw-r--r-- | muse/muse/arranger/tlwidget.cpp | 2 | ||||
-rw-r--r-- | muse/muse/conf.cpp | 14 | ||||
-rw-r--r-- | muse/muse/ctrl/ctrleditor.cpp | 4 | ||||
-rw-r--r-- | muse/muse/gconfig.cpp | 8 | ||||
-rw-r--r-- | muse/muse/gconfig.h | 2 | ||||
-rw-r--r-- | muse/muse/help.cpp | 31 | ||||
-rw-r--r-- | muse/muse/instruments/minstrument.cpp | 2 | ||||
-rw-r--r-- | muse/muse/midiedit/dcanvas.cpp | 2 | ||||
-rw-r--r-- | muse/muse/mixer/astrip.cpp | 16 | ||||
-rw-r--r-- | muse/muse/mixer/midirack.cpp | 69 | ||||
-rw-r--r-- | muse/muse/mixer/midirack.h | 2 | ||||
-rw-r--r-- | muse/muse/mixer/mstrip.cpp | 26 | ||||
-rw-r--r-- | muse/muse/mixer/rack.cpp | 90 | ||||
-rw-r--r-- | muse/muse/mixer/rack.h | 2 | ||||
-rw-r--r-- | muse/muse/mixer/strip.cpp | 2 | ||||
-rw-r--r-- | muse/muse/muse.cpp | 16 | ||||
-rw-r--r-- | muse/muse/muse.h | 1 | ||||
-rw-r--r-- | muse/muse/preferences.cpp | 137 | ||||
-rw-r--r-- | muse/muse/preferences.h | 7 | ||||
-rw-r--r-- | muse/muse/preferences.ui | 178 | ||||
-rw-r--r-- | muse/muse/widgets/utils.cpp | 14 |
24 files changed, 237 insertions, 410 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog index 90f91eeb..52e69f50 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,5 +1,8 @@ 5.10 (ws) - QT4.2 is now minimum required version + - changed font selector in "preferences" to QFontCombobox + - replace "lauchBrowser()" with "QDesktopServices::openUrl()" + - fix for drag&drop for audio plugins 4.10 (rj) - Select the right item when items are stacked on top of each other, for pianoroll and arranger (rj) @@ -114,6 +114,7 @@ #include <QtGui/QSplashScreen> #include <QtGui/QStyleFactory> #include <QtGui/QDockWidget> +#include <QtGui/QDesktopServices> #endif diff --git a/muse/awl/tcanvas.cpp b/muse/awl/tcanvas.cpp index b3d469fb..53d91462 100644 --- a/muse/awl/tcanvas.cpp +++ b/muse/awl/tcanvas.cpp @@ -500,7 +500,7 @@ void TimeCanvas::paintClockRuler(QPainter& p, const QRect& r) int y = rulerHeight - 16; p.setPen(Qt::black); - p.setFont(*config.fonts[4]); + p.setFont(config.fonts[4]); QRect tr(r); tr.setHeight(12); @@ -557,12 +557,12 @@ void TimeCanvas::paintClockRuler(QPainter& p, const QRect& r) int yy; QString s; if (sr == 0) { - p.setFont(*config.fonts[3]); + p.setFont(config.fonts[3]); s.sprintf("%d:00", min); yy = y; } else { - p.setFont(*config.fonts[1]); + p.setFont(config.fonts[1]); s.sprintf("%02d", sr); yy = y + 7; } @@ -580,7 +580,7 @@ void TimeCanvas::paintClockRuler(QPainter& p, const QRect& r) int min2 = (sec2+59)/60; for (int min = min1; min < min2; ++min) { QString s; - p.setFont(*config.fonts[3]); + p.setFont(config.fonts[3]); s.sprintf("%d", min); int xp = pos2pix(AL::Pos(min * AL::sampleRate * 60, AL::FRAMES)); p.setPen(Qt::black); @@ -632,7 +632,7 @@ void TimeCanvas::paintMetronomRuler(QPainter& p, const QRect& r) int w = r.width(); int y = rulerHeight - 16; - p.setFont(*config.fonts[4]); + p.setFont(config.fonts[4]); int h = 14; int y1 = r.y(); @@ -692,7 +692,7 @@ void TimeCanvas::paintMetronomRuler(QPainter& p, const QRect& r) for (int bar = bar1; bar <= bar2;) { AL::Pos stick(bar, 0, 0); if (metronomeRulerMag) { - p.setFont(*config.fonts[3]); + p.setFont(config.fonts[3]); int x = pos2pix(stick); QString s; s.setNum(bar + 1); @@ -719,12 +719,12 @@ void TimeCanvas::paintMetronomRuler(QPainter& p, const QRect& r) if (beat == 0) { num = bar + 1; y3 = y + 2; - p.setFont(*config.fonts[3]); + p.setFont(config.fonts[3]); } else { num = beat + 1; y3 = y + 8; - p.setFont(*config.fonts[1]); + p.setFont(config.fonts[1]); r.setY(y+3); } s.setNum(num); @@ -961,7 +961,7 @@ void TimeCanvas::setLocatorPos(int idx, const AL::Pos& val, bool follow) { if (pos[idx] == val) return; - QFontMetrics fm(*config.fonts[3]); + QFontMetrics fm(config.fonts[3]); int fw = fm.width("123") + 2; int w = qMax(markIcon[idx]->width() + 2, fw); int h = widget()->height(); diff --git a/muse/muse/arranger/tlwidget.cpp b/muse/muse/arranger/tlwidget.cpp index 87212e0b..88a7fae1 100644 --- a/muse/muse/arranger/tlwidget.cpp +++ b/muse/muse/arranger/tlwidget.cpp @@ -257,7 +257,7 @@ void TLWidget::configChanged() label->setIndent(3); //label->setAlignment(Qt::AlignCener); - label->setFont(*config.fonts[1]); + label->setFont(config.fonts[1]); label->setText(_track->cname()); label->setFixedHeight(11); diff --git a/muse/muse/conf.cpp b/muse/muse/conf.cpp index 3db8f3bc..6520727a 100644 --- a/muse/muse/conf.cpp +++ b/muse/muse/conf.cpp @@ -65,17 +65,17 @@ void readConfiguration(QDomNode node) if (tag == "theme") config.style = s; else if (tag == "font0") - config.fonts[0]->fromString(s); + config.fonts[0].fromString(s); else if (tag == "font1") - config.fonts[1]->fromString(s); + config.fonts[1].fromString(s); else if (tag == "font2") - config.fonts[2]->fromString(s); + config.fonts[2].fromString(s); else if (tag == "font3") - config.fonts[3]->fromString(s); + config.fonts[3].fromString(s); else if (tag == "font4") - config.fonts[4]->fromString(s); + config.fonts[4].fromString(s); else if (tag == "font5") - config.fonts[5]->fromString(s); + config.fonts[5].fromString(s); else if (tag == "palette0") QColorDialog::setCustomColor(0, readColor(node).rgb()); else if (tag == "palette1") @@ -400,7 +400,7 @@ void MusE::writeGlobalConfiguration(Xml& xml) const for (int i = 0; i < 6; ++i) { char buffer[32]; sprintf(buffer, "font%d", i); - xml.strTag(buffer, config.fonts[i]->toString()); + xml.strTag(buffer, config.fonts[i].toString()); } for (int i = 0; i < QColorDialog::customCount(); ++i) { char buffer[32]; diff --git a/muse/muse/ctrl/ctrleditor.cpp b/muse/muse/ctrl/ctrleditor.cpp index efc94ca3..01e86a58 100644 --- a/muse/muse/ctrl/ctrleditor.cpp +++ b/muse/muse/ctrl/ctrleditor.cpp @@ -170,9 +170,9 @@ void CtrlEditor::paint(QPainter& p, const QRect& r) // if (_drawCtrlName) { QString s(ctrl()->name()); - p.setFont(*config.fonts[3]); + p.setFont(config.fonts[3]); p.setPen(Qt::black); - QFontMetrics fm(*config.fonts[3]); + QFontMetrics fm(config.fonts[3]); int ly = fm.lineSpacing() + 2; p.drawText(2, ly, s); } diff --git a/muse/muse/gconfig.cpp b/muse/muse/gconfig.cpp index 414e3348..1d6f258a 100644 --- a/muse/muse/gconfig.cpp +++ b/muse/muse/gconfig.cpp @@ -46,7 +46,12 @@ GlobalConfigValues config = { QColor(0, 0, 0), // bigTimeBackgroundColor; QColor(200, 200, 200), // waveEditBackgroundColor; { - 0, 0, 0, 0, 0, 0 + QFont(), + QFont(), + QFont(), + QFont(), + QFont(), + QFont() }, { QColor(Qt::white), // outputTrackBg; @@ -120,4 +125,3 @@ GlobalConfigValues config = { QString("MusE/projects"), // projectPath QString("MusE/templates"), // templatePath }; - diff --git a/muse/muse/gconfig.h b/muse/muse/gconfig.h index 137fbcf0..494ea6ff 100644 --- a/muse/muse/gconfig.h +++ b/muse/muse/gconfig.h @@ -66,7 +66,7 @@ struct GlobalConfigValues { QColor bigTimeForegroundColor; QColor bigTimeBackgroundColor; QColor waveEditBackgroundColor; - QFont* fonts[6]; + QFont fonts[6]; QColor trackBg[Track::TRACK_TYPES]; diff --git a/muse/muse/help.cpp b/muse/muse/help.cpp index a2964df5..da5b987a 100644 --- a/muse/muse/help.cpp +++ b/muse/muse/help.cpp @@ -42,7 +42,7 @@ void MusE::startHelpBrowser() } } QString url("file://" + museHelp.filePath()); - launchBrowser(url); + QDesktopServices::openUrl(url); } //--------------------------------------------------------- @@ -53,7 +53,7 @@ void MusE::startHomepageBrowser() { QString museHome = QString("http://lmuse.sourceforge.net"); - launchBrowser(museHome); + QDesktopServices::openUrl(museHome); } //--------------------------------------------------------- @@ -63,7 +63,7 @@ void MusE::startHomepageBrowser() void MusE::startBugBrowser() { QString museBugPage("http://lmuse.sourceforge.net/bugs.html"); - launchBrowser(museBugPage); + QDesktopServices::openUrl(museBugPage); } //--------------------------------------------------------- @@ -86,28 +86,3 @@ void MusE::aboutQt() QMessageBox::aboutQt(this, QString("MusE")); } -//--------------------------------------------------------- -// launchBrowser -//--------------------------------------------------------- - -void MusE::launchBrowser(const QString& whereTo) - { - char testStr[40]; - strcpy(testStr, "which "); - strcat(testStr, config.helpBrowser.toAscii().data()); - if (config.helpBrowser == "" || system(testStr)) { - QMessageBox::information(this, - tr("Unable to launch help"), - tr("For some reason MusE has failed to detect or launch\n" - "a browser on your machine. Please go to Settings->Global Settings->GUI\n" - "and insert the program name of your favourite browser."), - tr("Ok"), - 0 ); - return; - } - QStringList sl; - sl.append("-c"); - sl.append(config.helpBrowser + " " + whereTo); - QProcess::startDetached("/bin/sh", sl); - } - diff --git a/muse/muse/instruments/minstrument.cpp b/muse/muse/instruments/minstrument.cpp index e7d16af4..e669d6b5 100644 --- a/muse/muse/instruments/minstrument.cpp +++ b/muse/muse/instruments/minstrument.cpp @@ -433,7 +433,7 @@ void MidiInstrument::populatePatchPopup(QMenu* menu, int) if (pg.size() > 1) { for (std::vector<PatchGroup>::iterator i = pg.begin(); i != pg.end(); ++i) { QMenu* pm = menu->addMenu(i->name); - pm->setFont(*config.fonts[0]); + pm->setFont(config.fonts[0]); PatchList& pl = i->patches; for (PatchList::const_iterator ipl = pl.begin(); ipl != pl.end(); ++ipl) { const Patch* mp = *ipl; diff --git a/muse/muse/midiedit/dcanvas.cpp b/muse/muse/midiedit/dcanvas.cpp index d3ee766b..dcf24c9a 100644 --- a/muse/muse/midiedit/dcanvas.cpp +++ b/muse/muse/midiedit/dcanvas.cpp @@ -612,7 +612,7 @@ void DrumCanvas::paintDrumList(QPainter& p, QRect r) { p.fillRect(r, QColor(0xe0, 0xe0, 0xe0)); paintVLine(p, 0, rPanelB.y(), rPanelA.x() + rPanelA.width()); - p.setFont(*config.fonts[1]); + p.setFont(config.fonts[1]); int yoff = wpos.y() - rPanelA.y(); int i = (r.y() + yoff) / drumHeight; diff --git a/muse/muse/mixer/astrip.cpp b/muse/muse/mixer/astrip.cpp index 0af3e63a..0310d501 100644 --- a/muse/muse/mixer/astrip.cpp +++ b/muse/muse/mixer/astrip.cpp @@ -278,12 +278,12 @@ Awl::VolKnob* AudioStrip::addAuxKnob(int id, Awl::VolEntry** dlabel) if (dlabel) *dlabel = pl; - pl->setFont(*config.fonts[1]); + pl->setFont(config.fonts[1]); pl->setFrame(true); pl->setFixedWidth(STRIP_WIDTH/2-2); QLabel* plb = new QLabel(label, this); - plb->setFont(*config.fonts[1]); + plb->setFont(config.fonts[1]); plb->setFixedWidth(STRIP_WIDTH/2-2); plb->setAlignment(Qt::AlignCenter); @@ -319,7 +319,7 @@ Awl::PanKnob* AudioStrip::addPanKnob(Awl::PanEntry** dlabel) if (dlabel) *dlabel = pl; - pl->setFont(*config.fonts[1]); + pl->setFont(config.fonts[1]); pl->setFrame(true); pl->setFixedSize(entrySize); @@ -327,7 +327,7 @@ Awl::PanKnob* AudioStrip::addPanKnob(Awl::PanEntry** dlabel) QLabel* plb = new QLabel; plb->setText(tr("Pan")); - plb->setFont(*config.fonts[1]); + plb->setFont(config.fonts[1]); plb->setFixedSize(entrySize); plb->setAlignment(Qt::AlignCenter); @@ -389,7 +389,7 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) connect(stereo, SIGNAL(clicked(bool)), SLOT(stereoToggled(bool))); pre = new QToolButton; - pre->setFont(*config.fonts[1]); + pre->setFont(config.fonts[1]); pre->setCheckable(true); pre->setText(tr("Pre")); pre->setToolTip(tr("pre fader - post fader")); @@ -438,7 +438,7 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) layout->addWidget(slider, 100, Qt::AlignRight); sl = new Awl::VolEntry(this); - sl->setFont(*config.fonts[1]); + sl->setFont(config.fonts[1]); sl->setSuffix(tr("dB")); sl->setFrame(true); sl->setValue(vol); @@ -523,7 +523,7 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) // if (type != Track::AUDIO_AUX && type != Track::AUDIO_SOFTSYNTH) { if (type != Track::AUDIO_AUX) { iR = new QToolButton(this); - iR->setFont(*config.fonts[1]); + iR->setFont(config.fonts[1]); iR->setFixedWidth((STRIP_WIDTH-4)/2); iR->setText(tr("iR")); iR->setCheckable(false); @@ -534,7 +534,7 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) else rBox->addSpacing((STRIP_WIDTH-4)/2); oR = new QToolButton(this); - oR->setFont(*config.fonts[1]); + oR->setFont(config.fonts[1]); oR->setFixedWidth((STRIP_WIDTH-4)/2); oR->setText(tr("oR")); oR->setCheckable(false); diff --git a/muse/muse/mixer/midirack.cpp b/muse/muse/mixer/midirack.cpp index 3e8da952..561a3d11 100644 --- a/muse/muse/mixer/midirack.cpp +++ b/muse/muse/mixer/midirack.cpp @@ -25,7 +25,7 @@ MidiRack::MidiRack(QWidget* parent, MidiTrackBase* t) setAttribute(Qt::WA_DeleteOnClose, true); verticalScrollBar()->setStyle(smallStyle); track = t; - setFont(*config.fonts[1]); + setFont(config.fonts[1]); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); @@ -112,19 +112,10 @@ void MidiRack::contextMenuEvent(QContextMenuEvent* ev) return; if (sel == newAction) { - MidiPlugin* plugin = MidiPluginDialog::getPlugin(this); - if (plugin) { - MidiPluginI* plugi = plugin->instantiate(track); - if (plugi == 0) { - printf("cannot instantiate plugin <%s>\n", - plugin->name().toLatin1().data()); - delete plugi; - } - else - audio->msgAddMidiPlugin(track, pipe->size(), plugi); - } + selectNew(); + return; } - else if (sel == removeAction) { + if (sel == removeAction) { audio->msgAddMidiPlugin(track, idx, 0); } else if (sel == bypassAction) { @@ -157,30 +148,46 @@ void MidiRack::contextMenuEvent(QContextMenuEvent* ev) void MidiRack::doubleClicked(QListWidgetItem* it) { - if (it == 0 || track == 0) + if (track == 0) return; - int idx = row(it); MidiPipeline* pipe = track->pipeline(); + bool flag = !pipe->guiVisible(idx); + pipe->showGui(idx, flag); + song->update(SC_RACK); + } - if (!pipe->value(idx)) { - bool flag = !pipe->guiVisible(idx); - pipe->showGui(idx, flag); +//--------------------------------------------------------- +// mouseDoubleClickEvent +//--------------------------------------------------------- + +void MidiRack::mouseDoubleClickEvent(QMouseEvent* event) + { + QListWidgetItem* it = itemAt(event->pos()); + if (it || (track == 0)) { + QListWidget::mouseDoubleClickEvent(event); + return; } - else { - MidiPlugin* plugin = MidiPluginDialog::getPlugin(this); - if (plugin) { - MidiPluginI* plugi = plugin->instantiate(track); - if (plugi == 0) { - printf("cannot instantiate plugin <%s>\n", - plugin->name().toLatin1().data()); - delete plugi; - } - else { - audio->msgAddMidiPlugin(track, idx, plugi); - } + selectNew(); + } + +//--------------------------------------------------------- +// selectNew +//--------------------------------------------------------- + +void MidiRack::selectNew() + { + MidiPlugin* plugin = MidiPluginDialog::getPlugin(this); + if (plugin) { + MidiPluginI* plugi = plugin->instantiate(track); + if (plugi == 0) { + printf("cannot instantiate plugin <%s>\n", + plugin->name().toLatin1().data()); + delete plugi; } + else + audio->msgAddMidiPlugin(track, track->pipeline()->size(), plugi); + song->update(SC_RACK); } - song->update(SC_RACK); } diff --git a/muse/muse/mixer/midirack.h b/muse/muse/mixer/midirack.h index c490c0f2..12389554 100644 --- a/muse/muse/mixer/midirack.h +++ b/muse/muse/mixer/midirack.h @@ -20,6 +20,8 @@ class MidiRack : public QListWidget { Q_OBJECT virtual void contextMenuEvent(QContextMenuEvent*); + virtual void mouseDoubleClickEvent(QMouseEvent*); + void selectNew(); private slots: void doubleClicked(QListWidgetItem*); diff --git a/muse/muse/mixer/mstrip.cpp b/muse/muse/mixer/mstrip.cpp index 6d8c624e..20b12a5e 100644 --- a/muse/muse/mixer/mstrip.cpp +++ b/muse/muse/mixer/mstrip.cpp @@ -55,13 +55,13 @@ void MidiChannelStrip::addKnob(int ctrl, int idx, const QString& tt, const QStri knob->setEnabled(enabled); controller[idx].dl = dl; - dl->setFont(*config.fonts[1]); + dl->setFont(config.fonts[1]); dl->setFixedSize(entrySize); dl->setEnabled(enabled); QLabel* lb = new QLabel(label, this); controller[idx].lb = lb; - lb->setFont(*config.fonts[1]); + lb->setFont(config.fonts[1]); lb->setFixedSize(entrySize); lb->setAlignment(Qt::AlignCenter); lb->setEnabled(enabled); @@ -112,7 +112,7 @@ MidiChannelStrip::MidiChannelStrip(Mixer* m, MidiChannel* t, bool align) sl = new Awl::MidiVolEntry(this); sl->setId(CTRL_VOLUME); - sl->setFont(*config.fonts[1]); + sl->setFont(config.fonts[1]); connect(slider, SIGNAL(valueChanged(double,int)), SLOT(ctrlChanged(double, int))); connect(slider, SIGNAL(sliderPressed(int)), SLOT(sliderPressed(int))); @@ -164,7 +164,7 @@ MidiChannelStrip::MidiChannelStrip(Mixer* m, MidiChannel* t, bool align) QHBoxLayout* rBox = new QHBoxLayout(0); iR = new QToolButton(this); iR->setCheckable(false); - iR->setFont(*config.fonts[1]); + iR->setFont(config.fonts[1]); iR->setFixedWidth((STRIP_WIDTH-4)/2); iR->setText(tr("iR")); iR->setToolTip(tr("input routing")); @@ -468,7 +468,7 @@ MidiStrip::MidiStrip(Mixer* m, MidiTrack* t, bool align) QHBoxLayout* rBox = new QHBoxLayout(0); iR = new QToolButton(this); - iR->setFont(*config.fonts[1]); + iR->setFont(config.fonts[1]); iR->setFixedWidth((STRIP_WIDTH-4)/2); iR->setText(tr("iR")); iR->setCheckable(false); @@ -477,7 +477,7 @@ MidiStrip::MidiStrip(Mixer* m, MidiTrack* t, bool align) connect(iR, SIGNAL(pressed()), SLOT(iRoutePressed())); oR = new QToolButton(this); - oR->setFont(*config.fonts[1]); + oR->setFont(config.fonts[1]); oR->setFixedWidth((STRIP_WIDTH-4)/2); oR->setText(tr("oR")); oR->setCheckable(false); @@ -712,7 +712,7 @@ MidiOutPortStrip::MidiOutPortStrip(Mixer* m, MidiOutPort* t, bool align) sl = new Awl::MidiVolEntry(this); sl->setId(CTRL_MASTER_VOLUME); sl->setMax(128 * 128 - 1); - sl->setFont(*config.fonts[1]); + sl->setFont(config.fonts[1]); controllerChanged(CTRL_MASTER_VOLUME); @@ -773,7 +773,7 @@ MidiOutPortStrip::MidiOutPortStrip(Mixer* m, MidiOutPort* t, bool align) rBox->addStretch(100); oR = new QToolButton(this); - oR->setFont(*config.fonts[1]); + oR->setFont(config.fonts[1]); oR->setFixedWidth((STRIP_WIDTH-4)/2); oR->setText(tr("oR")); oR->setCheckable(false); @@ -1100,7 +1100,7 @@ MidiInPortStrip::MidiInPortStrip(Mixer* m, MidiInPort* t, bool align) QHBoxLayout* rBox = new QHBoxLayout(0); iR = new QToolButton(this); - iR->setFont(*config.fonts[1]); + iR->setFont(config.fonts[1]); iR->setFixedWidth((STRIP_WIDTH-4)/2); iR->setText(tr("iR")); iR->setCheckable(false); @@ -1109,7 +1109,7 @@ MidiInPortStrip::MidiInPortStrip(Mixer* m, MidiInPort* t, bool align) connect(iR, SIGNAL(pressed()), SLOT(iRoutePressed())); oR = new QToolButton(this); - oR->setFont(*config.fonts[1]); + oR->setFont(config.fonts[1]); oR->setFixedWidth((STRIP_WIDTH-4)/2); oR->setText(tr("oR")); oR->setCheckable(false); @@ -1363,7 +1363,7 @@ MidiSyntiStrip::MidiSyntiStrip(Mixer* m, MidiSynti* t, bool align) sl = new Awl::MidiVolEntry(this); sl->setId(CTRL_MASTER_VOLUME); - sl->setFont(*config.fonts[1]); + sl->setFont(config.fonts[1]); sl->setFixedWidth(STRIP_WIDTH-2); connect(slider, SIGNAL(valueChanged(double,int)), SLOT(ctrlChanged(double, int))); @@ -1414,7 +1414,7 @@ MidiSyntiStrip::MidiSyntiStrip(Mixer* m, MidiSynti* t, bool align) QHBoxLayout* rBox = new QHBoxLayout(0); iR = new QToolButton(this); - iR->setFont(*config.fonts[1]); + iR->setFont(config.fonts[1]); iR->setFixedWidth((STRIP_WIDTH-4)/2); iR->setText(tr("iR")); iR->setCheckable(false); @@ -1423,7 +1423,7 @@ MidiSyntiStrip::MidiSyntiStrip(Mixer* m, MidiSynti* t, bool align) connect(iR, SIGNAL(pressed()), SLOT(iRoutePressed())); oR = new QToolButton(this); - oR->setFont(*config.fonts[1]); + oR->setFont(config.fonts[1]); oR->setFixedWidth((STRIP_WIDTH-4)/2); oR->setText(tr("oR")); oR->setCheckable(false); diff --git a/muse/muse/mixer/rack.cpp b/muse/muse/mixer/rack.cpp index f8e5526f..836c9394 100644 --- a/muse/muse/mixer/rack.cpp +++ b/muse/muse/mixer/rack.cpp @@ -29,7 +29,7 @@ EffectRack::EffectRack(QWidget* parent, AudioTrack* t) verticalScrollBar()->setStyle(smallStyle); track = t; - setFont(*config.fonts[1]); + setFont(config.fonts[1]); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); @@ -128,19 +128,10 @@ void EffectRack::contextMenuEvent(QContextMenuEvent* ev) return; if (sel == newAction) { - Plugin* plugin = PluginDialog::getPlugin(this); - if (plugin) { - PluginI* plugi = new PluginI(track); - if (plugi->initPluginInstance(plugin, track->channels())) { - printf("cannot instantiate plugin <%s>\n", - plugin->name().toLatin1().data()); - delete plugi; - } - else - audio->msgAddPlugin(track, idx, plugi); - } + selectNew(); + return; } - else if (sel == removeAction) { + if (sel == removeAction) { audio->msgAddPlugin(track, idx, 0); } else if (sel == bypassAction) { @@ -179,28 +170,10 @@ void EffectRack::doubleClicked(QListWidgetItem* it) { if (track == 0) return; - - if (it) { - int idx = row(it); - Pipeline* pipe = track->efxPipe(); - bool flag = !pipe->guiVisible(idx); - pipe->showGui(idx, flag); - } - else { - Plugin* plugin = PluginDialog::getPlugin(this); - if (plugin) { - PluginI* plugi = new PluginI(track); - if (plugi->initPluginInstance(plugin, track->channels())) { - printf("cannot instantiate plugin <%s>\n", - plugin->name().toLatin1().data()); - delete plugi; - } - else { - audio->msgAddPlugin(track, -1, plugi); - } - song->update(SC_RACK); - } - } + int idx = row(it); + Pipeline* pipe = track->efxPipe(); + bool flag = !pipe->guiVisible(idx); + pipe->showGui(idx, flag); } //--------------------------------------------------------- @@ -256,16 +229,19 @@ void EffectRack::startDrag(int idx) //--------------------------------------------------------- // startDrag //--------------------------------------------------------- + void EffectRack::dropEvent(QDropEvent *event) { - //printf("drop!\n"); + // printf("drop!\n"); QString text; - QListWidgetItem *i = itemAt( (event->pos()) ); - int idx = row(i); + QListWidgetItem* i = itemAt( (event->pos()) ); + int idx = -1; + if (i) + idx = row(i); Pipeline* pipe = track->efxPipe(); if (pipe) { - if ((*pipe)[idx] != NULL) { + if (i) { if(!QMessageBox::question(this, tr("Replace effect"),tr("Do you really want to replace the effect %1?").arg(pipe->name(idx)), tr("&Yes"), tr("&No"), QString::null, 0, 1 )) @@ -399,3 +375,39 @@ void EffectRack::initPlugin(QDomNode &node, int idx) } } } + +//--------------------------------------------------------- +// mouseDoubleClickEvent +//--------------------------------------------------------- + +void EffectRack::mouseDoubleClickEvent(QMouseEvent* event) + { + QListWidgetItem* it = itemAt(event->pos()); + if (it || (track == 0)) { + QListWidget::mouseDoubleClickEvent(event); + return; + } + selectNew(); + } + +//--------------------------------------------------------- +// selectNew +//--------------------------------------------------------- + +void EffectRack::selectNew() + { + Plugin* plugin = PluginDialog::getPlugin(this); + if (plugin) { + PluginI* plugi = new PluginI(track); + if (plugi->initPluginInstance(plugin, track->channels())) { + printf("cannot instantiate plugin <%s>\n", + plugin->name().toLatin1().data()); + delete plugi; + } + else + audio->msgAddPlugin(track, -1, plugi); + } + song->update(SC_RACK); + } + + diff --git a/muse/muse/mixer/rack.h b/muse/muse/mixer/rack.h index 74664d39..cea6c1ad 100644 --- a/muse/muse/mixer/rack.h +++ b/muse/muse/mixer/rack.h @@ -25,6 +25,8 @@ class EffectRack : public QListWidget { virtual void contextMenuEvent(QContextMenuEvent*); + virtual void mouseDoubleClickEvent(QMouseEvent*); + void selectNew(); void startDrag(int idx); void initPlugin(QDomNode &node, int idx); diff --git a/muse/muse/mixer/strip.cpp b/muse/muse/mixer/strip.cpp index 811fa253..5e2fdc80 100644 --- a/muse/muse/mixer/strip.cpp +++ b/muse/muse/mixer/strip.cpp @@ -35,7 +35,7 @@ void Strip::updateLabel() // qt4.1.0 specific label->setAutoFillBackground(true); - label->setFont(*config.fonts[4]); + label->setFont(config.fonts[4]); label->setText(track->name()); label->setToolTip(track->name()); } diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index 81d2c6d3..dad39210 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -2131,7 +2131,7 @@ void MusE::changeConfig(bool writeFlag) if (writeFlag) writeGlobalConfiguration(); loadTheme(config.style); - QApplication::setFont(*config.fonts[0]); + QApplication::setFont(config.fonts[0]); updateConfiguration(); emit configChanged(); } @@ -2842,18 +2842,18 @@ int main(int argc, char* argv[]) initMidiController(); MuseApplication app(argc, argv); - config.fonts[0] = new QFont(QString("arial"), 10, QFont::Normal); - config.fonts[1] = new QFont(QString("arial"), 8, QFont::Normal); - config.fonts[2] = new QFont(QString("arial"), 10, QFont::Normal); - config.fonts[3] = new QFont(QString("arial"), 8, QFont::Bold); - config.fonts[4] = new QFont(QString("arial"), 8, QFont::Bold); // simple buttons, timescale numbers - config.fonts[5] = new QFont(QString("Lucidatypewriter"), 14, QFont::Bold); + config.fonts[0] = QFont(QString("arial"), 10, QFont::Normal); + config.fonts[1] = QFont(QString("arial"), 8, QFont::Normal); + config.fonts[2] = QFont(QString("arial"), 10, QFont::Normal); + config.fonts[3] = QFont(QString("arial"), 8, QFont::Bold); + config.fonts[4] = QFont(QString("arial"), 8, QFont::Bold); // simple buttons, timescale numbers + config.fonts[5] = QFont(QString("Lucidatypewriter"), 14, QFont::Bold); initShortCuts(); gmDrumMap.initGm(); // init default drum map readConfiguration(); - QApplication::setFont(*config.fonts[0]); + QApplication::setFont(config.fonts[0]); // this style is used for scrollbars in mixer plugin racks: smallStyle = new QWindowsStyle(); diff --git a/muse/muse/muse.h b/muse/muse/muse.h index 987fb29e..3b88bcd2 100644 --- a/muse/muse/muse.h +++ b/muse/muse/muse.h @@ -187,7 +187,6 @@ class MusE : public QMainWindow // , public Ui::MuseBase void startHelpBrowser(); void startHomepageBrowser(); void startBugBrowser(); - void launchBrowser(const QString &whereTo); void importMidi(); void importWave(); bool importWave(const QString&); diff --git a/muse/muse/preferences.cpp b/muse/muse/preferences.cpp index 979ef2b1..ad9cc576 100644 --- a/muse/muse/preferences.cpp +++ b/muse/muse/preferences.cpp @@ -222,19 +222,6 @@ PreferencesDialog::PreferencesDialog(Arranger* a, QWidget* parent) // Fonts //--------------------------------------------------- - fontBrowse0->setIcon(*openIcon); - fontBrowse1->setIcon(*openIcon); - fontBrowse2->setIcon(*openIcon); - fontBrowse3->setIcon(*openIcon); - fontBrowse4->setIcon(*openIcon); - fontBrowse5->setIcon(*openIcon); - connect(fontBrowse0, SIGNAL(clicked()), SLOT(browseFont0())); - connect(fontBrowse1, SIGNAL(clicked()), SLOT(browseFont1())); - connect(fontBrowse2, SIGNAL(clicked()), SLOT(browseFont2())); - connect(fontBrowse3, SIGNAL(clicked()), SLOT(browseFont3())); - connect(fontBrowse4, SIGNAL(clicked()), SLOT(browseFont4())); - connect(fontBrowse5, SIGNAL(clicked()), SLOT(browseFont5())); - connect(applyButton, SIGNAL(clicked()), SLOT(apply())); connect(okButton, SIGNAL(clicked()), SLOT(ok())); connect(cancelButton, SIGNAL(clicked()), SLOT(cancel())); @@ -435,35 +422,35 @@ PreferencesDialog::~PreferencesDialog() void PreferencesDialog::updateFonts() { - fontSize0->setValue(config->fonts[0]->pointSize()); - fontName0->setText(config->fonts[0]->family()); - italic0->setChecked(config->fonts[0]->italic()); - bold0->setChecked(config->fonts[0]->bold()); - - fontSize1->setValue(config->fonts[1]->pointSize()); - fontName1->setText(config->fonts[1]->family()); - italic1->setChecked(config->fonts[1]->italic()); - bold1->setChecked(config->fonts[1]->bold()); - - fontSize2->setValue(config->fonts[2]->pointSize()); - fontName2->setText(config->fonts[2]->family()); - italic2->setChecked(config->fonts[2]->italic()); - bold2->setChecked(config->fonts[2]->bold()); - - fontSize3->setValue(config->fonts[3]->pointSize()); - fontName3->setText(config->fonts[3]->family()); - italic3->setChecked(config->fonts[3]->italic()); - bold3->setChecked(config->fonts[3]->bold()); - - fontSize4->setValue(config->fonts[4]->pointSize()); - fontName4->setText(config->fonts[4]->family()); - italic4->setChecked(config->fonts[4]->italic()); - bold4->setChecked(config->fonts[4]->bold()); - - fontSize5->setValue(config->fonts[5]->pointSize()); - fontName5->setText(config->fonts[5]->family()); - italic5->setChecked(config->fonts[5]->italic()); - bold5->setChecked(config->fonts[5]->bold()); + fontSize0->setValue(config->fonts[0].pointSize()); + fontName0->setCurrentFont(config->fonts[0]); + italic0->setChecked(config->fonts[0].italic()); + bold0->setChecked(config->fonts[0].bold()); + + fontSize1->setValue(config->fonts[1].pointSize()); + fontName1->setCurrentFont(config->fonts[1]); + italic1->setChecked(config->fonts[1].italic()); + bold1->setChecked(config->fonts[1].bold()); + + fontSize2->setValue(config->fonts[2].pointSize()); + fontName2->setCurrentFont(config->fonts[2]); + italic2->setChecked(config->fonts[2].italic()); + bold2->setChecked(config->fonts[2].bold()); + + fontSize3->setValue(config->fonts[3].pointSize()); + fontName3->setCurrentFont(config->fonts[3]); + italic3->setChecked(config->fonts[3].italic()); + bold3->setChecked(config->fonts[3].bold()); + + fontSize4->setValue(config->fonts[4].pointSize()); + fontName4->setCurrentFont(config->fonts[4]); + italic4->setChecked(config->fonts[4].italic()); + bold4->setChecked(config->fonts[4].bold()); + + fontSize5->setValue(config->fonts[5].pointSize()); + fontName5->setCurrentFont(config->fonts[5]); + italic5->setChecked(config->fonts[5].italic()); + bold5->setChecked(config->fonts[5].bold()); } //--------------------------------------------------------- @@ -500,31 +487,38 @@ void PreferencesDialog::apply() config->canvasUseBgPixmap = usePixmap->isChecked(); if (currentBg != "<none>") config->canvasBgPixmap = currentBg; - config->fonts[0]->setPointSize(fontSize0->value()); - config->fonts[0]->setItalic(italic0->isChecked()); - config->fonts[0]->setBold(bold0->isChecked()); - QApplication::setFont(*config->fonts[0]); + config->fonts[0] = fontName0->currentFont(); + config->fonts[0].setPointSize(fontSize0->value()); + config->fonts[0].setItalic(italic0->isChecked()); + config->fonts[0].setBold(bold0->isChecked()); + + QApplication::setFont(config->fonts[0]); - config->fonts[1]->setPointSize(fontSize1->value()); - config->fonts[1]->setItalic(italic1->isChecked()); - config->fonts[1]->setBold(bold1->isChecked()); + config->fonts[1] = fontName1->currentFont(); + config->fonts[1].setPointSize(fontSize1->value()); + config->fonts[1].setItalic(italic1->isChecked()); + config->fonts[1].setBold(bold1->isChecked()); - config->fonts[2]->setPointSize(fontSize2->value()); - config->fonts[2]->setItalic(italic2->isChecked()); - config->fonts[2]->setBold(bold2->isChecked()); + config->fonts[2] = fontName2->currentFont(); + config->fonts[2].setPointSize(fontSize2->value()); + config->fonts[2].setItalic(italic2->isChecked()); + config->fonts[2].setBold(bold2->isChecked()); - config->fonts[3]->setPointSize(fontSize3->value()); - config->fonts[3]->setItalic(italic3->isChecked()); - config->fonts[3]->setBold(bold3->isChecked()); + config->fonts[3] = fontName3->currentFont(); + config->fonts[3].setPointSize(fontSize3->value()); + config->fonts[3].setItalic(italic3->isChecked()); + config->fonts[3].setBold(bold3->isChecked()); - config->fonts[4]->setPointSize(fontSize4->value()); - config->fonts[4]->setItalic(italic4->isChecked()); - config->fonts[4]->setBold(bold4->isChecked()); + config->fonts[4] = fontName4->currentFont(); + config->fonts[4].setPointSize(fontSize4->value()); + config->fonts[4].setItalic(italic4->isChecked()); + config->fonts[4].setBold(bold4->isChecked()); - config->fonts[5]->setPointSize(fontSize5->value()); - config->fonts[5]->setItalic(italic5->isChecked()); - config->fonts[5]->setBold(bold5->isChecked()); + config->fonts[5] = fontName5->currentFont(); + config->fonts[5].setPointSize(fontSize5->value()); + config->fonts[5].setItalic(italic5->isChecked()); + config->fonts[5].setBold(bold5->isChecked()); config->style = themeComboBox->currentText(); // setting up a new theme might change the fontsize, so re-read @@ -854,27 +848,6 @@ void PreferencesDialog::paletteClicked(QAbstractButton* button) } //--------------------------------------------------------- -// browseFont -//--------------------------------------------------------- - -void PreferencesDialog::browseFont0() { browseFont(0); } -void PreferencesDialog::browseFont1() { browseFont(1); } -void PreferencesDialog::browseFont2() { browseFont(2); } -void PreferencesDialog::browseFont3() { browseFont(3); } -void PreferencesDialog::browseFont4() { browseFont(4); } -void PreferencesDialog::browseFont5() { browseFont(5); } - -void PreferencesDialog::browseFont(int n) - { - bool ok; - QFont font = QFontDialog::getFont(&ok, *config->fonts[n], this); - if (ok) { - config->fonts[n] = new QFont(font); - updateFonts(); - } - } - -//--------------------------------------------------------- // usePixmapToggled //--------------------------------------------------------- diff --git a/muse/muse/preferences.h b/muse/muse/preferences.h index c3ab3929..13aaf252 100644 --- a/muse/muse/preferences.h +++ b/muse/muse/preferences.h @@ -52,13 +52,6 @@ class PreferencesDialog : public QDialog, public Ui::PreferencesDialogBase { void configCanvasBgColor(); void configCanvasBgPixmap(); void colorItemSelectionChanged(); - void browseFont(int); - void browseFont0(); - void browseFont1(); - void browseFont2(); - void browseFont3(); - void browseFont4(); - void browseFont5(); void hsliderChanged(int); void ssliderChanged(int); void vsliderChanged(int); diff --git a/muse/muse/preferences.ui b/muse/muse/preferences.ui index a31d9afb..7e690d89 100644 --- a/muse/muse/preferences.ui +++ b/muse/muse/preferences.ui @@ -22,7 +22,7 @@ <item> <widget class="QTabWidget" name="tabWidget" > <property name="currentIndex" > - <number>1</number> + <number>6</number> </property> <widget class="QWidget" name="tab" > <attribute name="title" > @@ -1973,54 +1973,6 @@ </property> </widget> </item> - <item row="1" column="1" > - <widget class="QLineEdit" name="fontName0" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="2" column="1" > - <widget class="QLineEdit" name="fontName1" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="3" column="1" > - <widget class="QLineEdit" name="fontName2" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="4" column="1" > - <widget class="QLineEdit" name="fontName3" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> <item row="1" column="0" > <widget class="QLabel" name="textLabel3_3" > <property name="text" > @@ -2132,66 +2084,6 @@ </property> </widget> </item> - <item row="1" column="5" > - <widget class="QToolButton" name="fontBrowse0" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>...</string> - </property> - </widget> - </item> - <item row="2" column="5" > - <widget class="QToolButton" name="fontBrowse1" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>...</string> - </property> - </widget> - </item> - <item row="3" column="5" > - <widget class="QToolButton" name="fontBrowse2" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>...</string> - </property> - </widget> - </item> - <item row="4" column="5" > - <widget class="QToolButton" name="fontBrowse3" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>...</string> - </property> - </widget> - </item> <item row="5" column="0" > <widget class="QLabel" name="textLabel7_4" > <property name="text" > @@ -2199,18 +2091,6 @@ </property> </widget> </item> - <item row="5" column="1" > - <widget class="QLineEdit" name="fontName4" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> <item row="6" column="0" > <widget class="QLabel" name="textLabel7_5" > <property name="text" > @@ -2218,18 +2098,6 @@ </property> </widget> </item> - <item row="6" column="1" > - <widget class="QLineEdit" name="fontName5" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> <item row="5" column="2" > <widget class="QSpinBox" name="fontSize4" > <property name="sizePolicy" > @@ -2282,35 +2150,23 @@ </property> </widget> </item> - <item row="5" column="5" > - <widget class="QToolButton" name="fontBrowse4" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>...</string> - </property> - </widget> + <item row="1" column="1" > + <widget class="QFontComboBox" name="fontName0" /> </item> - <item row="6" column="5" > - <widget class="QToolButton" name="fontBrowse5" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>...</string> - </property> - </widget> + <item row="2" column="1" > + <widget class="QFontComboBox" name="fontName1" /> + </item> + <item row="3" column="1" > + <widget class="QFontComboBox" name="fontName2" /> + </item> + <item row="4" column="1" > + <widget class="QFontComboBox" name="fontName3" /> + </item> + <item row="5" column="1" > + <widget class="QFontComboBox" name="fontName4" /> + </item> + <item row="6" column="1" > + <widget class="QFontComboBox" name="fontName5" /> </item> </layout> </widget> diff --git a/muse/muse/widgets/utils.cpp b/muse/muse/widgets/utils.cpp index 9458fe83..89417f5c 100644 --- a/muse/muse/widgets/utils.cpp +++ b/muse/muse/widgets/utils.cpp @@ -222,7 +222,7 @@ SimpleButton* newMuteButton() { // SimpleButton* mute = new SimpleButton(parent, muteIconOff, muteIconOn); SimpleButton* mute = new SimpleButton(QT_TR_NOOP("m")); - mute->setFont(*config.fonts[BFONT]); + mute->setFont(config.fonts[BFONT]); mute->setCheckable(true); mute->setToolTip(QT_TR_NOOP("mute")); return mute; @@ -236,7 +236,7 @@ SimpleButton* newSoloButton() { // SimpleButton* solo = new SimpleButton(parent, soloIconOn, soloIconOff); SimpleButton* solo = new SimpleButton(QT_TR_NOOP("s")); - solo->setFont(*config.fonts[BFONT]); + solo->setFont(config.fonts[BFONT]); solo->setCheckable(true); solo->setToolTip(QT_TR_NOOP("solo")); return solo; @@ -249,7 +249,7 @@ SimpleButton* newSoloButton() SimpleButton* newMonitorButton() { SimpleButton* monitor = new SimpleButton(QT_TR_NOOP("Mo")); - monitor->setFont(*config.fonts[BFONT]); + monitor->setFont(config.fonts[BFONT]); monitor->setCheckable(true); monitor->setToolTip(QT_TR_NOOP("monitor")); return monitor; @@ -262,7 +262,7 @@ SimpleButton* newMonitorButton() SimpleButton* newDrumMapButton() { SimpleButton* dm = new SimpleButton(QT_TR_NOOP("Dr")); - dm->setFont(*config.fonts[BFONT]); + dm->setFont(config.fonts[BFONT]); dm->setCheckable(true); dm->setToolTip(QT_TR_NOOP("use drum map")); return dm; @@ -296,7 +296,7 @@ SimpleButton* newRecordButton() SimpleButton* newAutoReadButton() { SimpleButton* ar = new SimpleButton(QT_TR_NOOP("aR")); - ar->setFont(*config.fonts[BFONT]); + ar->setFont(config.fonts[BFONT]); ar->setCheckable(true); ar->setToolTip(QT_TR_NOOP("automation read")); return ar; @@ -309,7 +309,7 @@ SimpleButton* newAutoReadButton() SimpleButton* newAutoWriteButton() { SimpleButton* aw = new SimpleButton(QT_TR_NOOP("aW")); - aw->setFont(*config.fonts[BFONT]); + aw->setFont(config.fonts[BFONT]); aw->setCheckable(true); aw->setToolTip(QT_TR_NOOP("automation write")); return aw; @@ -322,7 +322,7 @@ SimpleButton* newAutoWriteButton() SimpleButton* newSyncButton() { SimpleButton* sync = new SimpleButton(QT_TR_NOOP("sync")); - sync->setFont(*config.fonts[BFONT]); + sync->setFont(config.fonts[BFONT]); sync->setCheckable(true); sync->setToolTip(QT_TR_NOOP("send sync events")); return sync; |