Added the possibility to choose gases in the planner.

Added the possibility to choose gases in the planner,
now the user should click on the name of the gas, a
popup window will appear, asking the user to choose
what gas he wants for that ascent / descent.

now we need to hook that up with the createDecoStops
method that calculates the decompression.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-07-21 13:54:21 -03:00
parent 83c73168b0
commit 67fec4da70
2 changed files with 34 additions and 5 deletions

View file

@ -5,6 +5,10 @@
#include <QGraphicsPathItem>
#include <QDialog>
class QListView;
class QStringListModel;
class QModelIndex;
class Button : public QObject, public QGraphicsRectItem {
Q_OBJECT
public:
@ -86,7 +90,8 @@ private slots:
void decreaseDepth();;
void okClicked();
void cancelClicked();
void selectGasClicked();
void prepareSelectGas();
void selectGas(const QModelIndex& index);
private:
void moveActiveHandler(const QPointF& pos);
@ -102,6 +107,9 @@ private:
user cna click to choose a new gas.
*/
QList<Button*> gases;
QListView *gasListView;
QStringListModel *gasChoices;
Button *currentGasChoice;
/* those are the lines that follows the mouse. */
QGraphicsLineItem *verticalLine;