51 Commits

Author SHA1 Message Date
Pierre-Yves Siret
f2edc17ad6 test: Enable no_keywords config for the test project 2017-02-28 01:04:22 +01:00
Pierre-Yves Siret
79b651c9fd feat: Add mapToSource and mapFromSource helpers
Add helper functions to map a row number to and from a source model.
This avoids the need of creating a QModelIndex first when mapping
indexes between the proxy model and the source model.
Mapping with a QModelIndex is still possible, the return type of the
helpers will be the same as the one of the input parameter, a QModelIndex
or a row number.

Fix #23
2017-02-28 00:46:59 +01:00
Pierre-Yves Siret
cb26d890b9 Added 2 helper functions : get & roleForName
Closes #24
2017-02-16 19:07:25 +01:00
Pierre-Yves Siret
56f78c7037 Fixes the capitalization of RegExpFilter
From RegexpFilter to RegExpFilter (both in C++ and QML)
Fixes #21
2017-01-24 19:25:55 +01:00
Pierre-Yves Siret
fcd8d07fc9 Fixes the sorting not being invalidated when disabling a Sorter
Fixes #22
2017-01-24 19:19:33 +01:00
Pierre-Yves Siret
8fc7679ab8 Fixes a bug where sorters wouldn't get cleared
This bug was exposed by commit 9a72c73226ce193c733513484ecf9292bce8601b
Also fixes a cosmetic typo in a variable name
2017-01-24 19:16:35 +01:00
Pierre-Yves Siret
9a72c73226 Added tests to verify the core sorter functionnality
Issue #22 where a Sorter being disabled doesn't trigger a sort change is
exposed.
2017-01-24 19:07:15 +01:00
Pierre-Yves Siret
a3d95d2290 Check the roles after a row is added for a model with no roles intially
Fixes #13
2017-01-08 22:54:44 +01:00
Pierre-Yves Siret
edf53b56ef Add tests to check if the proxy roles are synched with the source model 2017-01-08 22:07:45 +01:00
PYS
10e03e32b6 Add the possibility to specify a negative index in IndexFilter to start from the end 2016-12-02 15:35:53 +01:00
PYS
65fb8595f8 Modify .gitignore to hide shadow builds 2016-12-02 14:22:53 +01:00
Pierre-Yves Siret
ace384cd22 Fixes bug where a 0 minimum/maximumIndex has no effect in IndexFilter
Closes #15
2016-12-02 02:29:17 +01:00
Pierre-Yves Siret
90d0c567a8 Fixes the filtering not being invalidated when disabling a filter
Fixes #14
2016-12-02 02:24:44 +01:00
Pierre-Yves Siret
f542f18976 Allow compilation when using CONFIG += no_keywords
Fixes #19
2016-12-02 02:13:16 +01:00
Keith Kyzivat
fea3718d99 Add tests infrastructure, starting with RangeFilter and IndexFilter
* Add infrastructure for testing SortFilterProxyModel
* Add tests for RangeFilter.
* Add tests for IndexFilter.
2016-12-02 01:38:22 +01:00
Keith Kyzivat
472b344ff6 Add a basic .gitignore
* Ignore basic stuff, like qt creator user project files, object
  files, vim backup files, Makefiles, etc.
2016-12-02 01:36:28 +01:00
Keith Kyzivat
7e2dff0703 Consistent initial min,max values for IndexFilter
* Set initial min,max values for IndexFilter to 0.
* Improves testability, allows one to leave-off setting min, max
  if they want 0 for the value.
2016-12-02 01:36:27 +01:00
Keith Kyzivat
a898810c24 Add min/maximumInclusive properties to RangeFilter (#16)
* Allow one to configure RangeFilters to be able to exclude the
  minimum and/or maximum values in the range.
* Defaults to including both minimum and maximum values, leaving prior
  behavior unchanged.
2016-11-17 20:24:04 +01:00
oKcerG
94c1c36436 Updated README with removed and renamed properties 2016-10-20 13:59:44 +02:00
oKcerG
c1fe48369d Added an usage for the filters and sorters list properties in the README 2016-10-20 13:47:24 +02:00
oKcerG
d3bee768f9 added ExpresionSorter 2016-10-12 20:28:01 +02:00
oKcerG
0b850c37ec Added a ascendingSortOrder bool property in QSFPM (and removed the sortOrder property) 2016-10-12 02:23:45 +02:00
oKcerG
5db29ca53d Added a sorters list property in QSFPM 2016-10-12 02:14:28 +02:00
oKcerG
0ec51c16bd Register Sorters types to QML 2016-10-12 01:47:08 +02:00
oKcerG
6513ae8489 added RoleSorter 2016-10-12 01:44:55 +02:00
oKcerG
e96f821e28 Create the Sorter class 2016-10-12 01:41:48 +02:00
oKcerG
e8e212df9c added FilterContainer, AnyOfFilter, NoneOfFilter 2016-10-12 01:36:05 +02:00
oKcerG
407e596ab7 Don't filter rows until the proxy is completely initialized 2016-10-12 01:34:55 +02:00
oKcerG
6224f853f6 added ExpressionFilter 2016-10-12 01:11:07 +02:00
oKcerG
41f61077f1 added RangeFilter 2016-10-12 01:06:01 +02:00
oKcerG
9f97b12e8f added RegexpFilter 2016-10-12 01:02:34 +02:00
oKcerG
ac63048d87 added IndexFilter 2016-10-12 00:56:17 +02:00
oKcerG
fc7fec5e1d Bump module version to 0.2 2016-10-12 00:45:51 +02:00
oKcerG
c6cd9792ea Added a filters list property in QQSFPM 2016-10-12 00:45:00 +02:00
oKcerG
14ef004a21 Register Filters type to QML 2016-10-12 00:31:11 +02:00
oKcerG
76c588cbea Created a qqsfpm namespace 2016-10-12 00:15:26 +02:00
oKcerG
f2f4450d92 Added RoleNameFilter and ValueFilter 2016-10-12 00:09:24 +02:00
oKcerG
ff8e260e17 Added a sourceData function 2016-10-12 00:06:39 +02:00
oKcerG
894ed218fe Created the Filter class 2016-10-11 23:51:24 +02:00
oKcerG
5b7c10f7b6 Removed filterExpression and sortExpression 2016-10-11 23:45:31 +02:00
oKcerG
15e46852a4 Use c++11 features 2016-10-11 23:30:45 +02:00
oKcerG
ddf66c815b Only invalidate filtering and sorting when completed 2016-10-11 23:02:54 +02:00
oKcerG
45d16933c3 Fix qmlRegisterType crash
This fixes #7
2016-09-07 23:25:13 +02:00
oKcerG
9ad7a0a53c Sort in ascending order by default when a sortRoleName
Fixes #4
0.1.1
2016-05-03 01:08:39 +02:00
oKcerG
4c3ff41b36 Pass parameters/return values as const references 2016-05-02 22:46:32 +02:00
oKcerG
c5d9e46917 Add a count property
Fixes #3 and #5
2016-05-02 22:37:37 +02:00
oKcerG
eaff2aa0b9 Added a README 2016-02-26 03:38:19 +01:00
oKcerG
4d4ab3c27e Change setters from public slots to plain public functions
Fixes #2
0.1.0
2016-02-24 20:41:32 +01:00
oKcerG
99d89d8cfb Add qpm description 2016-02-24 03:28:13 +01:00
oKcerG
ef6a520240 Add qpm.json qpm/0.1.0 2016-02-24 03:18:16 +01:00