clevic 0.13.0.b3 → 0.13.0.b5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +21 -0
- data/Manifest.txt +91 -85
- data/README.txt +33 -18
- data/Rakefile +2 -3
- data/TODO +8 -14
- data/bin/clevic +18 -20
- data/lib/clevic.rb +7 -1
- data/lib/clevic/action_builder.rb +4 -1
- data/lib/clevic/ar_methods.rb +72 -57
- data/lib/clevic/attribute_list.rb +4 -0
- data/lib/clevic/cache_table.rb +43 -69
- data/lib/clevic/dataset_roller.rb +22 -0
- data/lib/clevic/delegate.rb +11 -5
- data/lib/clevic/delegates/combo_delegate.rb +156 -0
- data/lib/clevic/delegates/distinct_delegate.rb +48 -0
- data/lib/clevic/delegates/relational_delegate.rb +59 -0
- data/lib/clevic/delegates/set_delegate.rb +31 -0
- data/lib/clevic/field.rb +39 -55
- data/lib/clevic/field_valuer.rb +23 -10
- data/lib/clevic/filter_command.rb +22 -36
- data/lib/clevic/framework.rb +37 -0
- data/lib/clevic/generic_format.rb +5 -1
- data/lib/clevic/many_field.rb +28 -3
- data/lib/clevic/model_builder.rb +27 -32
- data/lib/clevic/ordered_dataset.rb +45 -0
- data/lib/clevic/qt.rb +4 -1
- data/lib/clevic/qt/action_builder.rb +9 -1
- data/lib/clevic/qt/browser.rb +1 -1
- data/lib/clevic/qt/clipboard.rb +3 -3
- data/lib/clevic/qt/combo_delegate.rb +25 -89
- data/lib/clevic/qt/delegate.rb +25 -0
- data/lib/clevic/qt/distinct_delegate.rb +5 -23
- data/lib/clevic/qt/extensions.rb +8 -1
- data/lib/clevic/qt/qt_combo_box.rb +58 -0
- data/lib/clevic/qt/relational_delegate.rb +18 -58
- data/lib/clevic/qt/set_delegate.rb +4 -34
- data/lib/clevic/qt/simplest_delegate.rb +19 -0
- data/lib/clevic/qt/table_model.rb +10 -10
- data/lib/clevic/qt/table_view.rb +7 -23
- data/lib/clevic/qt/text_delegate.rb +2 -2
- data/lib/clevic/qt/ui/browser_ui.rb +1 -1
- data/lib/clevic/qt/ui/search_dialog_ui.rb +1 -1
- data/lib/clevic/rails_models_loaders.rb +13 -0
- data/lib/clevic/record.rb +2 -2
- data/lib/clevic/sampler.rb +85 -39
- data/lib/clevic/sequel_ar_adapter.rb +1 -28
- data/lib/clevic/sequel_clevic.rb +68 -0
- data/lib/clevic/sequel_meta.rb +1 -13
- data/lib/clevic/subclasses.rb +18 -0
- data/lib/clevic/swing.rb +2 -1
- data/lib/clevic/swing/action.rb +27 -3
- data/lib/clevic/swing/action_builder.rb +0 -2
- data/lib/clevic/swing/browser.rb +1 -10
- data/lib/clevic/swing/combo_delegate.rb +45 -133
- data/lib/clevic/swing/delegate.rb +2 -0
- data/lib/clevic/swing/distinct_delegate.rb +2 -14
- data/lib/clevic/swing/relational_delegate.rb +2 -20
- data/lib/clevic/swing/set_delegate.rb +13 -28
- data/lib/clevic/swing/table_view.rb +1 -1
- data/lib/clevic/table_model.rb +3 -4
- data/lib/clevic/table_searcher.rb +10 -31
- data/lib/clevic/table_view.rb +97 -43
- data/lib/clevic/ui/browser_ui.rb +133 -0
- data/lib/clevic/ui/search_dialog_ui.rb +106 -0
- data/lib/clevic/version.rb +2 -2
- data/models/accounts_models.rb +24 -21
- data/models/times_models.rb +34 -28
- data/models/times_psql_models.rb +9 -3
- data/models/times_sqlite_models.rb +24 -1
- data/sql/times_sqlite.sql +3 -3
- data/tasks/clevic.rake +2 -2
- data/test/test_cache_table.rb +9 -19
- data/test/test_table_searcher.rb +2 -5
- metadata +95 -91
- data/lib/clevic/order_attribute.rb +0 -63
- data/lib/clevic/qt/boolean_delegate.rb +0 -8
- data/lib/clevic/qt/delegates.rb +0 -1
- data/lib/clevic/qt/item_delegate.rb +0 -66
- data/lib/clevic/sql_dialects.rb +0 -33
- data/tasks/website.rake +0 -25
- data/test/test_order_attribute.rb +0 -62
- data/test/test_sql_dialects.rb +0 -77
data/History.txt
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
== 0.13.0.b5
|
2
|
+
* Lots of Bug fixes
|
3
|
+
* moved all internals to Sequel::Dataset
|
4
|
+
* bring Swing combos up to date with Qt combos
|
5
|
+
* ActionBuilder fixes for Swing
|
6
|
+
* fixes for restricted combos with defined sets, sampling and editing.
|
7
|
+
|
8
|
+
== 0.13.0.b4
|
9
|
+
* Skipped past this release somehow
|
10
|
+
|
11
|
+
== 0.13.0.b3
|
12
|
+
* WARNING most importantly, support for ActiveRecord style calls now requires
|
13
|
+
a require of 'clevic/sequel_ar_adapter.rb' in your model files.
|
14
|
+
* use Dataset in CacheTable and TableSearcher. Allows for ordering
|
15
|
+
to stay correct when filtering views.
|
16
|
+
* use of Dataset allows filtering in TableView to keep previous ordering,
|
17
|
+
and filter.
|
18
|
+
|
19
|
+
== 0.13.0.b3
|
20
|
+
* Squash various buglets as they're found.
|
21
|
+
|
1
22
|
== 0.13.0
|
2
23
|
* Now has Java Swing support with JRuby
|
3
24
|
* new code works with qt4-qtruby-2.0.3
|
data/Manifest.txt
CHANGED
@@ -19,113 +19,119 @@ sql/times.sql
|
|
19
19
|
sql/times_sqlite.sql
|
20
20
|
tasks/clevic.rake
|
21
21
|
tasks/rdoc.rake
|
22
|
-
tasks/website.rake
|
23
22
|
test/test_cache_table.rb
|
24
23
|
test/test_helper.rb
|
25
24
|
test/test_model_index_extensions.rb
|
26
|
-
test/test_order_attribute.rb
|
27
|
-
test/test_sql_dialects.rb
|
28
25
|
test/test_table_model.rb
|
29
26
|
test/test_table_searcher.rb
|
30
27
|
lib/clevic.rb
|
31
|
-
lib/clevic/
|
32
|
-
lib/clevic/
|
33
|
-
lib/clevic/
|
34
|
-
lib/clevic/
|
35
|
-
lib/clevic/
|
36
|
-
lib/clevic/
|
37
|
-
lib/clevic/
|
38
|
-
lib/clevic/
|
39
|
-
lib/clevic/
|
28
|
+
lib/clevic/action_builder.rb
|
29
|
+
lib/clevic/sequel_naked.rb
|
30
|
+
lib/clevic/record.rb
|
31
|
+
lib/clevic/icons/icon.png
|
32
|
+
lib/clevic/dataset_roller.rb
|
33
|
+
lib/clevic/dirty.rb
|
34
|
+
lib/clevic/ordered_dataset.rb
|
35
|
+
lib/clevic/rails_models_loaders.rb
|
36
|
+
lib/clevic/default_view.rb
|
37
|
+
lib/clevic/sequel_clevic.rb
|
38
|
+
lib/clevic/sequel_ar_adapter.rb
|
39
|
+
lib/clevic/sequel_length_validation.rb
|
40
|
+
lib/clevic/ar_methods.rb
|
41
|
+
lib/clevic/sampler.rb
|
42
|
+
lib/clevic/table_index.rb
|
43
|
+
lib/clevic/table_view.rb
|
44
|
+
lib/clevic/field.rb
|
45
|
+
lib/clevic/swing.rb
|
46
|
+
lib/clevic/delegates/set_delegate.rb
|
47
|
+
lib/clevic/delegates/distinct_delegate.rb
|
48
|
+
lib/clevic/delegates/relational_delegate.rb
|
49
|
+
lib/clevic/delegates/combo_delegate.rb
|
50
|
+
lib/clevic/generic_format.rb
|
51
|
+
lib/clevic/sequel_meta.rb
|
52
|
+
lib/clevic/filter_command.rb
|
53
|
+
lib/clevic/extensions.rb
|
54
|
+
lib/clevic/view.rb
|
55
|
+
lib/clevic/model_builder.rb
|
56
|
+
lib/clevic/table_model.rb
|
57
|
+
lib/clevic/delegate.rb
|
58
|
+
lib/clevic/qt/qt_combo_box.rb
|
40
59
|
lib/clevic/qt/action_builder.rb
|
41
|
-
lib/clevic/qt/
|
42
|
-
lib/clevic/qt/
|
43
|
-
lib/clevic/qt/item_delegate.rb
|
44
|
-
lib/clevic/qt/clipboard.rb
|
60
|
+
lib/clevic/qt/accept_reject.rb
|
61
|
+
lib/clevic/qt/search_dialog.rb
|
45
62
|
lib/clevic/qt/text_delegate.rb
|
46
|
-
lib/clevic/qt/distinct_delegate.rb
|
47
|
-
lib/clevic/qt/boolean_delegate.rb
|
48
63
|
lib/clevic/qt/table_view.rb
|
49
|
-
lib/clevic/qt/
|
50
|
-
lib/clevic/qt/
|
64
|
+
lib/clevic/qt/field.rb
|
65
|
+
lib/clevic/qt/set_delegate.rb
|
51
66
|
lib/clevic/qt/extensions.rb
|
52
|
-
lib/clevic/qt/
|
67
|
+
lib/clevic/qt/model_builder.rb
|
68
|
+
lib/clevic/qt/table_model.rb
|
69
|
+
lib/clevic/qt/simplest_delegate.rb
|
70
|
+
lib/clevic/qt/delegate.rb
|
71
|
+
lib/clevic/qt/ui/browser.ui
|
72
|
+
lib/clevic/qt/ui/browser_ui.rb
|
73
|
+
lib/clevic/qt/ui/search_dialog_ui.rb
|
74
|
+
lib/clevic/qt/ui/search_dialog.ui
|
75
|
+
lib/clevic/qt/distinct_delegate.rb
|
53
76
|
lib/clevic/qt/relational_delegate.rb
|
54
|
-
lib/clevic/
|
55
|
-
lib/clevic/
|
56
|
-
lib/clevic/
|
57
|
-
lib/clevic/
|
58
|
-
lib/clevic/
|
59
|
-
lib/clevic/
|
60
|
-
lib/clevic/table_model.rb
|
61
|
-
lib/clevic/icons/icon.png
|
77
|
+
lib/clevic/qt/combo_delegate.rb
|
78
|
+
lib/clevic/qt/browser.rb
|
79
|
+
lib/clevic/qt/clipboard.rb
|
80
|
+
lib/clevic/qt/text_area_delegate.rb
|
81
|
+
lib/clevic/ui/browser_ui.rb
|
82
|
+
lib/clevic/ui/search_dialog_ui.rb
|
62
83
|
lib/clevic/qt.rb
|
63
|
-
lib/clevic/
|
64
|
-
lib/clevic/
|
84
|
+
lib/clevic/many_field.rb
|
85
|
+
lib/clevic/attribute_list.rb
|
86
|
+
lib/clevic/framework.rb
|
87
|
+
lib/clevic/model_column.rb
|
88
|
+
lib/clevic/subclasses.rb
|
89
|
+
lib/clevic/swing/cell_renderer.rb
|
90
|
+
lib/clevic/swing/action_builder.rb
|
91
|
+
lib/clevic/swing/cell_editor.rb
|
92
|
+
lib/clevic/swing/search_dialog.rb
|
93
|
+
lib/clevic/swing/text_delegate.rb
|
94
|
+
lib/clevic/swing/table_view.rb
|
95
|
+
lib/clevic/swing/row_header.rb
|
96
|
+
lib/clevic/swing/field.rb
|
97
|
+
lib/clevic/swing/set_delegate.rb
|
98
|
+
lib/clevic/swing/selection_model.rb
|
99
|
+
lib/clevic/swing/extensions.rb
|
100
|
+
lib/clevic/swing/model_builder.rb
|
101
|
+
lib/clevic/swing/table_model.rb
|
102
|
+
lib/clevic/swing/table_view_focus.rb
|
103
|
+
lib/clevic/swing/tag_editor.rb
|
104
|
+
lib/clevic/swing/delegate.rb
|
105
|
+
lib/clevic/swing/ui/manifest.mf
|
106
|
+
lib/clevic/swing/ui/dist/lib/swing-layout-1.0.3.jar
|
107
|
+
lib/clevic/swing/ui/dist/README.TXT
|
108
|
+
lib/clevic/swing/ui/build.xml
|
65
109
|
lib/clevic/swing/ui/src/resources/SearchDialog.properties
|
66
110
|
lib/clevic/swing/ui/src/TagEditor.form
|
111
|
+
lib/clevic/swing/ui/src/SearchDialog.form
|
67
112
|
lib/clevic/swing/ui/src/TagEditor.java
|
68
|
-
lib/clevic/swing/ui/
|
69
|
-
lib/clevic/swing/ui/
|
113
|
+
lib/clevic/swing/ui/src/SearchDialog.java
|
114
|
+
lib/clevic/swing/ui/nbproject/private/private.xml
|
115
|
+
lib/clevic/swing/ui/nbproject/private/config.properties
|
116
|
+
lib/clevic/swing/ui/nbproject/private/private.properties
|
117
|
+
lib/clevic/swing/ui/nbproject/project.properties
|
70
118
|
lib/clevic/swing/ui/nbproject/genfiles.properties
|
71
119
|
lib/clevic/swing/ui/nbproject/build-impl.xml
|
72
120
|
lib/clevic/swing/ui/nbproject/project.xml
|
73
|
-
lib/clevic/swing/ui/nbproject/project.properties
|
74
|
-
lib/clevic/swing/ui/nbproject/private/private.properties
|
75
|
-
lib/clevic/swing/ui/nbproject/private/config.properties
|
76
|
-
lib/clevic/swing/ui/nbproject/private/private.xml
|
77
|
-
lib/clevic/swing/ui/build.xml
|
78
|
-
lib/clevic/swing/ui/manifest.mf
|
79
|
-
lib/clevic/swing/model_builder.rb
|
80
|
-
lib/clevic/swing/table_model.rb
|
81
|
-
lib/clevic/swing/text_area_delegate.rb
|
82
|
-
lib/clevic/swing/browser.rb
|
83
|
-
lib/clevic/swing/cell_renderer.rb
|
84
|
-
lib/clevic/swing/tag_editor.rb
|
85
|
-
lib/clevic/swing/action_builder.rb
|
86
|
-
lib/clevic/swing/field.rb
|
87
|
-
lib/clevic/swing/set_delegate.rb
|
88
|
-
lib/clevic/swing/clipboard.rb
|
89
|
-
lib/clevic/swing/text_delegate.rb
|
90
|
-
lib/clevic/swing/tag_delegate.rb
|
91
|
-
lib/clevic/swing/selection_model.rb
|
92
|
-
lib/clevic/swing/distinct_delegate.rb
|
93
121
|
lib/clevic/swing/boolean_delegate.rb
|
122
|
+
lib/clevic/swing/swing_table_index.rb
|
123
|
+
lib/clevic/swing/distinct_delegate.rb
|
124
|
+
lib/clevic/swing/relational_delegate.rb
|
94
125
|
lib/clevic/swing/confirm_dialog.rb
|
95
|
-
lib/clevic/swing/table_view.rb
|
96
|
-
lib/clevic/swing/search_dialog.rb
|
97
126
|
lib/clevic/swing/combo_delegate.rb
|
98
|
-
lib/clevic/swing/
|
99
|
-
lib/clevic/swing/
|
100
|
-
lib/clevic/swing/
|
101
|
-
lib/clevic/swing/
|
102
|
-
lib/clevic/swing/delegate.rb
|
127
|
+
lib/clevic/swing/browser.rb
|
128
|
+
lib/clevic/swing/clipboard.rb
|
129
|
+
lib/clevic/swing/tag_delegate.rb
|
130
|
+
lib/clevic/swing/text_area_delegate.rb
|
103
131
|
lib/clevic/swing/action.rb
|
104
|
-
lib/clevic/swing/relational_delegate.rb
|
105
|
-
lib/clevic/swing/row_header.rb
|
106
|
-
lib/clevic/ar_methods.rb
|
107
|
-
lib/clevic/swing.rb
|
108
|
-
lib/clevic/action_builder.rb
|
109
|
-
lib/clevic/order_attribute.rb
|
110
|
-
lib/clevic/dirty.rb
|
111
|
-
lib/clevic/field.rb
|
112
|
-
lib/clevic/attribute_list.rb
|
113
|
-
lib/clevic/record.rb
|
114
|
-
lib/clevic/sampler.rb
|
115
|
-
lib/clevic/model_column.rb
|
116
132
|
lib/clevic/table_searcher.rb
|
117
|
-
lib/clevic/
|
133
|
+
lib/clevic/emitter.rb
|
134
|
+
lib/clevic/table_view_paste.rb
|
135
|
+
lib/clevic/cache_table.rb
|
118
136
|
lib/clevic/field_valuer.rb
|
119
|
-
lib/clevic/sequel_naked.rb
|
120
|
-
lib/clevic/table_index.rb
|
121
|
-
lib/clevic/view.rb
|
122
|
-
lib/clevic/sequel_meta.rb
|
123
|
-
lib/clevic/extensions.rb
|
124
|
-
lib/clevic/delegate.rb
|
125
|
-
lib/clevic/sql_dialects.rb
|
126
|
-
lib/clevic/default_view.rb
|
127
|
-
lib/clevic/many_field.rb
|
128
|
-
lib/clevic/filter_command.rb
|
129
137
|
lib/clevic/version.rb
|
130
|
-
lib/clevic/generic_format.rb
|
131
|
-
lib/clevic/emitter.rb
|
data/README.txt
CHANGED
@@ -6,12 +6,19 @@ http://clevic.rubyforge.org
|
|
6
6
|
|
7
7
|
Database framework and Model/View GUI for data capture and
|
8
8
|
editing of tables in a pre-existing relational DBMS. Works with Qt
|
9
|
-
and Java Swing.
|
9
|
+
and Java Swing. Uses SQL to do sorting and filtering wherever possible.
|
10
10
|
|
11
|
-
|
11
|
+
Based on the idea of a Field, which contains information to display
|
12
|
+
a db field in a UI of some kind. This includes display formatting, edit
|
13
|
+
formatting, edit parsing, sets of values for eg foreign keys.
|
14
|
+
And lots more.
|
12
15
|
|
13
|
-
Using
|
14
|
-
|
16
|
+
Using Sequel means Clevic works with Postgresql, Mysql and so on. It's been
|
17
|
+
tested with Postgres and sqlite.
|
18
|
+
|
19
|
+
Using Qt and Swing means it runs on Linux, Windows and OSX. The Qt
|
20
|
+
code is thoroughly tested in Linux, slightly tested in Windows and OSX. Swing
|
21
|
+
is tested in Linux and OSX.
|
15
22
|
|
16
23
|
== FEATURES:
|
17
24
|
|
@@ -21,9 +28,9 @@ in Linux, slightly tested in Windows and OSX. Swing is tested in Linux and OSX.
|
|
21
28
|
* in-place combo boxes for choosing values from related tables (foreign keys)
|
22
29
|
* distinct combo boxes to list previous values for a field
|
23
30
|
* display read-only fields from related tables
|
24
|
-
* Filter by current field
|
25
|
-
* search by field contents
|
26
|
-
* cut and paste in CSV
|
31
|
+
* Recursive Filter by current field
|
32
|
+
* search by field contents
|
33
|
+
* cut and paste in CSV and paste from HTML in the Java framework.
|
27
34
|
|
28
35
|
=== Shortcuts:
|
29
36
|
|
@@ -32,8 +39,9 @@ in Linux, slightly tested in Windows and OSX. Swing is tested in Linux and OSX.
|
|
32
39
|
* Ctrl-] for copy previous record, one field right
|
33
40
|
* Ctrl-[ for copy previous record, one field left
|
34
41
|
* Ctrl-f to find a record
|
35
|
-
* Ctrl-l to filter by current selection
|
36
|
-
*
|
42
|
+
* Ctrl-l to add a filter (by current selection)
|
43
|
+
* Ctrl-k to remove a filter
|
44
|
+
* cursor keys, PgUp PgDown etc for movement
|
37
45
|
|
38
46
|
=== Model definition:
|
39
47
|
|
@@ -43,24 +51,25 @@ that includes the Clevic::Record module will provide a minimally functional UI.
|
|
43
51
|
Beyond that, the framework provides a DSL for defining more complex and useful behaviour
|
44
52
|
(see Clevic::ModelBuilder).
|
45
53
|
|
46
|
-
|
47
|
-
account_models.rb and times_models.rb provide definitions for more real-world examples.
|
48
|
-
Associated SQL schemas are in the sql subdirectory.
|
54
|
+
=== Examples
|
49
55
|
|
50
|
-
|
56
|
+
In the models/ subdirectory, start with minimal_models.rb. account_models.rb
|
57
|
+
and times_models.rb provide definitions for real-world examples. Associated
|
58
|
+
SQL schemas are in the sql subdirectory. For implementation and more extensive
|
59
|
+
comments, see Clevic::ModelBuilder.
|
51
60
|
|
52
61
|
=== Framework
|
53
62
|
|
54
|
-
*
|
63
|
+
* uses Sequel for data access.
|
64
|
+
* can use blocks to format values for particular fields.
|
55
65
|
* sensible caching to handle large data sets without unnecessary memory and cpu usage
|
56
66
|
* extensions to various Qt classes to make db programming easier.
|
57
|
-
* uses Sequel for data access.
|
58
67
|
* leverages SQL whenever possible to handle large datasets, sorting, filtering
|
59
68
|
etc. So it's probably not suitable for talking to a remote db across a slow link.
|
60
69
|
|
61
70
|
== PROBLEMS:
|
62
71
|
|
63
|
-
|
72
|
+
There are some tests for algorithmic code, but Clevic needs a comprehensive testing framework.
|
64
73
|
|
65
74
|
== SYNOPSIS:
|
66
75
|
|
@@ -72,7 +81,8 @@ See TODO file.
|
|
72
81
|
* Sequel
|
73
82
|
* fastercsv
|
74
83
|
* qtext
|
75
|
-
* hashery
|
84
|
+
* hashery (for ruby-1.8.x)
|
85
|
+
* qtbindings
|
76
86
|
* gather
|
77
87
|
|
78
88
|
=== Libraries
|
@@ -83,11 +93,16 @@ See TODO file.
|
|
83
93
|
|
84
94
|
== INSTALL:
|
85
95
|
|
96
|
+
Get bsearch from http://0xcc.net/ruby-bsearch
|
97
|
+
|
98
|
+
Install qt bindings from https://github.com/ryanmelt/qtbindings
|
99
|
+
|
86
100
|
sudo gem install
|
87
101
|
|
88
102
|
== THANKS:
|
89
103
|
|
90
|
-
* Michelle Riley for help debugging
|
104
|
+
* Michelle Riley for help debugging under windows
|
105
|
+
* Jacob Buys for pointing out the qtbindings gem
|
91
106
|
|
92
107
|
== LICENSE:
|
93
108
|
|
data/Rakefile
CHANGED
@@ -17,9 +17,8 @@ $hoe = Hoe.new('clevic', Clevic::VERSION::STRING) do |p|
|
|
17
17
|
['andand', '>= 1.3.0'],
|
18
18
|
['sequel', '>= 3.8.0'],
|
19
19
|
['hpricot', '>= 0.8.1'],
|
20
|
-
['io-like', '>= 0.3.0']
|
21
|
-
#
|
22
|
-
#~ ['qtruby4', '>=1.4.9']
|
20
|
+
['io-like', '>= 0.3.0'],
|
21
|
+
#['qtbindings', '>=4.6.3']
|
23
22
|
# bsearch can't be installed from gems
|
24
23
|
]
|
25
24
|
p.extra_dev_deps = [
|
data/TODO
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
override_next_index broken again, on ditto
|
2
|
+
Sort out the whole /bin/clevic vs gem 'clevic', '~> 0.12.0' thing.
|
3
|
+
Meta should be related to ModelColumn somehow. Which is pretty messy itself.
|
4
|
+
|
5
|
+
can't use find on certain fields, ie code in adjustments. Partially fixed.
|
3
6
|
|
4
7
|
export to CSV
|
5
8
|
Accounts not landing after Ditto with auto-fill-in
|
@@ -10,8 +13,6 @@ use rubigen for creating model definition files?
|
|
10
13
|
undoable_command signal for delegates
|
11
14
|
|
12
15
|
need a map field (For ie -1 = short, 1 = long). Already in restricted, but it's kinda clunky.
|
13
|
-
:records missing in define_ui causes a crash
|
14
|
-
:records must take a NamedScope
|
15
16
|
|
16
17
|
Add additional :filter record sets that can be selected from menus?
|
17
18
|
|
@@ -49,17 +50,15 @@ search with acts_as_searchable and hyperestraier
|
|
49
50
|
|
50
51
|
moving of columns
|
51
52
|
/-style keyboard search by selected column, or everything if no column selected
|
52
|
-
/-style filtering?
|
53
53
|
|
54
54
|
for dates, add year if not specified, with 6 months on either side range. Configurable?
|
55
|
-
value parsing not in model
|
56
55
|
copy a field from a mouse-selection (ctrl-b maybe)
|
57
56
|
hiding of fields
|
58
57
|
|
59
58
|
save context menu settings, filter settings, etc
|
60
59
|
filtering by various things. http://doc.trolltech.com/4.3/qsortfilterproxymodel.html
|
61
60
|
highlighting by various things
|
62
|
-
cut and paste (in model format)
|
61
|
+
cut and paste (in model format. Could use indirect format ie table/row/column. Kinda pointless though since references would essentially do the same thing.)
|
63
62
|
|
64
63
|
drop cached model objects from CacheTable when they're not in use. WeakRef?
|
65
64
|
|
@@ -101,22 +100,19 @@ numeric months
|
|
101
100
|
|
102
101
|
Combos
|
103
102
|
------
|
104
|
-
shortlist combos by prefix. See Qt Examples.
|
103
|
+
shortlist combos by prefix. See Qt Examples, and Swing code.
|
105
104
|
turn on/off smart filters for relational delegates. Like selecting only distincts in the last year.
|
106
105
|
context menu for delegates, ie sort order, last used, etc
|
107
106
|
|
108
107
|
shortcut sets, depending on which OS you're used. use QKeyEvent::matches ( QKeySequence::StandardKey key )
|
109
108
|
|
110
109
|
Doing data capture, sort by id, but unfilter reverts to date/id rather than entry order
|
111
|
-
optional warnings for back-dated entries. Highlighting
|
110
|
+
optional warnings for back-dated entries. Highlighting.
|
112
111
|
make bsearch easier to install
|
113
112
|
|
114
113
|
handle db errors
|
115
114
|
easier way to run models, search LOAD_PATH
|
116
115
|
|
117
|
-
cache belongs_to associations, during loading, but don't affect ability to pick up
|
118
|
-
changes more or less instantly.
|
119
|
-
|
120
116
|
preferences
|
121
117
|
-----------
|
122
118
|
store previous searches, by model & app
|
@@ -126,7 +122,6 @@ maybe
|
|
126
122
|
-----
|
127
123
|
acts_as_shellable looks nice
|
128
124
|
consolidate read-only-ness checks
|
129
|
-
Look at DataMapper. Not suitable - need to declare properties.
|
130
125
|
ActiveMDB for migrating?
|
131
126
|
allow moving of rows
|
132
127
|
discontiguous copying of entities/csv
|
@@ -135,7 +130,6 @@ pasting of csv, into rectangular regions
|
|
135
130
|
collect a set of data requests to the model, and do them in one SQL query. See EntryTableView#moveCursor
|
136
131
|
Use SQL cursors for find & find_next?
|
137
132
|
Use roo to parse spreadsheets?
|
138
|
-
Criteria for SQL statement building http://criteria.rubyforge.org/
|
139
133
|
SqlCache
|
140
134
|
SqlStatement
|
141
135
|
Csv2Sql
|
data/bin/clevic
CHANGED
@@ -22,8 +22,13 @@ oparser.on( '-P', '--profile PROFILE', String ) { |o| $options[:profile] = o }
|
|
22
22
|
oparser.on( '-t', '--table TABLE', 'Table to display', String ) { |o| $options[:table] = o }
|
23
23
|
oparser.on( '-d', '--database DATABASE', 'Database name', String ) { |o| $options[:database] = o }
|
24
24
|
|
25
|
-
oparser.on( '-s', '--swing', 'Use JRuby Swing' )
|
26
|
-
|
25
|
+
oparser.on( '-s', '--swing', 'Use JRuby Swing' ) do |o|
|
26
|
+
require 'clevic/swing.rb'
|
27
|
+
end
|
28
|
+
|
29
|
+
oparser.on( '-q', '--qt', 'Use Qt-Ruby' ) do |o|
|
30
|
+
require 'clevic/qt.rb'
|
31
|
+
end
|
27
32
|
|
28
33
|
oparser.on( '-D', '--debug' ) { |o| $options[:debug] = true }
|
29
34
|
oparser.on( '-v', '--verbose' ) { |o| $options[:verbose] = true }
|
@@ -39,6 +44,12 @@ end
|
|
39
44
|
|
40
45
|
args = oparser.parse( ARGV )
|
41
46
|
|
47
|
+
if RUBY_PLATFORM == 'java'
|
48
|
+
require 'clevic/swing'
|
49
|
+
else
|
50
|
+
require 'clevic/qt'
|
51
|
+
end
|
52
|
+
|
42
53
|
if $options[:debug]
|
43
54
|
require 'pp'
|
44
55
|
pp $options
|
@@ -60,23 +71,6 @@ class Pathname
|
|
60
71
|
alias_method :/, :+
|
61
72
|
end
|
62
73
|
|
63
|
-
def subclasses( base )
|
64
|
-
classes = []
|
65
|
-
ObjectSpace.each_object( Class ) do |x|
|
66
|
-
if x.ancestors.include?( base )
|
67
|
-
case
|
68
|
-
when x == Clevic.base_entity_class; # don't include this
|
69
|
-
else; classes << x
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
classes.sort{|a,b| a.name <=> b.name}
|
74
|
-
end
|
75
|
-
|
76
|
-
# do nothing ...
|
77
|
-
def maybe_load_rails_models
|
78
|
-
end
|
79
|
-
|
80
74
|
# ... unless this is included
|
81
75
|
# require 'clevic/rails_models_loader.rb'
|
82
76
|
|
@@ -89,7 +83,10 @@ end
|
|
89
83
|
|
90
84
|
def load_models( pathname )
|
91
85
|
if pathname.directory?
|
92
|
-
|
86
|
+
# load all children
|
87
|
+
pathname.children.grep( /.rb$/ ).each do |child|
|
88
|
+
require child.to_s
|
89
|
+
end
|
93
90
|
else
|
94
91
|
# assume we have a single file, and try some variations
|
95
92
|
load_single_model_file( pathname )
|
@@ -97,6 +94,7 @@ def load_models( pathname )
|
|
97
94
|
end
|
98
95
|
|
99
96
|
begin
|
97
|
+
# pulled in by the clevic/qt or clevic/swing files
|
100
98
|
Clevic::Browser.run( args )
|
101
99
|
rescue Exception => e
|
102
100
|
puts e.message
|