diff options
author | Florian Jung <flo@windfisch.org> | 2011-09-10 17:06:00 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-09-10 17:06:00 +0000 |
commit | 24f84a489364741eb3fc126a3f83d91a86b65e27 (patch) | |
tree | 63a4e20aaf4a2ebd2462c91b574eddceeac31170 /muse2/muse/widgets/bigtime.cpp | |
parent | 38c5cccc7273247353264bb7dc97f42296d8e259 (diff) | |
parent | 2120ea4f083228dde0d7307203391a4ec8f57e2d (diff) |
merged the first bunch of orcans changes
STILL WAIT WITH COMMITTING NEW STUFF! i have to merge the rest as well!
this is a bit buggy (connect errors, not tested much), but doesn't
segfault immediately
Diffstat (limited to 'muse2/muse/widgets/bigtime.cpp')
-rw-r--r-- | muse2/muse/widgets/bigtime.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/muse2/muse/widgets/bigtime.cpp b/muse2/muse/widgets/bigtime.cpp index b47773c8..572710e2 100644 --- a/muse2/muse/widgets/bigtime.cpp +++ b/muse2/muse/widgets/bigtime.cpp @@ -1,3 +1,25 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: ./muse/widgets/bigtime.cpp $ +// +// Copyright (C) 1999-2011 by Werner Schweer and others +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; version 2 of +// the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +//========================================================= #include <stdio.h> #include <limits.h> @@ -13,6 +35,8 @@ extern int mtcType; +namespace MusEWidget { + // // the bigtime widget // display is split into several parts to avoid flickering. @@ -165,8 +189,8 @@ void BigTime::fmtButtonToggled(bool v) void BigTime::configChanged() { - setBgColor(config.bigTimeBackgroundColor); - setFgColor(config.bigTimeForegroundColor); + setBgColor(MusEConfig::config.bigTimeBackgroundColor); + setFgColor(MusEConfig::config.bigTimeForegroundColor); } //--------------------------------------------------------- @@ -208,7 +232,7 @@ bool BigTime::setString(unsigned v) int bar, beat; unsigned tick; AL::sigmap.tickValues(v, &bar, &beat, &tick); - double time = double(absFrame)/double(sampleRate); + double time = double(absFrame)/double(MusEGlobal::sampleRate); //int hour = int(time) / 3600; //int min = (int(time) / 60) % 60; int min = int(time) / 60; @@ -335,8 +359,8 @@ void BigTime::resizeEvent(QResizeEvent *ev) //dwin->setFont(f); QString fstr = QString("font-size:%1px; font-family:'Courier'; ").arg(fs); // Tim p4.0.8 dwin->setStyleSheet(fstr); - setBgColor(config.bigTimeBackgroundColor); - setFgColor(config.bigTimeForegroundColor); + setBgColor(MusEConfig::config.bigTimeBackgroundColor); + setFgColor(MusEConfig::config.bigTimeForegroundColor); int digitWidth = dwin->fontMetrics().width(QString("0")); int vspace = (ev->size().height() - (fs*2)) / 3; @@ -446,3 +470,4 @@ void BigTime::setBgColor(QColor c) setPalette(newpalette); } +} // namespace MusEWidget |