Subversion Repositories svn1-original

Rev

Rev 319 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*============================================================================
**
**  Project/Product : 
**  Filename        : qmteamdisplay.h
**  Author(s)       : DDP
**
**  Description     : Display and Update Team Information
**
**
**  Information     :
**   Compiler       : ANSI C++
**   Target         : 
**
***==========================================================================*/



#ifndef TEAMDISPLAY_H
#define TEAMDISPLAY_H

#include    "consts.h"
#include    "structs.h"
#include    "proto.h"

#include    <QWidget>
#include    <QShowEvent>
#include    "qmlegtimes.h"


namespace Ui {
    class QmTeamDisplay;
}

class qmTeamDisplay : public QWidget {
    Q_OBJECT
public:
    qmTeamDisplay(QWidget *parent = 0, int initialTeam = 0, bool useDone = false);
    ~qmTeamDisplay();

protected:
    void changeEvent(QEvent *e);
    void blockSignals(bool state);

private:
    Ui::QmTeamDisplay *ui;

    int         team;                                // Current team number
    team_type   team_buf;                            // Holds team data currently under display
    QmLegTimes *lt[MAX_LEGS+1];                      // Per Leg Widgets
    bool        dirty;                               // Unsaved changes
    bool        populating;
    bool        enableDone;                          // Dialog usage
    QString     noteFileName;                        // Current Note Filename

    void showEvent ( QShowEvent * event );           // Reimplement Widget Method
    void populateNote(void);


public slots:
    void save(void);
    void suckData(void);
    void cancel(void);
    void populate(int team_number);
    void recalculateTimes( void );
    void changed(void);
    void updateChanged(bool dirty);
    void updateCategory(void);
    void editNote(void);

signals:
    void dialogDone(int);
};

#endif // TEAMDISPLAY_H