casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes
casa::TBView Class Reference

Current "view" or state of the browser that can be serialized. More...

#include <TBView.h>

List of all members.

Public Member Functions

 TBView ()
 Default Constructor.
 ~TBView ()
void addTableView (TBTableView *view)
 Adds the given table view to this view.
vector< TBTableView * > * getTableViews ()
 Returns the list of table views in this view.
void setLastOpenedDirectory (String str)
 Sets the last opened directory for this view.
String getLastOpenedDirectory ()
 Returns the last opened directory for this view.
int chooserHistoryLimit () const
 Gets/Sets the file chooser history limit.
void setChooserHistoryLimit (int histLimit)
bool saveToFile (String file)
 Saves this view in XML format to the given file.
bool saveToDefaultFile ()
 Equivalent to saveToFile(defaultFile()).

Static Public Member Functions

static TBViewloadFromFile (String file)
 Loads the view saved in the given file and returns it.
static TBViewloadFromDefaultFile ()
 Equivalent to loadFromFile(defaultFile()).
static String defaultFile ()
 Returns the default location to save and load a view: TBConstants::dotCasapyDir() + TBConstants::VIEW_SAVE_LOC.

Static Private Member Functions

static void fontElem (DOMElement *elem, QFontColor *font)
 Creates an XML element based upon the given QFontColor.
static QFontColorfontElem (DOMElement *elem)
 Creates a QFontColor based upon the given XML element.

Private Attributes

String lastOpenedDir
 Last opened directory.
int histLimit
 File chooser history limit.
vector< TBTableView * > views
 Table views.

Detailed Description

Current "view" or state of the browser that can be serialized.

Synopsis

The TBView defines the state of the browser and includes: the last opened directory, and the TBTableViews of all currently opened tables. TBView has methods to save to and load from a file on disk.

Definition at line 107 of file TBView.h.


Constructor & Destructor Documentation

Default Constructor.


Member Function Documentation

Adds the given table view to this view.

Gets/Sets the file chooser history limit.

static String casa::TBView::defaultFile ( ) [static]

Returns the default location to save and load a view: TBConstants::dotCasapyDir() + TBConstants::VIEW_SAVE_LOC.

static void casa::TBView::fontElem ( DOMElement *  elem,
QFontColor font 
) [static, private]

Creates an XML element based upon the given QFontColor.

static QFontColor* casa::TBView::fontElem ( DOMElement *  elem) [static, private]

Creates a QFontColor based upon the given XML element.

Returns the last opened directory for this view.

Returns the list of table views in this view.

Equivalent to loadFromFile(defaultFile()).

static TBView* casa::TBView::loadFromFile ( String  file) [static]

Loads the view saved in the given file and returns it.

If the file is invalid or there are other problems, NULL is returned.

Equivalent to saveToFile(defaultFile()).

Saves this view in XML format to the given file.

void casa::TBView::setChooserHistoryLimit ( int  histLimit)

Sets the last opened directory for this view.


Member Data Documentation

int casa::TBView::histLimit [private]

File chooser history limit.

Definition at line 157 of file TBView.h.

Last opened directory.

Definition at line 154 of file TBView.h.

vector<TBTableView*> casa::TBView::views [private]

Table views.

Definition at line 160 of file TBView.h.


The documentation for this class was generated from the following file: