Commit Graph

235 Commits

Author SHA1 Message Date
Martin Kleusberg
cda16ba0fb Remove the modified flag in the EditTableDialog
Remove the flag storing the mofification status in the edit table
dialog. It's only been used in one place and there it was not even
really needed - so why bothering updating and maintaining it?
2013-01-08 21:24:45 +01:00
Martin Kleusberg
24c3eca2e5 Rename dialog files and classes
Rename the files and classes for the dialogs to share all the same
naming pattern. This should make navigation in the code a bit easier.
Do not include dialogs not rewritten yet; they'll be edited as they are
redesigned.
2013-01-08 21:19:01 +01:00
Martin Kleusberg
32ab512f08 Rewrite the create index dialog
Use Qt Designer for the create index dialog.

Change the layout of the create index dialog completely to be easier to
use and more powerful.

Rewrite most of the index creation code to be easier to understand and
more flexible.
2013-01-08 20:55:18 +01:00
Martin Kleusberg
b38ea3c6bf Silence to debug messages 2013-01-08 19:43:57 +01:00
Martin Kleusberg
684b825a9e Add new function to DBBrowserDB which creates a new table
Add a new function to the DBBrowserDB class which creates a new table.

Use this function in most places where a table needs to be created.
2013-01-08 19:41:07 +01:00
Martin Kleusberg
f8c629ca4e Add keyboard shortcuts for the buttons in the browse tab again
Re-add the keyboard shortcuts for the find and refresh button in the
browse tab. They were lost in the process of using Qt Designer again.
2013-01-07 23:57:31 +01:00
Martin Kleusberg
6b9ad93116 Support dropping of columns
Support deleting columns of existing tables. Again this requires a
workaround because of SQLite's ALTER TABLE support.

Also show an error message to the user when editing a column failes.
2013-01-07 23:54:15 +01:00
Martin Kleusberg
fac589c3e3 Allow editing fields in existing DB tables
Make it possible to rename columns and change their types even when
editing an existing table. This requires a workaround to not use the
ALTER TABLE command which is not fully supported by SQLite.
2013-01-07 23:33:52 +01:00
Martin Kleusberg
b0af89c1cb Move code to rename table to DBBrowserDB class
Move the code to rename a table from the EditTableForm to the
DBBrowserDB class where it should be and where it obviously was intended
to be.
2013-01-07 22:43:31 +01:00
Martin Kleusberg
7904b594ed Delete the SQLite source code
Delete the SQLite source files and change all includes to external
files. This is how libraries are supposed to work and avoids spamming
the project diff with updates that were not even done by us.
2013-01-05 23:18:47 +01:00
Martin Kleusberg
1c4891ad47 Silence some runtime warnings
Rename all slots starting with "on_" because Qt tries to auto-connect
them to signals of that name. And as those signals do not exist Qt
prints a warning for each of them after every program start.
2013-01-05 16:21:28 +01:00
Martin Kleusberg
acfb40902a Reset sorting when changing the current table
Reset the sorting of the table view in the browse tab when changing the
current table. This offers not just only a more plausible behaviour to
the user but also fixes a bug that would cause an empty table to be
shown when sorting e.g. column number 5 and then changing to a table
with just 2 columns.
2013-01-05 16:08:33 +01:00
Martin Kleusberg
bed67cd970 Make sure to always escape table and column names properly
Always put `...` around the names of tables, columns and other objects
to avoid errors when the user creates objects with the name of key
words.
2013-01-05 15:31:42 +01:00
Martin Kleusberg
2201ff3234 Partially undo 9a9d32a5a7
Reload the DB structure even when changing to the browse tab asthe
structure might have been changed when coming from the SQL tab.
2013-01-05 15:16:32 +01:00
Martin Kleusberg
e7d213c546 Set text codec to UTF8 fixing the handling of special characters
Set the encoding used by Qt to UTF8. This fixes the wrong appearance of
special characters caused by SQLite using UTF8 and the application
ISO-8859 or whatever.
2013-01-05 14:48:13 +01:00
Martin Kleusberg
9e2beb6c81 Fix a few bugs in the CSV import
Start numbering the rows in the preview table view of the ImportCSVForm
with #1 instead of 0.

