diff options
author | rowanbeentje <rowan@beent.je> | 2009-10-20 23:45:16 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-10-20 23:45:16 +0000 |
commit | 951330376a7b1e85dea0c44825534a4ab598c100 (patch) | |
tree | 1f098f10b4eebd660c9e2fcf1ea2926f1efbc24b /Source/TableDocument.h | |
parent | 53ca17c5bba2d57ecaee3a8ccd005fe4d6a4abe3 (diff) | |
download | sequelpro-951330376a7b1e85dea0c44825534a4ab598c100.tar.gz sequelpro-951330376a7b1e85dea0c44825534a4ab598c100.tar.bz2 sequelpro-951330376a7b1e85dea0c44825534a4ab598c100.zip |
Initial work on threaded task, with an implementation of Table Content view data loading:
- Removal of AMIndeterminateProgressIndicatorCell, and addition of a custom fork of YRKSpinningProgressIndicator which fixes bugs, adds threaded drawing, and adds a determinate mode.
- Addition of a task system within TableDocument, triggering display of a large central progress indicator and stopping the window from being interacted with in any way that would cause a query while the task is running.
- Add threaded TableContent content fetching, including use of the new task system and determinate progress bar; make fixes to improve threading stability and interaction.
Diffstat (limited to 'Source/TableDocument.h')
-rw-r--r-- | Source/TableDocument.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/TableDocument.h b/Source/TableDocument.h index 465d49b7..6720527a 100644 --- a/Source/TableDocument.h +++ b/Source/TableDocument.h @@ -68,6 +68,11 @@ enum sp_current_query_mode IBOutlet id variablesSheet; IBOutlet id queryProgressBar; + IBOutlet NSBox *taskProgressLayer; + IBOutlet id taskProgressIndicator; + IBOutlet id taskDescriptionText; + IBOutlet NSButton *taskCancelButton; + IBOutlet id favoritesButton; IBOutlet id databaseNameField; @@ -129,9 +134,16 @@ enum sp_current_query_mode BOOL _encodingViaLatin1; BOOL _shouldOpenConnectionAutomatically; BOOL _isConnected; + BOOL _isWorking; BOOL _mainNibLoaded; int _queryMode; + BOOL taskDisplayIsIndeterminate; + float taskProgressValue; + float taskDisplayLastValue; + float taskProgressValueDisplayInterval; + NSTimer *taskDrawTimer; + NSToolbar *mainToolbar; NSToolbarItem *chooseDatabaseToolbarItem; @@ -171,6 +183,15 @@ enum sp_current_query_mode - (IBAction)openCurrentConnectionInNewWindow:(id)sender; - (NSArray *)allDatabaseNames; +// Task progress and notification methods +- (void) startTaskWithDescription:(NSString *)description; +- (void) showTaskProgressLayer:(NSTimer *)theTimer; +- (void) setTaskDescription:(NSString *)description; +- (void) setTaskPercentage:(NSNumber *)taskPercentage; +- (void) setTaskProgressToIndeterminate; +- (void) endTask; +- (BOOL) isWorking; + // Encoding methods - (void)setConnectionEncoding:(NSString *)mysqlEncoding reloadingViews:(BOOL)reloadViews; - (NSString *)databaseEncoding; |