Subversion Repositories public

Rev

Rev 100 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/***************************************************************************
 *   Copyright (C) 2007 by Andreas Theofilu                             *
 *   andreas@theosys.at                                               *
 *                                                                         *
 *   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 3 of the License.                *
 *                                                                         *
 *   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.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef SPORTWATCHERWIDGET_H
#define SPORTWATCHERWIDGET_H

#include <qlabel.h>
#include <qdatetime.h>
#include <qpixmap.h>
#include <qimage.h>
#include <qpainter.h>
#include <qpen.h>
#include <qpoint.h>
#include <qpointarray.h>
#include <qrect.h>

#include "garmin.h"
#include "managefile.h"
#include "disassemble.h"

#include "sportwatcherwidgetbase.h"

typedef struct INDEX
{
        QString path;
        QString activ;
        INDEX *next;
} INDEX;

class sportwatcherWidget : public sportwatcherWidgetBase
{
  Q_OBJECT

public:
  sportwatcherWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
  ~sportwatcherWidget();
  /*$PUBLIC_FUNCTIONS$*/

public slots:
  /*$PUBLIC_SLOTS$*/
  virtual void          btFullscreenSlot();
  virtual void          btGlasMinusSlot();
  virtual void          btGlasPlusSlot();
  virtual void          btHandSlot();
  virtual void          btGlasSlot();
  virtual void          btFlagSlot();
  virtual void          liLapsSlot(QListViewItem *item);
  virtual void          liActivitiesSlot(QListViewItem *item);
  virtual void          helpAbout();
  virtual void          helpContents();
  virtual void          helpIndex();
  virtual void          fileExit();
  virtual void          filePrint();
  virtual void          fileSaveAs();
  virtual void          fileSave();
  virtual void          fileOpen();
  virtual void          fileNew();
  virtual void          extrasSaveHR();
  virtual void          extrasSettings();

protected:
  /*$PROTECTED_FUNCTIONS$*/
  void showLaps();
  void showCurves();
  void resizeEvent(QResizeEvent *e);
  void paintEvent(QPaintEvent *e);

protected slots:
  /*$PROTECTED_SLOTS$*/

private:
    QDateTime *garmin_dtime (uint32 t);
    void getActivities();

private:
  QWidget *mama;
  QPixmap pmProfile;
  QDateTime StartTime;
  QStringList files;
  manageFile spw;
  disassemble ds;
  garmin_data *gmn;
  int min_hr, max_hr, avg_hr;
  double min_height, max_height;
  unsigned long max_time;
  INDEX *index;

private:
  /* Config Parameters */
  int lower1, lower2, lower3;
  int upper1, upper2, upper3;
  int MaxHr, restHr;
  int vo2max, weight, sampleTime;
  QString Device, Data, HRM;
};

#endif