/* * Copyright (c) 2010 Mark Liversedge (liversedge@gmail.com) * * 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; either 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 "GoldenCheetah.h" #include "Colors.h" #include #include #include #include #include QWidget *GcWindow::controls() const { return _controls; } void GcWindow::setControls(QWidget *x) { _controls = x; emit controlsChanged(_controls); } QString GcWindow::instanceName() const { return _instanceName; } void GcWindow::_setInstanceName(QString x) { _instanceName = x; } QString GcWindow::title() const { return _title; } void GcWindow::setTitle(QString x) { _title = x; emit titleChanged(_title); } RideItem* GcWindow::rideItem() const { return _rideItem; } void GcWindow::setRideItem(RideItem* x) { _rideItem = x; emit rideItemChanged(_rideItem); } double GcWindow::widthFactor() const { return _widthFactor; } void GcWindow::setWidthFactor(double x) { _widthFactor = x; emit widthFactorChanged(x); } double GcWindow::heightFactor() const { return _heightFactor; } void GcWindow::setHeightFactor(double x) { _heightFactor = x; emit heightFactorChanged(x); } void GcWindow::setResizable(bool x) { _resizable = x; } bool GcWindow::resizable() const { return _resizable; } void GcWindow::setGripped(bool x) { _gripped = x; } bool GcWindow::gripped() const { return _gripped; } GcWindow::GcWindow() { } GcWindow::GcWindow(QWidget *parent) : QFrame(parent), dragState(None) { qRegisterMetaType("controls"); qRegisterMetaType("ride"); qRegisterMetaType("type"); setParent(parent); setControls(NULL); setRideItem(NULL); setTitle(""); setContentsMargins(0,0,0,0); setResizable(false); setMouseTracking(true); } GcWindow::~GcWindow() { //qDebug()<<"deleting.."<