clevic 0.13.0.b5 → 0.13.0.b6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +12 -2
- data/Manifest.txt +1 -3
- data/README.txt +28 -40
- data/Rakefile +71 -33
- data/TODO +5 -2
- data/bin/clevic +1 -0
- data/lib/clevic.rb +9 -2
- data/lib/clevic/extensions.rb +1 -1
- data/lib/clevic/field.rb +50 -28
- data/lib/clevic/framework.rb +1 -0
- data/lib/clevic/model_builder.rb +14 -8
- data/lib/clevic/model_column.rb +1 -0
- data/lib/clevic/qt.rb +4 -0
- data/lib/clevic/qt/browser.rb +5 -4
- data/lib/clevic/sequel_ar_adapter.rb +0 -8
- data/lib/clevic/sequel_clevic.rb +8 -0
- data/lib/clevic/table_model.rb +1 -0
- data/lib/clevic/table_searcher.rb +1 -0
- data/lib/clevic/table_view.rb +2 -0
- data/lib/clevic/version.rb +1 -1
- data/models/examples.rb +46 -0
- data/tasks/clevic.rake +3 -7
- data/test/test_helper.rb +7 -0
- data/test/test_table_searcher.rb +6 -6
- metadata +111 -66
- data/lib/clevic/ui/browser_ui.rb +0 -133
- data/lib/clevic/ui/search_dialog_ui.rb +0 -106
- data/tasks/rdoc.rake +0 -12
data/lib/clevic/ui/browser_ui.rb
DELETED
@@ -1,133 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
** Form generated from reading ui file 'browser.ui'
|
3
|
-
**
|
4
|
-
** Created: Fri Jan 28 11:08:53 2011
|
5
|
-
** by: Qt User Interface Compiler version 4.5.1
|
6
|
-
**
|
7
|
-
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
-
=end
|
9
|
-
|
10
|
-
class Ui_Browser
|
11
|
-
attr_reader :action_open
|
12
|
-
attr_reader :action_close
|
13
|
-
attr_reader :action_recent
|
14
|
-
attr_reader :action_dump
|
15
|
-
attr_reader :action_refresh
|
16
|
-
attr_reader :action_next
|
17
|
-
attr_reader :action_previous
|
18
|
-
attr_reader :action_new_window
|
19
|
-
attr_reader :main_widget
|
20
|
-
attr_reader :vboxLayout
|
21
|
-
attr_reader :statusbar
|
22
|
-
attr_reader :menubar
|
23
|
-
attr_reader :menu_file
|
24
|
-
attr_reader :menu_edit
|
25
|
-
attr_reader :menu_search
|
26
|
-
attr_reader :menu_model
|
27
|
-
|
28
|
-
def setupUi(browser)
|
29
|
-
if browser.objectName.nil?
|
30
|
-
browser.objectName = "browser"
|
31
|
-
end
|
32
|
-
browser.resize(727, 740)
|
33
|
-
icon = Qt::Icon.new("icon.png")
|
34
|
-
browser.windowIcon = icon
|
35
|
-
@action_open = Qt::Action.new(browser)
|
36
|
-
@action_open.objectName = "action_open"
|
37
|
-
@action_open.visible = false
|
38
|
-
@action_close = Qt::Action.new(browser)
|
39
|
-
@action_close.objectName = "action_close"
|
40
|
-
@action_close.visible = false
|
41
|
-
@action_recent = Qt::Action.new(browser)
|
42
|
-
@action_recent.objectName = "action_recent"
|
43
|
-
@action_recent.visible = false
|
44
|
-
@action_dump = Qt::Action.new(browser)
|
45
|
-
@action_dump.objectName = "action_dump"
|
46
|
-
@action_refresh = Qt::Action.new(browser)
|
47
|
-
@action_refresh.objectName = "action_refresh"
|
48
|
-
@action_next = Qt::Action.new(browser)
|
49
|
-
@action_next.objectName = "action_next"
|
50
|
-
@action_previous = Qt::Action.new(browser)
|
51
|
-
@action_previous.objectName = "action_previous"
|
52
|
-
@action_new_window = Qt::Action.new(browser)
|
53
|
-
@action_new_window.objectName = "action_new_window"
|
54
|
-
@action_new_window.visible = false
|
55
|
-
@main_widget = Qt::Widget.new(browser)
|
56
|
-
@main_widget.objectName = "main_widget"
|
57
|
-
@vboxLayout = Qt::VBoxLayout.new(@main_widget)
|
58
|
-
@vboxLayout.objectName = "vboxLayout"
|
59
|
-
browser.centralWidget = @main_widget
|
60
|
-
@statusbar = Qt::StatusBar.new(browser)
|
61
|
-
@statusbar.objectName = "statusbar"
|
62
|
-
browser.statusBar = @statusbar
|
63
|
-
@menubar = Qt::MenuBar.new(browser)
|
64
|
-
@menubar.objectName = "menubar"
|
65
|
-
@menubar.geometry = Qt::Rect.new(0, 0, 727, 31)
|
66
|
-
@menu_file = Qt::Menu.new(@menubar)
|
67
|
-
@menu_file.objectName = "menu_file"
|
68
|
-
@menu_file.enabled = false
|
69
|
-
@menu_edit = Qt::Menu.new(@menubar)
|
70
|
-
@menu_edit.objectName = "menu_edit"
|
71
|
-
@menu_search = Qt::Menu.new(@menubar)
|
72
|
-
@menu_search.objectName = "menu_search"
|
73
|
-
@menu_model = Qt::Menu.new(@menubar)
|
74
|
-
@menu_model.objectName = "menu_model"
|
75
|
-
browser.setMenuBar(@menubar)
|
76
|
-
|
77
|
-
@menubar.addAction(@menu_file.menuAction())
|
78
|
-
@menubar.addAction(@menu_edit.menuAction())
|
79
|
-
@menubar.addAction(@menu_search.menuAction())
|
80
|
-
@menubar.addAction(@menu_model.menuAction())
|
81
|
-
@menu_file.addAction(@action_open)
|
82
|
-
@menu_file.addAction(@action_close)
|
83
|
-
@menu_file.addAction(@action_recent)
|
84
|
-
@menu_file.addAction(@action_new_window)
|
85
|
-
@menu_model.addAction(@action_next)
|
86
|
-
@menu_model.addAction(@action_previous)
|
87
|
-
@menu_model.addAction(@action_dump)
|
88
|
-
@menu_model.addSeparator()
|
89
|
-
|
90
|
-
retranslateUi(browser)
|
91
|
-
|
92
|
-
Qt::MetaObject.connectSlotsByName(browser)
|
93
|
-
end # setupUi
|
94
|
-
|
95
|
-
def setup_ui(browser)
|
96
|
-
setupUi(browser)
|
97
|
-
end
|
98
|
-
|
99
|
-
def retranslateUi(browser)
|
100
|
-
@action_open.text = Qt::Application.translate("Browser", "&Open", nil, Qt::Application::UnicodeUTF8)
|
101
|
-
@action_close.text = Qt::Application.translate("Browser", "&Close", nil, Qt::Application::UnicodeUTF8)
|
102
|
-
@action_recent.text = Qt::Application.translate("Browser", "&Recent", nil, Qt::Application::UnicodeUTF8)
|
103
|
-
@action_dump.text = Qt::Application.translate("Browser", "&Dump", nil, Qt::Application::UnicodeUTF8)
|
104
|
-
@action_dump.shortcut = Qt::Application.translate("Browser", "Alt+Shift+D", nil, Qt::Application::UnicodeUTF8)
|
105
|
-
@action_refresh.text = Qt::Application.translate("Browser", "&Refresh", nil, Qt::Application::UnicodeUTF8)
|
106
|
-
@action_refresh.iconText = Qt::Application.translate("Browser", "Refresh current table from database", nil, Qt::Application::UnicodeUTF8)
|
107
|
-
@action_refresh.toolTip = Qt::Application.translate("Browser", "Refresh current table from database", nil, Qt::Application::UnicodeUTF8)
|
108
|
-
@action_refresh.shortcut = Qt::Application.translate("Browser", "Ctrl+R", nil, Qt::Application::UnicodeUTF8)
|
109
|
-
@action_next.text = Qt::Application.translate("Browser", "&Next", nil, Qt::Application::UnicodeUTF8)
|
110
|
-
@action_next.iconText = Qt::Application.translate("Browser", "Next", nil, Qt::Application::UnicodeUTF8)
|
111
|
-
@action_next.toolTip = Qt::Application.translate("Browser", "Next Model", nil, Qt::Application::UnicodeUTF8)
|
112
|
-
@action_next.shortcut = Qt::Application.translate("Browser", "Ctrl+Tab", nil, Qt::Application::UnicodeUTF8)
|
113
|
-
@action_previous.text = Qt::Application.translate("Browser", "&Previous", nil, Qt::Application::UnicodeUTF8)
|
114
|
-
@action_previous.toolTip = Qt::Application.translate("Browser", "Previous Model", nil, Qt::Application::UnicodeUTF8)
|
115
|
-
@action_previous.shortcut = Qt::Application.translate("Browser", "Ctrl+Shift+Backtab", nil, Qt::Application::UnicodeUTF8)
|
116
|
-
@action_new_window.text = Qt::Application.translate("Browser", "&New Window", nil, Qt::Application::UnicodeUTF8)
|
117
|
-
@menu_file.title = Qt::Application.translate("Browser", "&File", nil, Qt::Application::UnicodeUTF8)
|
118
|
-
@menu_edit.title = Qt::Application.translate("Browser", "&Edit", nil, Qt::Application::UnicodeUTF8)
|
119
|
-
@menu_search.title = Qt::Application.translate("Browser", "&Search", nil, Qt::Application::UnicodeUTF8)
|
120
|
-
@menu_model.title = Qt::Application.translate("Browser", "&Table", nil, Qt::Application::UnicodeUTF8)
|
121
|
-
end # retranslateUi
|
122
|
-
|
123
|
-
def retranslate_ui(browser)
|
124
|
-
retranslateUi(browser)
|
125
|
-
end
|
126
|
-
|
127
|
-
end
|
128
|
-
|
129
|
-
module Ui
|
130
|
-
class Browser < Ui_Browser
|
131
|
-
end
|
132
|
-
end # module Ui
|
133
|
-
|
@@ -1,106 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
** Form generated from reading ui file 'search_dialog.ui'
|
3
|
-
**
|
4
|
-
** Created: Fri Jan 28 11:08:53 2011
|
5
|
-
** by: Qt User Interface Compiler version 4.5.1
|
6
|
-
**
|
7
|
-
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
-
=end
|
9
|
-
|
10
|
-
class Ui_SearchDialog
|
11
|
-
attr_reader :button_box
|
12
|
-
attr_reader :selected_rows
|
13
|
-
attr_reader :selected_columns
|
14
|
-
attr_reader :search_label
|
15
|
-
attr_reader :search_combo
|
16
|
-
attr_reader :from_start
|
17
|
-
attr_reader :regex
|
18
|
-
attr_reader :whole_words
|
19
|
-
attr_reader :forwards
|
20
|
-
attr_reader :backwards
|
21
|
-
|
22
|
-
def setupUi(searchDialog)
|
23
|
-
if searchDialog.objectName.nil?
|
24
|
-
searchDialog.objectName = "searchDialog"
|
25
|
-
end
|
26
|
-
searchDialog.windowModality = Qt::WindowModal
|
27
|
-
searchDialog.resize(307, 400)
|
28
|
-
icon = Qt::Icon.new("../../hilfer/bin/hilfer-icon.png")
|
29
|
-
searchDialog.windowIcon = icon
|
30
|
-
@button_box = Qt::DialogButtonBox.new(searchDialog)
|
31
|
-
@button_box.objectName = "button_box"
|
32
|
-
@button_box.geometry = Qt::Rect.new(30, 240, 261, 32)
|
33
|
-
@button_box.orientation = Qt::Horizontal
|
34
|
-
@button_box.standardButtons = Qt::DialogButtonBox::Cancel|Qt::DialogButtonBox::NoButton|Qt::DialogButtonBox::Ok
|
35
|
-
@selected_rows = Qt::CheckBox.new(searchDialog)
|
36
|
-
@selected_rows.objectName = "selected_rows"
|
37
|
-
@selected_rows.enabled = false
|
38
|
-
@selected_rows.geometry = Qt::Rect.new(30, 280, 191, 21)
|
39
|
-
@selected_columns = Qt::CheckBox.new(searchDialog)
|
40
|
-
@selected_columns.objectName = "selected_columns"
|
41
|
-
@selected_columns.enabled = false
|
42
|
-
@selected_columns.geometry = Qt::Rect.new(30, 310, 191, 21)
|
43
|
-
@search_label = Qt::Label.new(searchDialog)
|
44
|
-
@search_label.objectName = "search_label"
|
45
|
-
@search_label.geometry = Qt::Rect.new(20, 10, 51, 21)
|
46
|
-
@search_label.textFormat = Qt::PlainText
|
47
|
-
@search_combo = Qt::ComboBox.new(searchDialog)
|
48
|
-
@search_combo.objectName = "search_combo"
|
49
|
-
@search_combo.geometry = Qt::Rect.new(90, 10, 201, 25)
|
50
|
-
@search_combo.focusPolicy = Qt::StrongFocus
|
51
|
-
@search_combo.editable = true
|
52
|
-
@from_start = Qt::CheckBox.new(searchDialog)
|
53
|
-
@from_start.objectName = "from_start"
|
54
|
-
@from_start.geometry = Qt::Rect.new(90, 50, 191, 21)
|
55
|
-
@regex = Qt::CheckBox.new(searchDialog)
|
56
|
-
@regex.objectName = "regex"
|
57
|
-
@regex.geometry = Qt::Rect.new(90, 80, 191, 21)
|
58
|
-
@whole_words = Qt::CheckBox.new(searchDialog)
|
59
|
-
@whole_words.objectName = "whole_words"
|
60
|
-
@whole_words.geometry = Qt::Rect.new(90, 110, 191, 21)
|
61
|
-
@forwards = Qt::RadioButton.new(searchDialog)
|
62
|
-
@forwards.objectName = "forwards"
|
63
|
-
@forwards.geometry = Qt::Rect.new(90, 140, 171, 26)
|
64
|
-
@forwards.checked = true
|
65
|
-
@backwards = Qt::RadioButton.new(searchDialog)
|
66
|
-
@backwards.objectName = "backwards"
|
67
|
-
@backwards.geometry = Qt::Rect.new(90, 170, 176, 26)
|
68
|
-
@search_label.buddy = @search_combo
|
69
|
-
Qt::Widget.setTabOrder(@search_combo, @selected_columns)
|
70
|
-
Qt::Widget.setTabOrder(@selected_columns, @selected_rows)
|
71
|
-
Qt::Widget.setTabOrder(@selected_rows, @button_box)
|
72
|
-
|
73
|
-
retranslateUi(searchDialog)
|
74
|
-
Qt::Object.connect(@button_box, SIGNAL('accepted()'), searchDialog, SLOT('accept()'))
|
75
|
-
Qt::Object.connect(@button_box, SIGNAL('rejected()'), searchDialog, SLOT('reject()'))
|
76
|
-
|
77
|
-
Qt::MetaObject.connectSlotsByName(searchDialog)
|
78
|
-
end # setupUi
|
79
|
-
|
80
|
-
def setup_ui(searchDialog)
|
81
|
-
setupUi(searchDialog)
|
82
|
-
end
|
83
|
-
|
84
|
-
def retranslateUi(searchDialog)
|
85
|
-
searchDialog.windowTitle = Qt::Application.translate("SearchDialog", "Search", nil, Qt::Application::UnicodeUTF8)
|
86
|
-
@selected_rows.text = Qt::Application.translate("SearchDialog", "Selected Rows", nil, Qt::Application::UnicodeUTF8)
|
87
|
-
@selected_columns.text = Qt::Application.translate("SearchDialog", "Selected Columns", nil, Qt::Application::UnicodeUTF8)
|
88
|
-
@search_label.text = Qt::Application.translate("SearchDialog", "Search", nil, Qt::Application::UnicodeUTF8)
|
89
|
-
@from_start.text = Qt::Application.translate("SearchDialog", "From &Start", nil, Qt::Application::UnicodeUTF8)
|
90
|
-
@regex.text = Qt::Application.translate("SearchDialog", "&Regular Expression", nil, Qt::Application::UnicodeUTF8)
|
91
|
-
@whole_words.text = Qt::Application.translate("SearchDialog", "&Whole Words", nil, Qt::Application::UnicodeUTF8)
|
92
|
-
@forwards.text = Qt::Application.translate("SearchDialog", "&Forwards", nil, Qt::Application::UnicodeUTF8)
|
93
|
-
@backwards.text = Qt::Application.translate("SearchDialog", "&Backwards", nil, Qt::Application::UnicodeUTF8)
|
94
|
-
end # retranslateUi
|
95
|
-
|
96
|
-
def retranslate_ui(searchDialog)
|
97
|
-
retranslateUi(searchDialog)
|
98
|
-
end
|
99
|
-
|
100
|
-
end
|
101
|
-
|
102
|
-
module Ui
|
103
|
-
class SearchDialog < Ui_SearchDialog
|
104
|
-
end
|
105
|
-
end # module Ui
|
106
|
-
|
data/tasks/rdoc.rake
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# remove hoe documentation task
|
2
|
-
Rake::Task['docs'].clear
|
3
|
-
|
4
|
-
# make this respond to docs, so it fits in with the rest of the build
|
5
|
-
Rake::RDocTask.new do |rdoc|
|
6
|
-
rdoc.name = :docs
|
7
|
-
rdoc.title = "Clevic DB UI builder"
|
8
|
-
rdoc.main = 'README.txt'
|
9
|
-
rdoc.rdoc_dir = 'doc'
|
10
|
-
rdoc.rdoc_files.include %w{History.txt lib/**/*.rb README.txt TODO}
|
11
|
-
rdoc.options += [ '-SHN' ]
|
12
|
-
end
|