Skip to content

Commit

Permalink
Use consistent terminology
Browse files Browse the repository at this point in the history
.. more renaming of overview charts to tiles, and also renamed
   the AddChartWizard to AddTileWizard.
  • Loading branch information
liversedge committed Dec 30, 2021
1 parent a41935d commit 8aa6818
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/Charts/Overview.cpp
Expand Up @@ -20,7 +20,7 @@
#include "ChartSpace.h"
#include "OverviewItems.h"
#include "UserChartOverviewItem.h"
#include "AddChartWizard.h"
#include "AddTileWizard.h"
#include "Utils.h"
#include "HelpWhatsThis.h"

Expand Down Expand Up @@ -97,7 +97,7 @@ OverviewWindow::addTile()
{
ChartSpaceItem *added = NULL; // tell us what you added...

AddChartWizard *p = new AddChartWizard(context, space, scope, added);
AddTileWizard *p = new AddTileWizard(context, space, scope, added);
p->exec(); // no mem leak delete on close dialog

// set ride / date range if we added one.....
Expand Down
42 changes: 21 additions & 21 deletions src/Gui/AddChartWizard.cpp → src/Gui/AddTileWizard.cpp
Expand Up @@ -16,7 +16,7 @@
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "AddChartWizard.h"
#include "AddTileWizard.h"
#include "Context.h"
#include "MainWindow.h"
#include "HelpWhatsThis.h"
Expand All @@ -36,7 +36,7 @@
//

// Main wizard - if passed a service name we are in edit mode, not add mode.
AddChartWizard::AddChartWizard(Context *context, ChartSpace *space, int scope, ChartSpaceItem * &added)
AddTileWizard::AddTileWizard(Context *context, ChartSpace *space, int scope, ChartSpaceItem * &added)
: QWizard(context->mainWindow), context(context), scope(scope), space(space), added(added)
{
HelpWhatsThis *help = new HelpWhatsThis(this);
Expand All @@ -52,10 +52,10 @@ AddChartWizard::AddChartWizard(Context *context, ChartSpace *space, int scope, C
setMinimumWidth(600 *dpiXFactor);
setMinimumHeight(500 *dpiYFactor);

setWindowTitle(tr("Add Chart Wizard"));
setPage(01, new AddChartType(this));
setPage(02, new AddChartConfig(this));
setPage(03, new AddChartFinal(this));
setWindowTitle(tr("Add Tile Wizard"));
setPage(01, new AddTileType(this));
setPage(02, new AddTileConfig(this));
setPage(03, new AddTileFinal(this));

done = false;
config = NULL;
Expand All @@ -67,10 +67,10 @@ AddChartWizard::AddChartWizard(Context *context, ChartSpace *space, int scope, C
*--------------------------------------------------------------------*/

//Select Cloud type
AddChartType::AddChartType(AddChartWizard *parent) : QWizardPage(parent), wizard(parent)
AddTileType::AddTileType(AddTileWizard *parent) : QWizardPage(parent), wizard(parent)
{
setTitle(tr("Chart Type"));
setSubTitle(tr("Select the chart type"));
setTitle(tr("Tile Type"));
setSubTitle(tr("Select the type of tile"));

QVBoxLayout *layout = new QVBoxLayout;
setLayout(layout);
Expand All @@ -91,7 +91,7 @@ AddChartType::AddChartType(AddChartWizard *parent) : QWizardPage(parent), wizard
}

void
AddChartType::initializePage()
AddTileType::initializePage()
{
// clear whatever we have, if anything
QLayoutItem *item = NULL;
Expand Down Expand Up @@ -122,7 +122,7 @@ AddChartType::initializePage()
}

void
AddChartType::clicked(int p)
AddTileType::clicked(int p)
{
wizard->type = p;
wizard->detail = ChartSpaceItemRegistry::instance().detailForType(p);
Expand All @@ -131,17 +131,17 @@ AddChartType::clicked(int p)
}

// Scan for Cloud port / usb etc
AddChartConfig::AddChartConfig(AddChartWizard *parent) : QWizardPage(parent), wizard(parent)
AddTileConfig::AddTileConfig(AddTileWizard *parent) : QWizardPage(parent), wizard(parent)
{
setSubTitle(tr("Chart Settings"));
setSubTitle(tr("Tile Settings"));

main = new QVBoxLayout(this);
}

void
AddChartConfig::initializePage()
AddTileConfig::initializePage()
{
setTitle(QString(tr("Chart Settings")));
setTitle(QString(tr("Tile Settings")));

if (wizard->config) {
wizard->config->hide();
Expand All @@ -160,7 +160,7 @@ AddChartConfig::initializePage()
wizard->config->show();
}

AddChartConfig::~AddChartConfig()
AddTileConfig::~AddTileConfig()
{
// spare the config widget being destroyed
if (wizard->config) {
Expand All @@ -173,27 +173,27 @@ AddChartConfig::~AddChartConfig()
}

bool
AddChartConfig::validatePage()
AddTileConfig::validatePage()
{
return true;
}

// Final confirmation
AddChartFinal::AddChartFinal(AddChartWizard *parent) : QWizardPage(parent), wizard(parent)
AddTileFinal::AddTileFinal(AddTileWizard *parent) : QWizardPage(parent), wizard(parent)
{
setTitle(tr("Done"));
setSubTitle(tr("Add Chart"));
setSubTitle(tr("Add Tile"));
QVBoxLayout *blank = new QVBoxLayout(this); // just blank .. for now
blank->addWidget(new QWidget(this));
}

void
AddChartFinal::initializePage()
AddTileFinal::initializePage()
{
}

bool
AddChartFinal::validatePage()
AddTileFinal::validatePage()
{
// add to the top left
if (wizard->item) {
Expand Down
30 changes: 15 additions & 15 deletions src/Gui/AddChartWizard.h → src/Gui/AddTileWizard.h
Expand Up @@ -16,22 +16,22 @@
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef _AddChartWizard_h
#define _AddChartWizard_h
#ifndef _AddTileWizard_h
#define _AddTileWizard_h

#include "GoldenCheetah.h"
#include "Context.h"
#include "ChartSpace.h"

#include <QWizard>

class AddChartWizard : public QWizard
class AddTileWizard : public QWizard
{
Q_OBJECT

public:

AddChartWizard(Context *context, ChartSpace *space, int scope, ChartSpaceItem * &added);
AddTileWizard(Context *context, ChartSpace *space, int scope, ChartSpaceItem * &added);
QSize sizeHint() const { return QSize(600,650); }

Context *context;
Expand All @@ -54,12 +54,12 @@ class AddChartWizard : public QWizard

};

class AddChartType : public QWizardPage
class AddTileType : public QWizardPage
{
Q_OBJECT

public:
AddChartType(AddChartWizard *);
AddTileType(AddTileWizard *);
void initializePage();
bool validate() const { return false; }
bool isComplete() const { return false; }
Expand All @@ -69,21 +69,21 @@ class AddChartType : public QWizardPage
void clicked(int);

private:
AddChartWizard *wizard;
AddTileWizard *wizard;
QSignalMapper *mapper;
QWidget *buttons;
QVBoxLayout *buttonlayout;
QScrollArea *scrollarea;
};


class AddChartConfig : public QWizardPage
class AddTileConfig : public QWizardPage
{
Q_OBJECT

public:
AddChartConfig(AddChartWizard *);
~AddChartConfig(); // spare the item's config widget when we die
AddTileConfig(AddTileWizard *);
~AddTileConfig(); // spare the item's config widget when we die
void initializePage();
bool validate() const { return true; }
bool isComplete() const { return true; }
Expand All @@ -93,24 +93,24 @@ class AddChartConfig : public QWizardPage
public slots:

private:
AddChartWizard *wizard;
AddTileWizard *wizard;
QVBoxLayout *main;
};


class AddChartFinal : public QWizardPage
class AddTileFinal : public QWizardPage
{
Q_OBJECT

public:
AddChartFinal(AddChartWizard *);
AddTileFinal(AddTileWizard *);
void initializePage();
bool validatePage();
bool isCommitPage() { return true; }

private:
AddChartWizard *wizard;
AddTileWizard *wizard;

};

#endif // _AddChartWizard_h
#endif // _AddTileWizard_h
4 changes: 2 additions & 2 deletions src/src.pro
Expand Up @@ -737,7 +737,7 @@ HEADERS += Gui/AboutDialog.h Gui/AddIntervalDialog.h Gui/AnalysisSidebar.h Gui/C
Gui/SaveDialogs.h Gui/SearchBox.h Gui/SearchFilterBox.h Gui/SolveCPDialog.h Gui/AthleteTab.h Gui/AbstractView.h Gui/ToolsRhoEstimator.h \
Gui/Views.h Gui/BatchExportDialog.h Gui/DownloadRideDialog.h Gui/ManualRideDialog.h Gui/NewMainWindow.h Gui/NewSideBar.h \
Gui/MergeActivityWizard.h Gui/RideImportWizard.h Gui/SplitActivityWizard.h Gui/SolverDisplay.h Gui/MetricSelect.h \
Gui/AddChartWizard.h Gui/NavigationModel.h Gui/AthleteView.h Gui/AthleteConfigDialog.h Gui/AthletePages.h Gui/Perspective.h \
Gui/AddTileWizard.h Gui/NavigationModel.h Gui/AthleteView.h Gui/AthleteConfigDialog.h Gui/AthletePages.h Gui/Perspective.h \
Gui/PerspectiveDialog.h

# metrics and models
Expand Down Expand Up @@ -842,7 +842,7 @@ SOURCES += Gui/AboutDialog.cpp Gui/AddIntervalDialog.cpp Gui/AnalysisSidebar.cpp
Gui/SearchBox.cpp Gui/SearchFilterBox.cpp Gui/SolveCPDialog.cpp Gui/AthleteTab.cpp Gui/AbstractView.cpp Gui/ToolsRhoEstimator.cpp Gui/Views.cpp \
Gui/BatchExportDialog.cpp Gui/DownloadRideDialog.cpp Gui/ManualRideDialog.cpp Gui/EditUserMetricDialog.cpp Gui/NewMainWindow.cpp Gui/NewSideBar.cpp \
Gui/MergeActivityWizard.cpp Gui/RideImportWizard.cpp Gui/SplitActivityWizard.cpp Gui/SolverDisplay.cpp Gui/MetricSelect.cpp \
Gui/AddChartWizard.cpp Gui/NavigationModel.cpp Gui/AthleteView.cpp Gui/AthleteConfigDialog.cpp Gui/AthletePages.cpp Gui/Perspective.cpp \
Gui/AddTileWizard.cpp Gui/NavigationModel.cpp Gui/AthleteView.cpp Gui/AthleteConfigDialog.cpp Gui/AthletePages.cpp Gui/Perspective.cpp \
Gui/PerspectiveDialog.cpp

## Models and Metrics
Expand Down

0 comments on commit 8aa6818

Please sign in to comment.