Updraft
1.0
Open source glider flight visualisation tool.
|
Widget that is shown in the task declaration tab. More...
#include <taskdeclpanel.h>
Public Member Functions | |
TaskDeclPanel (TaskLayer *layer, QWidget *parent=0, Qt::WFlags flags=0) | |
~TaskDeclPanel () | |
bool | hasToggledButton () |
int | getToggledButtonIndex () |
void | newTurnpointButton (int index, const QString &name) |
Create and insert into GUI a new turnpoint button. | |
void | newAddTpButton (int index, bool checked=false) |
Create and insert into GUI a new add turnpoint button. | |
void | initFromFile (TaskFile *file) |
Initializes the task from a file. | |
const QWidget * | getTaskPointWidget (int i) const |
Private Slots | |
void | addTpButtonPushed () |
void | removeTpButtonPushed () |
void | saveButtonPushed () |
void | undoButtonPushed () |
void | redoButtonPushed () |
void | dataChanged () |
void | updateButtons () |
Called when the buttons should be updated due to changes in the file. | |
Private Member Functions | |
bool | tpButtonExists (int pos) |
Says whether the turnpoint button exists for the given position. | |
bool | tpButtonCorrect (int pos, const TaskPoint *point) |
Says, whether the taskpoint button is a correct representation of the given TaskPoint. | |
void | updateTpButton (int pos, const TaskPoint *point) |
Updates the taskpoint button to represent the given TurnPoint. | |
void | updateAddTpButton (int pos, bool checkState) |
Updates the add taskpoint button by changing its check state. | |
void | updateSummaryLabel (const TaskData *data) |
Updates the text on task summary label. | |
void | removeTpButtons (int pos) |
Removes TaskPoint buttons for the given position. | |
int | tpIndexToLayoutPos (int index) const |
int | tpLayoutPosToIndex (int pos) const |
int | addIndexToLayoutPos (int index) const |
int | addLayoutPosToIndex (int pos) const |
void | adjustAddTpText () |
Hides or shows the add turnpoint button text according to button number. | |
void | uncheckAllAddTpButtons () |
Untoggles all plus signs that serve for adding taskpoints. | |
Private Attributes | |
QString | addTpText |
Ui::TaskDeclPanel * | ui |
QButtonGroup * | addButtons |
Button group that ensures just one checked add tp button. | |
bool | isBeingEdited |
Flag that says, whether the task is being edited. | |
TaskAxis * | taskAxis |
Axis with lengths of task legs. | |
TaskLayer * | taskLayer |
Widget that is shown in the task declaration tab.
Updraft::TaskDeclPanel::TaskDeclPanel | ( | TaskLayer * | layer, |
QWidget * | parent = 0 , |
||
Qt::WFlags | flags = 0 |
||
) |
int Updraft::TaskDeclPanel::addIndexToLayoutPos | ( | int | index | ) | const [private] |
int Updraft::TaskDeclPanel::addLayoutPosToIndex | ( | int | pos | ) | const [private] |
void Updraft::TaskDeclPanel::addTpButtonPushed | ( | ) | [private, slot] |
void Updraft::TaskDeclPanel::adjustAddTpText | ( | ) | [private] |
Hides or shows the add turnpoint button text according to button number.
void Updraft::TaskDeclPanel::dataChanged | ( | ) | [private, slot] |
const QWidget * Updraft::TaskDeclPanel::getTaskPointWidget | ( | int | i | ) | const |
i | index of desired task point |
void Updraft::TaskDeclPanel::initFromFile | ( | TaskFile * | file | ) |
Initializes the task from a file.
void Updraft::TaskDeclPanel::newAddTpButton | ( | int | index, |
bool | checked = false |
||
) |
Create and insert into GUI a new add turnpoint button.
void Updraft::TaskDeclPanel::newTurnpointButton | ( | int | index, |
const QString & | name | ||
) |
Create and insert into GUI a new turnpoint button.
void Updraft::TaskDeclPanel::redoButtonPushed | ( | ) | [private, slot] |
void Updraft::TaskDeclPanel::removeTpButtonPushed | ( | ) | [private, slot] |
void Updraft::TaskDeclPanel::removeTpButtons | ( | int | pos | ) | [private] |
Removes TaskPoint buttons for the given position.
void Updraft::TaskDeclPanel::saveButtonPushed | ( | ) | [private, slot] |
bool Updraft::TaskDeclPanel::tpButtonCorrect | ( | int | pos, |
const TaskPoint * | point | ||
) | [private] |
Says, whether the taskpoint button is a correct representation of the given TaskPoint.
bool Updraft::TaskDeclPanel::tpButtonExists | ( | int | pos | ) | [private] |
Says whether the turnpoint button exists for the given position.
int Updraft::TaskDeclPanel::tpIndexToLayoutPos | ( | int | index | ) | const [private] |
int Updraft::TaskDeclPanel::tpLayoutPosToIndex | ( | int | pos | ) | const [private] |
void Updraft::TaskDeclPanel::uncheckAllAddTpButtons | ( | ) | [private] |
Untoggles all plus signs that serve for adding taskpoints.
void Updraft::TaskDeclPanel::undoButtonPushed | ( | ) | [private, slot] |
void Updraft::TaskDeclPanel::updateAddTpButton | ( | int | pos, |
bool | checkState | ||
) | [private] |
Updates the add taskpoint button by changing its check state.
void Updraft::TaskDeclPanel::updateButtons | ( | ) | [private, slot] |
Called when the buttons should be updated due to changes in the file.
void Updraft::TaskDeclPanel::updateSummaryLabel | ( | const TaskData * | data | ) | [private] |
Updates the text on task summary label.
void Updraft::TaskDeclPanel::updateTpButton | ( | int | pos, |
const TaskPoint * | point | ||
) | [private] |
Updates the taskpoint button to represent the given TurnPoint.
QButtonGroup* Updraft::TaskDeclPanel::addButtons [private] |
Button group that ensures just one checked add tp button.
QString Updraft::TaskDeclPanel::addTpText [private] |
bool Updraft::TaskDeclPanel::isBeingEdited [private] |
Flag that says, whether the task is being edited.
TaskAxis* Updraft::TaskDeclPanel::taskAxis [private] |
Axis with lengths of task legs.
TaskLayer* Updraft::TaskDeclPanel::taskLayer [private] |
Ui::TaskDeclPanel* Updraft::TaskDeclPanel::ui [private] |