mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8086b39e11
commit
ac9ead4571
4 changed files with 15 additions and 13 deletions
|
@ -71,7 +71,7 @@ CREATE_COMMON_METHODS_FOR_FILTER(SuitsFilterModel, count_dives_with_suit);
|
||||||
|
|
||||||
CREATE_INSTANCE_METHOD(MultiFilterSortModel);
|
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;
|
int i = 0;
|
||||||
for_each_dive (i, dive) {
|
for_each_dive (i, dive) {
|
||||||
QString persons = QString(dive->buddy) + "," + QString(dive->divemaster);
|
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
|
// Remove any leading spaces
|
||||||
if (!list.contains(person.trimmed())) {
|
if (!list.contains(person.trimmed())) {
|
||||||
list.append(person.trimmed());
|
list.append(person.trimmed());
|
||||||
|
@ -405,9 +405,9 @@ void MultiFilterSortModel::myInvalidate()
|
||||||
} else {
|
} else {
|
||||||
// otherwise find the dives that should still be selected (the filter above unselected any
|
// otherwise find the dives that should still be selected (the filter above unselected any
|
||||||
// dive that's no longer visible) and select them again
|
// dive that's no longer visible) and select them again
|
||||||
QList<int>curSelectedDives;
|
QList<int> curSelectedDives;
|
||||||
for_each_dive (i, d) {
|
for_each_dive (i, d) {
|
||||||
if(d->selected)
|
if (d->selected)
|
||||||
curSelectedDives.append(get_divenr(d));
|
curSelectedDives.append(get_divenr(d));
|
||||||
}
|
}
|
||||||
dlv->selectDives(curSelectedDives);
|
dlv->selectDives(curSelectedDives);
|
||||||
|
@ -433,7 +433,7 @@ void MultiFilterSortModel::removeFilterModel(MultiFilterInterface *model)
|
||||||
void MultiFilterSortModel::clearFilter()
|
void MultiFilterSortModel::clearFilter()
|
||||||
{
|
{
|
||||||
justCleared = true;
|
justCleared = true;
|
||||||
Q_FOREACH(MultiFilterInterface *iface, models){
|
Q_FOREACH (MultiFilterInterface *iface, models) {
|
||||||
iface->clearFilter();
|
iface->clearFilter();
|
||||||
}
|
}
|
||||||
justCleared = false;
|
justCleared = false;
|
||||||
|
|
|
@ -14,7 +14,7 @@ public:
|
||||||
bool anyChecked;
|
bool anyChecked;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TagFilterModel : public QStringListModel, public MultiFilterInterface{
|
class TagFilterModel : public QStringListModel, public MultiFilterInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static TagFilterModel *instance();
|
static TagFilterModel *instance();
|
||||||
|
@ -32,7 +32,7 @@ private:
|
||||||
explicit TagFilterModel(QObject *parent = 0);
|
explicit TagFilterModel(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
class BuddyFilterModel : public QStringListModel, public MultiFilterInterface{
|
class BuddyFilterModel : public QStringListModel, public MultiFilterInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static BuddyFilterModel *instance();
|
static BuddyFilterModel *instance();
|
||||||
|
@ -50,7 +50,7 @@ private:
|
||||||
explicit BuddyFilterModel(QObject *parent = 0);
|
explicit BuddyFilterModel(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
class LocationFilterModel : public QStringListModel, public MultiFilterInterface{
|
class LocationFilterModel : public QStringListModel, public MultiFilterInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static LocationFilterModel *instance();
|
static LocationFilterModel *instance();
|
||||||
|
@ -68,7 +68,7 @@ private:
|
||||||
explicit LocationFilterModel(QObject *parent = 0);
|
explicit LocationFilterModel(QObject *parent = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
class SuitsFilterModel : public QStringListModel, public MultiFilterInterface{
|
class SuitsFilterModel : public QStringListModel, public MultiFilterInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static SuitsFilterModel *instance();
|
static SuitsFilterModel *instance();
|
||||||
|
@ -93,12 +93,14 @@ public:
|
||||||
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
|
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
|
||||||
void addFilterModel(MultiFilterInterface *model);
|
void addFilterModel(MultiFilterInterface *model);
|
||||||
void removeFilterModel(MultiFilterInterface *model);
|
void removeFilterModel(MultiFilterInterface *model);
|
||||||
public slots:
|
public
|
||||||
|
slots:
|
||||||
void myInvalidate();
|
void myInvalidate();
|
||||||
void clearFilter();
|
void clearFilter();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MultiFilterSortModel(QObject *parent = 0);
|
MultiFilterSortModel(QObject *parent = 0);
|
||||||
QList<MultiFilterInterface*> models;
|
QList<MultiFilterInterface *> models;
|
||||||
bool justCleared;
|
bool justCleared;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,7 @@ const QPixmap &trashIcon()
|
||||||
return *trashIconPixmap;
|
return *trashIconPixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
CylindersModel::CylindersModel(QObject *parent) :
|
CylindersModel::CylindersModel(QObject *parent) : changed(false),
|
||||||
changed(false),
|
|
||||||
rows(0)
|
rows(0)
|
||||||
{
|
{
|
||||||
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
|
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
|
||||||
|
|
|
@ -179,6 +179,7 @@ public:
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
void updateDive();
|
void updateDive();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int rows;
|
int rows;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue