Commit Graph

9 Commits

Author SHA1 Message Date
Chris PeBenito
da8a238ffc apol: Fix model headers so extra columns aren't added.
The section number (column header) is -1 when the section is hidden. The
defaultdict use would cause extra columns to be created since the column
count is based on the size of the headers object and -1 would add a new
entry.  Change headers to lists.
2016-06-08 07:26:32 -04:00
Chris PeBenito
61613cf3f4 apol: adjust models to handle invalid indices in data().
Infrequently data() is called with an invalid index and then apol crashes.
2016-04-21 10:07:12 -04:00
Chris PeBenito
1370cfd20f apol: further simplify Table model subclasses 2016-04-01 14:50:25 -04:00
Chris PeBenito
f1f9c3186d Create new base class for table models.
Break up rule models into three files since RuleListModel doesn't make
sense any longer.
2016-04-01 09:00:17 -04:00
Chris PeBenito
17fdfc6012 setoolsgui models: fix header defaultdicts factory methods
Setting a None factory makes it work like a standard dictionary.  Use str
instead to get empty strings.
2016-03-29 11:11:21 -04:00
Chris PeBenito
f5cace1420 setoolsgui: revise model implementations
Use defaultdicts for headers.  Simplify data member functions.
2016-03-29 09:12:05 -04:00
Chris PeBenito
5063edd111 Role/UserModel: revise strings. 2016-03-16 09:06:54 -04:00
Chris PeBenito
425e4f735b setoolsgui: remove exceptions from models
Occasionally Qt calls these methods with column -1 and this exception
otherwise goes unhandled.  The default None return from Python functions
should be sufficient.
2016-03-15 10:41:40 -04:00
Chris PeBenito
fcabb2f0e6 Move generic GUI classes up to the setoolsgui package. 2016-03-14 15:25:07 -04:00