aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.h
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-23 02:15:45 +0000
committerrowanbeentje <rowan@beent.je>2009-11-23 02:15:45 +0000
commit1064dfa5438d493f996d52fd9b1554d121b93214 (patch)
treeb41093f58a98ff63607ea6268e1d8bee13ad07a4 /Source/TableContent.h
parent3c52d5ea78847330f86bad7548a8d1a9bd2f0df6 (diff)
downloadsequelpro-1064dfa5438d493f996d52fd9b1554d121b93214.tar.gz
sequelpro-1064dfa5438d493f996d52fd9b1554d121b93214.tar.bz2
sequelpro-1064dfa5438d493f996d52fd9b1554d121b93214.zip
- Replace the LIMIT interface on the content view with a pagination control at the bottom. This addresses the last of Issue #49 and implements Issue #133; jump-to and two prefs affecting loading are available in a popup when clicking the pagination interface.
- Format row counts at the bottom of the content pane - Increase the MCPStreamingResult buffer for a stronger workaround for #463
Diffstat (limited to 'Source/TableContent.h')
-rw-r--r--Source/TableContent.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/Source/TableContent.h b/Source/TableContent.h
index d0cc0ec3..e3a9bd50 100644
--- a/Source/TableContent.h
+++ b/Source/TableContent.h
@@ -56,9 +56,19 @@
IBOutlet id firstBetweenField;
IBOutlet id secondBetweenField;
IBOutlet id betweenTextField;
+
+ IBOutlet NSButton *paginationPreviousButton;
+ IBOutlet NSButton *paginationButton;
+ IBOutlet NSButton *paginationNextButton;
+ IBOutlet NSView *contentViewPane;
+ IBOutlet NSView *paginationView;
+ IBOutlet NSTextField *paginationPageField;
+ IBOutlet NSStepper *paginationPageStepper;
MCPConnection *mySQLConnection;
-
+
+ BOOL _mainNibLoaded;
+
NSString *selectedTable, *usedQuery;
NSMutableArray *tableValues, *dataColumns, *keys, *oldRow;
NSUInteger tableRowsCount, previousTableRowsCount;
@@ -73,14 +83,17 @@
NSMutableDictionary *numberOfDefaultFilters;
NSUInteger lastSelectedContentFilterIndex;
id contentFilterManager;
+ NSUInteger contentPage;
BOOL sortColumnToRestoreIsAsc;
BOOL tableRowsSelectable;
NSString *sortColumnToRestore;
- unsigned int limitStartPositionToRestore;
+ unsigned int pageToRestore;
NSIndexSet *selectionIndexToRestore;
NSRect selectionViewportToRestore;
NSString *filterFieldToRestore, *filterComparisonToRestore, *filterValueToRestore, *firstBetweenValueToRestore, *secondBetweenValueToRestore;
+
+ int paginationViewHeight;
}
// Table loading methods and information
@@ -98,6 +111,12 @@
- (NSString *) usedQuery;
- (void) setUsedQuery:(NSString *)query;
+// Pagination
+- (IBAction) navigatePaginationFromButton:(id)sender;
+- (IBAction) togglePagination:(id)sender;
+- (void) setPaginationViewVisibility:(BOOL)makeVisible;
+- (void) updatePaginationState;
+
// Edit methods
- (IBAction)addRow:(id)sender;
- (IBAction)copyRow:(id)sender;
@@ -115,7 +134,6 @@
- (void)setConnection:(MCPConnection *)theConnection;
- (void)clickLinkArrow:(SPTextAndLinkCell *)theArrowCell;
- (IBAction)setCompareTypes:(id)sender;
-- (IBAction)stepLimitRows:(id)sender;
- (void)processResultIntoDataStorage:(MCPStreamingResult *)theResult approximateRowCount:(long)targetRowCount;
- (BOOL)addRowToDB;
- (NSString *)argumentForRow:(int)row;
@@ -130,12 +148,12 @@
// Retrieving and setting table state
- (NSString *) sortColumnName;
- (BOOL) sortColumnIsAscending;
-- (unsigned int) limitStart;
+- (unsigned int) pageNumber;
- (NSIndexSet *) selectedRowIndexes;
- (NSRect) viewport;
- (NSDictionary *) filterSettings;
- (void) setSortColumnNameToRestore:(NSString *)theSortColumnName isAscending:(BOOL)isAscending;
-- (void) setLimitStartToRestore:(unsigned int)theLimitStart;
+- (void) setPageToRestore:(unsigned int)thePage;
- (void) setSelectedRowIndexesToRestore:(NSIndexSet *)theIndexSet;
- (void) setViewportToRestore:(NSRect)theViewport;
- (void) setFiltersToRestore:(NSDictionary *)filterSettings;