Don't create too many columns when filling the preview table view.

Keep the UI responsive when reading a CSV file. This way the progress
dialog can be seen, too.

Don't crash when reading files without an empty line at their end.
2013-01-05 14:37:58 +01:00
Martin Kleusberg
a836837b57 Quiten some more debug messages
Remove some more debug messages. There is no point in showing them when
there has been no error.
2013-01-04 23:26:38 +01:00
Martin Kleusberg
a1c2aca84b Do not allow empty tables in EditTableForm
Do not allow the creation of a table without any columns as this would
lead to an SQL error.
2013-01-04 17:53:10 +01:00
Martin Kleusberg
88ee12a1ab Delete the DeleteIndexForm
Delete the DeleteIndexForm as it is no longer needed. Since the last
commit an index can be deleted directly via the popup menu.
2013-01-04 17:41:26 +01:00
Martin Kleusberg
41e0a11452 Allow deletion of indices, views and triggers
Extend the code used to delete tables to also allow the deletion of
other objects in the data base.

Change the activation of the popup menu entries to activate the
associated action when a trigger, view or index is selected.
2013-01-04 17:31:34 +01:00
Martin Kleusberg
d12bb62156 Change design of DBBrowserDB a bit and support more actions with views
Change the design of DBBrowserDB to store all DB objects in one single
map instead of having one map for table, one for views, one for triggers
etc. This requires some changes in the entire program.

Show more details of views in the DB structure tab, i.e. the names of
the fields included in the view. Allow browsing views in the browse tab
and allow exporting views as CSV.
2013-01-04 16:38:59 +01:00
Martin Kleusberg
9409622e75 Do various changes to improve usability of the main window a bit 2013-01-03 23:14:33 +01:00
Martin Kleusberg
130e389bd6 Start simplifying the dialog construction and destruction a bit 2013-01-03 16:06:30 +01:00
Martin Kleusberg
9fbddc34b5 Move content of sqlitebrowsertypes.h to sqlitedb.h 2013-01-03 15:19:17 +01:00
Martin Kleusberg
d446df58a0 Use per pixel scrolling in tree widget showing the DB structure
Do not scroll per item but per pixel when scrolling in the tree widget
in the DB structure tab of the main window. This makes scrolling much
more comfortable when the schema string includes line breaks.
2013-01-03 14:41:24 +01:00
Martin Kleusberg
8290a035e8 Add basic and shaky pragma editing
Since quite a few problems are fixed by now and the program is moving
towards rudeimentary usability again it's time to add some new features
and problems!
2013-01-03 14:36:28 +01:00
Martin Kleusberg
8ec19c4513 Update the icons
Remove no longer used icons, add a new one and replace one or two old
icons by new ones.
2013-01-02 23:34:40 +01:00
Martin Kleusberg
9b2e8cd5a4 Show those TODO message also when using the toolbar or the popup menu
This should let the user know that something's not working instead of
offering him a not working dialog and winding him up this way. That
should make the behaviour of the program much easier to understand.
2013-01-02 23:04:04 +01:00
Martin Kleusberg
7424268f28 Show a TODO message when trying to edit column of an existing table
Don't allow the user to edit the columns of an existing table and show a
warning instead. It's not working anyway.
2013-01-02 22:51:11 +01:00
Martin Kleusberg
b485e332f5 Extend remove table column function
Make it possible to remove columns in the dialog shown to design a new
table.
Show a TODO message when user tries to delete a column in an existing
table.
2013-01-02 22:45:22 +01:00
Martin Kleusberg
58b247b9aa Create savepoint when editing a table
Create a savepoint when starting to edit an existing table, release it
when the user clicks on the OK button and rollback to it if he cancels
the action.
2013-01-02 22:30:35 +01:00
Martin Kleusberg
4bebed0365 Change company name
There isn't really any company behind this project, so why name one?
2013-01-02 20:31:14 +01:00
Martin Kleusberg
0180017dbd Delete the ChooseTableForm and DeleteTableForm dialogs
Delete those two dialog, the only use of which is to make it possible to
select a table which is totally pointless because the user can do this
in the main window and would probably do so intuitively anyway.
2013-01-02 20:03:33 +01:00
Martin Kleusberg
547e8d9964 Fix window caption of edit field dialog called by popup menu
Fix the caption of the edit field dialog to show the correct table name
when it is called by the modify field action in the popup menu or the
toolbar.
Also remove one more useless debug message.
2013-01-02 19:14:38 +01:00
Martin Kleusberg
29673568be Move preferences menu action to view menu 2013-01-02 19:10:38 +01:00
Martin Kleusberg
0f323dcbfa Allow all file names when opening a DB by drag & drop 2013-01-02 19:03:52 +01:00
Martin Kleusberg
eef1c04020 Rename files to match class names 2013-01-02 19:01:47 +01:00
Martin Kleusberg
0edfb7e9d3 Show triggers and views
Also show the triggers and views in the DB structure tab.
2013-01-02 18:50:27 +01:00
Martin Kleusberg
c0b2c073a6 Add license information for the icons used 2013-01-02 18:28:17 +01:00
Martin Kleusberg
e33077ef8e Detect and colourise comments in the SQL syntax highlighter 2013-01-01 17:09:13 +01:00
Martin Kleusberg
9092e7d41f Reduce the amount of those useless debug messages a bit 2013-01-01 16:31:22 +01:00
Martin Kleusberg
43496c9549 Merge editTableForm and createTableForm
Add the functionality needed to create new tables to the editTableForm
dialog.
Delete the createTableForm as it is no longer needed, also delete its
semi-finished replacement createTableDialog.
Fix not working add column function and as usual some other bugs here
and there.
2013-01-01 16:23:12 +01:00
Martin Kleusberg
9a9d32a5a7 Do not reload not needed information when changing the current tab
Do not query the table selected in the browse data tab when changing to
the database structure tab and vice versa.
2013-01-01 15:48:09 +01:00
Martin Kleusberg
c68900030b Add modify field action to toolbar 2013-01-01 15:41:31 +01:00
Martin Kleusberg
f623a62036 Always show all rows in table view of browse tab
Always show all rows of the current table in the browse tab of the main
window instead of limiting it to a 1000 per page.
Change the functionality of the buttons and inputs to change the page
accordingly.

Limiting the number of rows to a 1000 was probably done for performance
reasons but is a killer in terms of usability. And as we'll probably
move sooner or later to a model-view architecture that loads data on
demand, the performance when opening large tables will be more than
restored anyway.
2013-01-01 15:32:50 +01:00
Martin Kleusberg
979ed7a007 Clean up code, especially includes
Clean up the entire code a bit, especially by deleting unneeded defines
and includes. This should make the code a bit clearer and faster to
compile.
2012-12-31 18:01:48 +01:00
Martin Kleusberg
cb4686dbbf Fix input validation of custom field type field 2012-12-31 17:31:39 +01:00
Martin Kleusberg
21b9c83480 Fix editFieldForm to work correctly for newly added tables 2012-12-31 16:26:42 +01:00
Martin Kleusberg
d066c86507 Fix a number of bugs
Fix bug when closing the editFieldForm.
Fix bug that not always the correct database object was used.
Fix bug that changed field type when changing field name in editTableForm.
2012-12-31 16:16:25 +01:00
Martin Kleusberg
8c322b2dd1 Get rid of renameTableForm dialog
Delete the renameTableForm class and dialog. They are basically useless
as their functionality can (and has been) easily be integrated into the
editTableForm.
2012-12-31 15:58:57 +01:00