2 * Copyright (C) 2009 Sakari Poussa
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, version 2.
9 #ifndef COURSE_DIALOG_H
10 #define COURSE_DIALOG_H
16 #include <QDialogButtonBox>
24 class QTableWidgetItem;
27 class CourseSelectDialog: public QDialog
32 CourseSelectDialog(QWidget *parent = 0);
34 void results(QString &club, QString &course);
41 void createLayout(QWidget *parent);
44 QLineEdit *lineEditClub;
45 QLineEdit *lineEditCourse;
48 QPushButton *pushButtonNext;
51 QVBoxLayout *leftLayout;
52 QVBoxLayout *rightLayout;
55 class CourseDialog: public QDialog
60 CourseDialog(QWidget *w);
61 void results(QVector<QString> &, QVector<QString> &, QVector<QString> &);
63 void init(Course *course = 0);
72 enum { ROW_HOLE = 0, ROW_PAR = 1, ROW_HCP = 2, ROW_LEN = 3,
73 ROW_HOLE_2 = 4, ROW_PAR_2 = 5, ROW_HCP_2 = 6, ROW_LEN_2 = 7};
74 enum { ROWS = 8, COLS = 9, separator_row = 3 };
76 void createTable(QWidget *parent = 0);
77 void createButton(QWidget *parent = 0);
78 void createLayout(QWidget *parent = 0);
79 void moveToNextCell(QTableWidgetItem *item);
84 QPushButton *pushButtonUp;
85 QPushButton *pushButtonDown;
86 QPushButton *pushButtonNext;
87 QPushButton *pushButtonFinish;
90 QVBoxLayout *rightLayout;
91 QVBoxLayout *leftLayout;