summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 12:51:23 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 12:52:35 -0800
commitac9ead4571f3c1546c0cd88a39088f91b01929b3 (patch)
tree98db69bc3ddbf77a9b2d789ff37cba635709dd02 /qt-ui
parent8086b39e11da344f9c931ea8d325d2ef94982913 (diff)
downloadsubsurface-ac9ead4571f3c1546c0cd88a39088f91b01929b3.tar.gz
Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/filtermodels.cpp10
-rw-r--r--qt-ui/filtermodels.h14
-rw-r--r--qt-ui/models.cpp3
-rw-r--r--qt-ui/models.h1
4 files changed, 15 insertions, 13 deletions
diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp
index ae98e5ce4..5b2553d96 100644
--- a/qt-ui/filtermodels.cpp
+++ b/qt-ui/filtermodels.cpp
@@ -71,7 +71,7 @@ CREATE_COMMON_METHODS_FOR_FILTER(SuitsFilterModel, count_dives_with_suit);
CREATE_INSTANCE_METHOD(MultiFilterSortModel);
-SuitsFilterModel::SuitsFilterModel(QObject *parent): QStringListModel(parent)
+SuitsFilterModel::SuitsFilterModel(QObject *parent) : QStringListModel(parent)
{
}
@@ -273,7 +273,7 @@ void BuddyFilterModel::repopulate()
int i = 0;
for_each_dive (i, dive) {
QString persons = QString(dive->buddy) + "," + QString(dive->divemaster);
- Q_FOREACH(const QString& person, persons.split(',', QString::SkipEmptyParts)){
+ Q_FOREACH (const QString &person, persons.split(',', QString::SkipEmptyParts)) {
// Remove any leading spaces
if (!list.contains(person.trimmed())) {
list.append(person.trimmed());
@@ -405,9 +405,9 @@ void MultiFilterSortModel::myInvalidate()
} else {
// otherwise find the dives that should still be selected (the filter above unselected any
// dive that's no longer visible) and select them again
- QList<int>curSelectedDives;
+ QList<int> curSelectedDives;
for_each_dive (i, d) {
- if(d->selected)
+ if (d->selected)
curSelectedDives.append(get_divenr(d));
}
dlv->selectDives(curSelectedDives);
@@ -433,7 +433,7 @@ void MultiFilterSortModel::removeFilterModel(MultiFilterInterface *model)
void MultiFilterSortModel::clearFilter()
{
justCleared = true;
- Q_FOREACH(MultiFilterInterface *iface, models){
+ Q_FOREACH (MultiFilterInterface *iface, models) {
iface->clearFilter();
}
justCleared = false;
diff --git a/qt-ui/filtermodels.h b/qt-ui/filtermodels.h
index 3d64356ed..7e75a8b13 100644
--- a/qt-ui/filtermodels.h
+++ b/qt-ui/filtermodels.h
@@ -14,7 +14,7 @@ public:
bool anyChecked;
};
-class TagFilterModel : public QStringListModel, public MultiFilterInterface{
+class TagFilterModel : public QStringListModel, public MultiFilterInterface {
Q_OBJECT
public:
static TagFilterModel *instance();
@@ -32,7 +32,7 @@ private:
explicit TagFilterModel(QObject *parent = 0);
};
-class BuddyFilterModel : public QStringListModel, public MultiFilterInterface{
+class BuddyFilterModel : public QStringListModel, public MultiFilterInterface {
Q_OBJECT
public:
static BuddyFilterModel *instance();
@@ -50,7 +50,7 @@ private:
explicit BuddyFilterModel(QObject *parent = 0);
};
-class LocationFilterModel : public QStringListModel, public MultiFilterInterface{
+class LocationFilterModel : public QStringListModel, public MultiFilterInterface {
Q_OBJECT
public:
static LocationFilterModel *instance();
@@ -68,7 +68,7 @@ private:
explicit LocationFilterModel(QObject *parent = 0);
};
-class SuitsFilterModel : public QStringListModel, public MultiFilterInterface{
+class SuitsFilterModel : public QStringListModel, public MultiFilterInterface {
Q_OBJECT
public:
static SuitsFilterModel *instance();
@@ -93,12 +93,14 @@ public:
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
void addFilterModel(MultiFilterInterface *model);
void removeFilterModel(MultiFilterInterface *model);
-public slots:
+public
+slots:
void myInvalidate();
void clearFilter();
+
private:
MultiFilterSortModel(QObject *parent = 0);
- QList<MultiFilterInterface*> models;
+ QList<MultiFilterInterface *> models;
bool justCleared;
};
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 8bf6627bf..e62598479 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -71,8 +71,7 @@ const QPixmap &trashIcon()
return *trashIconPixmap;
}
-CylindersModel::CylindersModel(QObject *parent) :
- changed(false),
+CylindersModel::CylindersModel(QObject *parent) : changed(false),
rows(0)
{
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
diff --git a/qt-ui/models.h b/qt-ui/models.h
index ad0d7b7c3..d61a96f9b 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -179,6 +179,7 @@ public:
void clear();
void updateDive();
+
private:
int rows;
};