mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:23:23 +00:00
Clean up some typos
Cosmetic commit to clean up some of the annoying typos in qt-ui Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c07e183f1f
commit
f9598f062c
5 changed files with 20 additions and 20 deletions
|
@ -61,9 +61,9 @@ void DiveListView::selectionChanged(const QItemSelection& selected, const QItemS
|
|||
Q_FOREACH(const QModelIndex& index, deselected.indexes()) {
|
||||
const QAbstractItemModel *model = index.model();
|
||||
struct dive *dive = (struct dive*) model->data(index, TreeItemDT::DIVE_ROLE).value<void*>();
|
||||
if (!dive) { // is's a trip!
|
||||
if (!dive) { // it's a trip!
|
||||
if (model->rowCount(index)) {
|
||||
expand(index); // leave this - even if it looks like it shouldn't be here. looks like I'v found a Qt bug.
|
||||
expand(index); // leave this - even if it looks like it shouldn't be here. looks like I've found a Qt bug.
|
||||
// the subselection is removed, but the painting is not. this cleans the area.
|
||||
}
|
||||
} else if (!parents.contains(index.parent())) {
|
||||
|
@ -74,7 +74,7 @@ void DiveListView::selectionChanged(const QItemSelection& selected, const QItemS
|
|||
Q_FOREACH(const QModelIndex& index, selected.indexes()) {
|
||||
const QAbstractItemModel *model = index.model();
|
||||
struct dive *dive = (struct dive*) model->data(index, TreeItemDT::DIVE_ROLE).value<void*>();
|
||||
if (!dive) { // is's a trip!
|
||||
if (!dive) { // it's a trip!
|
||||
if (model->rowCount(index)) {
|
||||
QItemSelection selection;
|
||||
selection.select(index.child(0,0), index.child(model->rowCount(index) -1 , 0));
|
||||
|
|
|
@ -90,7 +90,7 @@ void MainTab::updateDiveInfo(int dive)
|
|||
// it will be called whenever a new dive is selected
|
||||
// I'm already populating the 'notes' box
|
||||
// to show how it can be done.
|
||||
// If you are unsure what's the name of anything,
|
||||
// If you are unsure about the name of something,
|
||||
// open the file maintab.ui on the designer
|
||||
// click on the item and check its objectName,
|
||||
// the access is ui->objectName from here on.
|
||||
|
@ -136,7 +136,7 @@ void MainTab::updateDiveInfo(int dive)
|
|||
ui->airPressureText->clear();
|
||||
}
|
||||
/* statisticsTab*/
|
||||
/* we can access the stats_selection struct but how to we ensure the relevant dives are selected
|
||||
/* we can access the stats_selection struct, but how do we ensure the relevant dives are selected
|
||||
* if we don't use the gtk widget to drive this?
|
||||
* Maybe call process_selected_dives? Or re-write to query our Qt list view.
|
||||
*/
|
||||
|
|
|
@ -336,13 +336,13 @@ void TankInfoModel::update()
|
|||
|
||||
TreeItemDT::~TreeItemDT()
|
||||
{
|
||||
qDeleteAll(childs);
|
||||
qDeleteAll(children);
|
||||
}
|
||||
|
||||
int TreeItemDT::row() const
|
||||
{
|
||||
if (parent)
|
||||
return parent->childs.indexOf(const_cast<TreeItemDT*>(this));
|
||||
return parent->children.indexOf(const_cast<TreeItemDT*>(this));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ const
|
|||
|
||||
TreeItemDT* parentItem = (!parent.isValid()) ? rootItem : static_cast<TreeItemDT*>(parent.internalPointer());
|
||||
|
||||
TreeItemDT* childItem = parentItem->childs[row];
|
||||
TreeItemDT* childItem = parentItem->children[row];
|
||||
|
||||
return (childItem) ? createIndex(row, column, childItem) : QModelIndex();
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ int DiveTripModel::rowCount(const QModelIndex& parent) const
|
|||
else
|
||||
parentItem = static_cast<TreeItemDT*>(parent.internalPointer());
|
||||
|
||||
int amount = parentItem->childs.count();
|
||||
int amount = parentItem->children.count();
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
@ -684,19 +684,19 @@ void DiveTripModel::setupModelData()
|
|||
|
||||
if (!trip) {
|
||||
diveItem->parent = rootItem;
|
||||
rootItem->childs.push_back(diveItem);
|
||||
rootItem->children.push_back(diveItem);
|
||||
continue;
|
||||
}
|
||||
if (!trips.keys().contains(trip)) {
|
||||
TripItem* tripItem = new TripItem();
|
||||
tripItem->trip = trip;
|
||||
tripItem->parent = rootItem;
|
||||
tripItem->childs.push_back(diveItem);
|
||||
tripItem->children.push_back(diveItem);
|
||||
trips[trip] = tripItem;
|
||||
rootItem->childs.push_back(tripItem);
|
||||
rootItem->children.push_back(tripItem);
|
||||
continue;
|
||||
}
|
||||
TripItem* tripItem = trips[trip];
|
||||
tripItem->childs.push_back(diveItem);
|
||||
tripItem->children.push_back(diveItem);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "../divelist.h"
|
||||
|
||||
/* Encapsulates the tank_info global variable
|
||||
* to show on Qt`s Model View System.*/
|
||||
* to show on Qt's Model View System.*/
|
||||
class TankInfoModel : public QAbstractTableModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -50,9 +50,9 @@ public:
|
|||
void clear();
|
||||
void update();
|
||||
private:
|
||||
/* Since the dive doesn`t stores the number of cylinders that
|
||||
* it has ( max 8 ) and since I don`t want to make a
|
||||
* model-for-each-dive, let`s hack this here instead. */
|
||||
/* Since the dive doesn't stores the number of cylinders that
|
||||
* it has (max 8) and since I don't want to make a
|
||||
* model-for-each-dive, let's hack this here instead. */
|
||||
QMap<struct dive *, int> usedRows;
|
||||
};
|
||||
|
||||
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
virtual QVariant data ( int column, int role ) const;
|
||||
int row() const;
|
||||
QList<TreeItemDT *> childs;
|
||||
QList<TreeItemDT *> children;
|
||||
TreeItemDT *parent;
|
||||
};
|
||||
|
||||
|
|
|
@ -663,7 +663,7 @@ void ProfileGraphicsView::plot_temperature_text()
|
|||
/* don't print a temperature
|
||||
* if it's been less than 5min and less than a 2K change OR
|
||||
* if it's been less than 2min OR if the change from the
|
||||
* last print is less than .4K (and therefore less than 1F */
|
||||
* last print is less than .4K (and therefore less than 1F) */
|
||||
if (((sec < last + 300) && (abs(mkelvin - last_printed_temp) < 2000)) ||
|
||||
(sec < last + 120) ||
|
||||
(abs(mkelvin - last_printed_temp) < 400))
|
||||
|
@ -806,7 +806,7 @@ void ProfileGraphicsView::plot_one_event(struct event *ev)
|
|||
int i, depth = 0;
|
||||
struct plot_info *pi = &gc.pi;
|
||||
|
||||
/* is plotting this event disabled? */
|
||||
/* is plotting of this event disabled? */
|
||||
if (ev->name) {
|
||||
for (i = 0; i < evn_used; i++) {
|
||||
if (! strcmp(ev->name, ev_namelist[i].ev_name)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue