#include <mainwindow.h>
Public Member Functions | |
MainWindow () | |
Main Window Constructor. This creates and registers the main window and all of its widgets. It also loads the settings from the settings file and all the required icons. Then it creates the progress window for listing downloads in queue. | |
~MainWindow () | |
MainWindow Deconstructor. This closes the server connection. | |
void | HandleMessage (os::Message *) |
Default Message Handler. This currently handles the creation of any message boxes and also the creation of the connection when the "CONNECT" button is pressed in the ConnectBar. It also does settings changes. | |
void | OpenConnection (const String &zScheme, const String &zHost, const String &nPort, const String &zUser, const String &zPassword) |
Open Connection. This is used by the application to attempt to open a window after startup. | |
Private Member Functions | |
bool | OkToQuit () |
Quit the app when the user closes the main window. Tells the app to quit, when the user closes the window. | |
void | Layout () |
Layout Generate the main widgets for the window and add them to the window. | |
void | SetupMenus () |
Setup Menus This generates the contents of the main menu. | |
void | SetupToolBar () |
Setup ToolBar This generates the toolbar with the required tools. | |
void | SetupStatusBar () |
Setup Status Bar Setup for status display at bottom of the window. | |
void | UpdateStatusBar (Message *update) |
Update the status bar for the main window. | |
void | PositionWindows () |
Restore the windows to their saved positions. Loads the position of the main and progress windows from the settings file, and sets the window frame. | |
String | ConstructURL (const String &zHost, int nPort, const String &zUser, const String &zPassword) |
Construct URL from widgit data. This will generate the ftp string for. | |
bool | isValidHost (const String &zHost) |
Is Valid Host. Verifies that the input host is valid. | |
bool | isValidUser (const String &zUser) |
Is Valid User. Verifies that the input user name is valid. | |
bool | isValidPassword (const String &zPassword) |
Is Valid Password. Verifies that the input password is valid. | |
bool | isValidPort (int nPort) |
Is Valid Port. Verifies that the input port is valid. | |
Private Attributes | |
os::Window * | m_pcProgressWindow |
The progress window for Transferrer. | |
os::Menu * | m_pcMainMenu |
Main menu bar. | |
os::ToolBar * | m_pcToolBar |
Toolbar containing the ConnectBar. | |
os::StatusBar * | m_pcStatusBar |
Status bar for the window to show status information. | |
ContainerView * | m_pcView |
Container class for the local directory and remote directory views. | |
ConnectBar * | m_pcConnectBar |
ConnectBar containing buttons that allow for connecting to a server. | |
Server * | m_pcServer |
The current server being used by the Transferrer. | |
AppSettings * | m_pcSettings |
Settings object which stores the app's global settings. | |
SettingsMenu * | m_pcSettingsMenu |
Container for the Settings menu item (for callback purposes to update the actual menu). | |
Static Private Attributes | |
static const os::String | sUnreserved |
static const os::String | sPctEncoded |
static const os::String | sSubDelims |
static const os::String | sUserinfo_nc |
static const os::String | sDecOctet |
static const os::String | sIPv4address |
static const os::String | sH16 |
static const os::String | sLS32 |
static const os::String | sIPvFuture |
static const os::String | sIPv6address |
static const os::String | sIP_literal |
void MainWindow::HandleMessage | ( | os::Message * | pcMessage | ) |
Default Message Handler. This currently handles the creation of any message boxes and also the creation of the connection when the "CONNECT" button is pressed in the ConnectBar. It also does settings changes.
pcMessage | Pointer to the message that needs to be handled. |
Deal with changes to the files being transferred (pause, resume, cancel).
void MainWindow::OpenConnection | ( | const String & | zScheme, | |
const String & | zHost, | |||
const String & | zPort, | |||
const String & | zUser, | |||
const String & | zPassword | |||
) |
Open Connection. This is used by the application to attempt to open a window after startup.
zScheme | The scheme of the protocol (eg. ftp, http, etc). | |
zHost | The host to connect to. | |
zPort | The port number string. | |
zUser | The username to login using. | |
zPassword | The password to login with. |
String MainWindow::ConstructURL | ( | const String & | zHost, | |
int | nPort, | |||
const String & | zUser, | |||
const String & | zPassword | |||
) | [private] |
Construct URL from widgit data. This will generate the ftp string for.
zHost | Host to connect to. | |
nPort | The port number of the connection. | |
zUser | Username. | |
zPassword | Password for the username. |
bool MainWindow::isValidHost | ( | const String & | zHost | ) | [private] |
Is Valid Host. Verifies that the input host is valid.
zHost | Host string to validate. |
bool MainWindow::isValidUser | ( | const String & | zUser | ) | [private] |
Is Valid User. Verifies that the input user name is valid.
zUser | User name string to validate. |
bool MainWindow::isValidPassword | ( | const String & | zPassword | ) | [private] |
Is Valid Password. Verifies that the input password is valid.
zPassword | Password string to validate. |
bool MainWindow::isValidPort | ( | int | nPort | ) | [private] |
Is Valid Port. Verifies that the input port is valid.
nPort | Port number to validate. |
const os::String MainWindow::sUnreserved [static, private] |
Unreserved characters. See RFC 3986.
const os::String MainWindow::sPctEncoded [static, private] |
Percent Encoded numbers. See RFC 3986.
const os::String MainWindow::sSubDelims [static, private] |
Subexpression Delimiters. See RFC 3986.
const os::String MainWindow::sUserinfo_nc [static, private] |
Userinfo without colon. See RFC 3986.
const os::String MainWindow::sDecOctet [static, private] |
Decimal Octet [0, 255]. See RFC 3986.
const os::String MainWindow::sIPv4address [static, private] |
IPv4 Addresses (123.123.123.123). Not as specific as RFC 3986, so need to check that values are between 0 and 255.
const os::String MainWindow::sH16 [static, private] |
16 bit hex value. See RFC 3986.
const os::String MainWindow::sLS32 [static, private] |
(h16:h16) | IPv4 Address. See RFC 3986.
const os::String MainWindow::sIPvFuture [static, private] |
Future IP versions. See RFC 3986.
const os::String MainWindow::sIPv6address [static, private] |
IPv6 Address. See RFC 3986.
const os::String MainWindow::sIP_literal [static, private] |
IP-literal ::= LBRACKET (IPv6address | IPvFuture) RBRACKET. See RFC 3986.