Commit graph

16 commits

Author SHA1 Message Date
Tomaz Canabrava
7c5c38b154 Addded a min / max layout for the filter, and a filter count
But the filter count seems to be broken for some reason and
I really don't know why. It seems to work for tags, but
not for everything else.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-16 18:34:47 +00:00
Dirk Hohndel
ac9ead4571 Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:52:35 -08:00
Dirk Hohndel
8086b39e11 Adjust the counter function for filter with "none of the above"
So this should count dives with neither buddy nor divemaster, without a
location, with no tags, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:45:32 -08:00
Dirk Hohndel
dae76cdc2d Add a function to count dives with a specific suit
Checking against the location field probably wasn't the best way to do
this...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:35:12 -08:00
Tomaz Canabrava
b7da2a9c44 This is already checked in doFilter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:08:48 -08:00
Tomaz Canabrava
462091b963 Create the doFilter for the Suits.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:06:20 -08:00
Tomaz Canabrava
fdbdcaab80 Suits filterRow method done.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:06:08 -08:00
Tomaz Canabrava
bfdd94ddc3 Suits update method done.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:05:56 -08:00
Tomaz Canabrava
88d19bca6c Added skeleton of the Suits Filter.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:04:44 -08:00
Tomaz Canabrava
16e44b31d3 Last one: Common 'data' method for StringList based Filters.
This is the last of the series of Macros that I'll do to ease
the creation of a QStringListModel based filter.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:04:28 -08:00
Tomaz Canabrava
51f8010c9b Call all common methods once per class in an easy way.
New method to simplify the creation of 4 of the common
methods for each filter in an easy way. There are
a few other methods that I'm also thinking on how
to do this.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:03:30 -08:00
Tomaz Canabrava
76e1fe3ee7 Create a common macro for flags
samething as the other commits, use common code.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:02:50 -08:00
Tomaz Canabrava
dfb2575dff Clear filter is always the same for a filter based on stringlist
So, let's always use the same codebasee

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:02:37 -08:00
Tomaz Canabrava
5346b78e6c More cleanup using Macros.
The setData of any filter based on a StringList with
checkboxes should be the same, so let's use the same
codebase for it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:02:24 -08:00
Tomaz Canabrava
dfea10fbb8 Create a CREATE_INSTANCE_METHOD macro
This is just to simplify the creation of more filters.
more macros will be used, because I tend to abuse them.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:01:56 -08:00
Tomaz Canabrava
10fecefddd Move the filters code to it's own file.
We already have a bunch of filters, let's pack them together

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:01:00 -08:00