Add subsurface_access()

For our usage the method will acept UTF-8 paths,
which are converted to UTF-16 on Win32.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
windows.c: small cleaup in the wrapper functions

- use an already defined 'ret' value if available
- don't put free() calls in NULL check branches (saves a line)

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>
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>
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>
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>
Added skeleton of the Suits Filter.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Suits update method done.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Suits filterRow method done.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Create the doFilter for the Suits.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is already checked in doFilter

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Suits Widget created and working.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix QString use

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix use of QString

We should use references when we are not wanting to make a copy
of it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
Random whitespace cleanup

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>