mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Add Activity Details to Sidebar
The metadata information is now shown within the sidebar. We need to implement a mechanism for the users to configure the sidebar widgets etc pretty soon now, since this update is useful, but the sidebar is getting crowded out. Minor changes to ridemetadata to allow a 'single column' view, but mostly all the widgets were already instantiated so there is no real cost to this update.
This commit is contained in:
@@ -162,8 +162,7 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
// Metadata fields
|
||||
_rideMetadata = new RideMetadata(this);
|
||||
_rideMetadata->hide(); // never displayed
|
||||
_rideMetadata = new RideMetadata(this,true);
|
||||
metricDB = new MetricAggregator(this, home, zones(), hrZones()); // just to catch config updates!
|
||||
metricDB->refreshMetrics();
|
||||
|
||||
@@ -403,6 +402,7 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
|
||||
// POPULATE TOOLBOX
|
||||
toolBox->addItem(listView, QIcon(":images/activity.png"), "Activity History");
|
||||
toolBox->addItem(_rideMetadata, QIcon(":images/metadata.png"), "Activity Details");
|
||||
toolBox->addItem(intervalSplitter, QIcon(":images/stopwatch.png"), "Best Intervals and Laps");
|
||||
toolBox->addItem(masterControls, QIcon(":images/settings.png"), "Chart Settings");
|
||||
toolBox->addItem(new AthleteTool(QFileInfo(home.path()).path(), this), QIcon(":images/toolbar/main/athlete.png"), "Athletes");
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
/*----------------------------------------------------------------------
|
||||
* Master widget for Metadata Entry "on" RideSummaryWindow
|
||||
*--------------------------------------------------------------------*/
|
||||
RideMetadata::RideMetadata(MainWindow *parent) : QWidget(parent), main(parent)
|
||||
RideMetadata::RideMetadata(MainWindow *parent, bool singlecolumn) :
|
||||
QWidget(parent), singlecolumn(singlecolumn), main(parent)
|
||||
{
|
||||
|
||||
_ride = _connected = NULL;
|
||||
@@ -310,7 +311,7 @@ Form::arrange()
|
||||
|
||||
|
||||
for (int i=0; i<fields.count(); i++) {
|
||||
if (y >= rows) {
|
||||
if (y >= rows && meta->singlecolumn==false) {
|
||||
x+=1;
|
||||
y=0;
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ class RideMetadata : public QWidget
|
||||
RideItem *_ride, *_connected;
|
||||
|
||||
public:
|
||||
RideMetadata(MainWindow *);
|
||||
RideMetadata(MainWindow *, bool singlecolumn = false);
|
||||
static void serialize(QString filename, QList<KeywordDefinition>, QList<FieldDefinition>);
|
||||
static void readXML(QString filename, QList<KeywordDefinition>&, QList<FieldDefinition>&);
|
||||
QList<KeywordDefinition> getKeywords() { return keywordDefinitions; }
|
||||
@@ -160,6 +160,8 @@ class RideMetadata : public QWidget
|
||||
void setRideItem(RideItem *x);
|
||||
RideItem *rideItem() const;
|
||||
|
||||
bool singlecolumn;
|
||||
|
||||
public slots:
|
||||
void configUpdate();
|
||||
void metadataChanged(); // when its changed elsewhere we need to refresh fields
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<file>images/cheetah.png</file>
|
||||
<file>images/noavatar.png</file>
|
||||
<file>images/activity.png</file>
|
||||
<file>images/metadata.png</file>
|
||||
<file>images/stopwatch.png</file>
|
||||
<file>images/settings.png</file>
|
||||
<file>images/addchart.png</file>
|
||||
|
||||
Reference in New Issue
Block a user