mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
QT5 -- 1 of 3
Porting the codebase to QT 5 (5.2) to get the latest bug fixes, performance and improved platform support. This first part is to fixup the codebase to compile on Qt 5, but some aspects have been broken (video). The second part is to migrate from Qwt 6.0.1 to the latest Qwt for multiaxis support. The third part will be to fixup any platform specific issues or issues identified at runtime.
This commit is contained in:
@@ -21,7 +21,11 @@
|
||||
#include <QApplication>
|
||||
#include <QtGui>
|
||||
#include <QRegExp>
|
||||
#include <QDesktopWidget>
|
||||
#include <QNetworkProxyQuery>
|
||||
#include <QMenuBar>
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
|
||||
// DATA STRUCTURES
|
||||
#include "MainWindow.h"
|
||||
@@ -75,11 +79,7 @@
|
||||
#include "HomeWindow.h"
|
||||
#include "GcScopeBar.h"
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef GC_HAVE_LION
|
||||
#include "LionFullScreen.h" // mac and lion or later
|
||||
#endif
|
||||
#include "QtMacButton.h" // mac
|
||||
#include "QtMacPopUpButton.h" // mac
|
||||
#include "QtMacSegmentedButton.h" // mac
|
||||
#else
|
||||
#include "QTFullScreen.h" // not mac!
|
||||
@@ -111,7 +111,6 @@ MainWindow::MainWindow(const QDir &home)
|
||||
context = new Context(this);
|
||||
context->athlete = new Athlete(context, home);
|
||||
|
||||
setInstanceName(context->athlete->cyclist);
|
||||
setWindowIcon(QIcon(":images/gc.png"));
|
||||
setWindowTitle(context->athlete->home.dirName());
|
||||
setContentsMargins(0,0,0,0);
|
||||
@@ -143,9 +142,6 @@ MainWindow::MainWindow(const QDir &home)
|
||||
static const QIcon tileIcon(":images/toolbar/main/tile.png");
|
||||
static const QIcon fullIcon(":images/toolbar/main/togglefull.png");
|
||||
|
||||
#if (defined Q_OS_MAC) && (defined GC_HAVE_LION)
|
||||
fullScreen = new LionFullScreen(context);
|
||||
#endif
|
||||
#ifndef Q_OS_MAC
|
||||
fullScreen = new QTFullScreen(context);
|
||||
#endif
|
||||
@@ -302,7 +298,7 @@ MainWindow::MainWindow(const QDir &home)
|
||||
|
||||
#ifdef GC_HAVE_LUCENE
|
||||
SearchFilterBox *searchBox = new SearchFilterBox(this,context,false);
|
||||
QCleanlooksStyle *toolStyle = new QCleanlooksStyle();
|
||||
QStyle *toolStyle = QStyleFactory::create("fusion");
|
||||
searchBox->setStyle(toolStyle);
|
||||
searchBox->setFixedWidth(200);
|
||||
head->addWidget(searchBox);
|
||||
@@ -319,7 +315,7 @@ MainWindow::MainWindow(const QDir &home)
|
||||
|
||||
head = new GcToolBar(this);
|
||||
|
||||
QCleanlooksStyle *toolStyle = new QCleanlooksStyle();
|
||||
QStyle *toolStyle = QStyleFactory::create("fusion");
|
||||
QPalette metal;
|
||||
metal.setColor(QPalette::Button, QColor(215,215,215));
|
||||
|
||||
@@ -437,7 +433,7 @@ MainWindow::MainWindow(const QDir &home)
|
||||
|
||||
// Add chart is on the scope bar
|
||||
chartMenu = new QMenu(this);
|
||||
QCleanlooksStyle *styler = new QCleanlooksStyle();
|
||||
QStyle *styler = QStyleFactory::create("fusion");
|
||||
QPushButton *newchart = new QPushButton("+", this);
|
||||
scopebar->addWidget(newchart);
|
||||
newchart->setStyle(styler);
|
||||
|
||||
Reference in New Issue
Block a user