#include <DatabaseManager.h>
Public Member Functions | |
| DatabaseManager (QWidget *parent, QString flNme, bool saveDB, DBInterface *netDBInter, DBInterface *archDBInter, DBInterface *pattDBInter, DBInterface *devDBInter) | |
| ~DatabaseManager () | |
Private Slots | |
| void | cancelButtonPressed () |
| void | okButtonPressed () |
| void | processExited () |
| void | readFromStderr () |
| void | readFromStdout () |
Private Member Functions | |
| int | addDatabaseToTable (DBInterface *dbInter) |
| DatabaseManager (const DatabaseManager &) | |
| void | fillLoadTable () |
| void | getAvailableDatabases () |
| void | loadDatabase (DBInterface *dbInter) |
| DatabaseManager | operator= (const DatabaseManager &) |
| void | saveDatabase (DBInterface *dbInter, bool compress) |
Private Attributes | |
| DBInterface * | archDBInterface |
| int | archDBRow |
| BusyDialog * | busyDialog |
| stack< DBInterface * > | dbStack |
| QTable * | dbTable |
| DBInterface * | devDBInterface |
| int | devDBRow |
| QString | fileName |
| QString | fileNameNoExtension |
| unsigned int | hostCol |
| bool | listingDatabases |
| QStringList | loadDBList |
| bool | loadingDatabase |
| unsigned int | nameCol |
| DBInterface * | netDBInterface |
| int | netDBRow |
| DBInterface * | pattDBInterface |
| int | pattDBRow |
| QProcess * | process |
| bool | saveMode |
| bool | savingDatabase |
| unsigned int | selectionCol |
| bool | storeList |
Definition at line 45 of file DatabaseManager.h.
|
||||||||||||||||||||||||||||||||
|
Constructor. Definition at line 36 of file DatabaseManager.cpp. References addDatabaseToTable(), archDBInterface, archDBRow, busyDialog, cancelButtonPressed(), dbTable, devDBInterface, devDBRow, fileName, fileNameNoExtension, getAvailableDatabases(), hostCol, nameCol, netDBInterface, netDBRow, okButtonPressed(), pattDBInterface, pattDBRow, process, processExited(), readFromStderr(), readFromStdout(), saveMode, and selectionCol. |
|
|
Destructor. Definition at line 128 of file DatabaseManager.cpp. |
|
|
Declare copy constructor private so it cannot be used inadvertently. |
|
|
Adds the information in the database to the table. Definition at line 330 of file DatabaseManager.cpp. References dbTable, hostCol, nameCol, and selectionCol. Referenced by DatabaseManager(), and fillLoadTable(). |
|
|
Hides dialog when cancel button is pressed. Definition at line 140 of file DatabaseManager.cpp. Referenced by DatabaseManager(). |
|
|
Looks at list of databases stored in the file and adds them to the table. Definition at line 353 of file DatabaseManager.cpp. References addDatabaseToTable(), archDBInterface, archDBRow, devDBInterface, devDBRow, loadDBList, netDBInterface, netDBRow, pattDBInterface, and pattDBRow. Referenced by processExited(). |
|
|
Uses the DBFileInspector script to list all of the databases in the file. Definition at line 375 of file DatabaseManager.cpp. References fileName, listingDatabases, loadingDatabase, process, savingDatabase, and SpikeStreamMainWindow::workingDirectory. Referenced by DatabaseManager(). |
|
|
Loads a database from the file using LoadSpikeStreamDatabase script. Definition at line 399 of file DatabaseManager.cpp. References dbStack, fileName, listingDatabases, loadingDatabase, process, savingDatabase, and SpikeStreamMainWindow::workingDirectory. Referenced by okButtonPressed(), and processExited(). |
|
|
Checks to see which databases are to be saved or loaded and carries out the appropriate actions. Definition at line 147 of file DatabaseManager.cpp. References archDBInterface, archDBRow, busyDialog, dbStack, dbTable, devDBInterface, devDBRow, loadDatabase(), netDBInterface, netDBRow, pattDBInterface, pattDBRow, saveDatabase(), saveMode, selectionCol, and BusyDialog::showDialog(). Referenced by DatabaseManager(). |
|
|
Declare assignment private so it cannot be used inadvertently. |
|
|
Slot called when QProcess exits. Definition at line 203 of file DatabaseManager.cpp. References busyDialog, dbStack, fileName, fillLoadTable(), listingDatabases, loadDatabase(), loadingDatabase, saveDatabase(), and savingDatabase. Referenced by DatabaseManager(). |
|
|
Reads output from stderr generated by process. Tries to terminate process. Definition at line 264 of file DatabaseManager.cpp. References busyDialog, and process. Referenced by DatabaseManager(). |
|
|
Prints stdout. When listing databases this is used to get the list of databases available in a file. Definition at line 294 of file DatabaseManager.cpp. References listingDatabases, loadDBList, process, and storeList. Referenced by DatabaseManager(). |
|
||||||||||||
|
Saves a database into the file using SaveSpikeStreamDatabase script. If it is the last database to be saved, compress should be set to true so that the file is compressed. Definition at line 449 of file DatabaseManager.cpp. References dbStack, fileNameNoExtension, listingDatabases, loadingDatabase, process, savingDatabase, and SpikeStreamMainWindow::workingDirectory. Referenced by okButtonPressed(), and processExited(). |
|
|
Definition at line 65 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Definition at line 88 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Dialog to inform user that it is busy. Definition at line 109 of file DatabaseManager.h. Referenced by DatabaseManager(), okButtonPressed(), processExited(), and readFromStderr(). |
|
|
Holds references to all of the databases that need to be saved. Definition at line 106 of file DatabaseManager.h. Referenced by loadDatabase(), okButtonPressed(), processExited(), and saveDatabase(). |
|
|
Definition at line 93 of file DatabaseManager.h. Referenced by addDatabaseToTable(), DatabaseManager(), and okButtonPressed(). |
|
|
Definition at line 67 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Definition at line 90 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Name of the file to save or load. Should be with an extension. Definition at line 96 of file DatabaseManager.h. Referenced by DatabaseManager(), getAvailableDatabases(), loadDatabase(), and processExited(). |
|
|
File name with extension removed. The extension should be added back by script. Definition at line 100 of file DatabaseManager.h. Referenced by DatabaseManager(), and saveDatabase(). |
|
|
Definition at line 83 of file DatabaseManager.h. Referenced by addDatabaseToTable(), and DatabaseManager(). |
|
|
Set to true when the script is running to list the databases. Definition at line 73 of file DatabaseManager.h. Referenced by getAvailableDatabases(), loadDatabase(), processExited(), readFromStdout(), and saveDatabase(). |
|
|
List of databases that can be loaded from the file. Definition at line 116 of file DatabaseManager.h. Referenced by fillLoadTable(), and readFromStdout(). |
|
|
Set to true when the script is running to load the databases. Definition at line 79 of file DatabaseManager.h. Referenced by getAvailableDatabases(), loadDatabase(), processExited(), and saveDatabase(). |
|
|
Definition at line 82 of file DatabaseManager.h. Referenced by addDatabaseToTable(), and DatabaseManager(). |
|
|
Definition at line 64 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Definition at line 87 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Definition at line 66 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
Definition at line 89 of file DatabaseManager.h. Referenced by DatabaseManager(), fillLoadTable(), and okButtonPressed(). |
|
|
The process that executes the script. Definition at line 103 of file DatabaseManager.h. Referenced by DatabaseManager(), getAvailableDatabases(), loadDatabase(), readFromStderr(), readFromStdout(), and saveDatabase(). |
|
|
Are we saving or loading the database. Definition at line 70 of file DatabaseManager.h. Referenced by DatabaseManager(), and okButtonPressed(). |
|
|
Set to true when the script is running to save the databases. Definition at line 76 of file DatabaseManager.h. Referenced by getAvailableDatabases(), loadDatabase(), processExited(), and saveDatabase(). |
|
|
Definition at line 84 of file DatabaseManager.h. Referenced by addDatabaseToTable(), DatabaseManager(), and okButtonPressed(). |
|
|
Records whether the script has started outputing information about the files. Definition at line 113 of file DatabaseManager.h. Referenced by readFromStdout(). |
1.4.4