GlobalSearch::AbstractTab Class Reference

The base class for UI tabs, preconfigured to work with dialogs derived from AbstractDialog. More...

#include <globalsearch/ui/abstracttab.h>

Inheritance diagram for GlobalSearch::AbstractTab:
GlobalSearch::AbstractEditTab GlobalSearch::DefaultEditTab

List of all members.

Public Slots

virtual void lockGUI ()
virtual void readSettings (const QString &filename="")
virtual void writeSettings (const QString &filename="")
virtual void updateGUI ()
virtual void disconnectGUI ()

Signals

void moleculeChanged (GlobalSearch::Structure *)
void startingBackgroundProcessing ()
void finishedBackgroundProcessing ()
void initialized ()

Public Member Functions

 AbstractTab (AbstractDialog *parent, OptBase *p)
virtual ~AbstractTab ()
QWidget * getTabWidget ()

Protected Slots

virtual void initialize ()
void setBusyCursor ()
void clearBusyCursor ()

Protected Attributes

QWidget * m_tab_widget
 The actual widget that will be made into a tab.
AbstractDialogm_dialog
 A pointer to the parent dialog.
OptBasem_opt
 A pointer to the associated OptBase class.
bool m_isInitialized
 Set to true once initialized() completes.

Detailed Description

The base class for UI tabs, preconfigured to work with dialogs derived from AbstractDialog.

Author:
David C. Lonie

Definition at line 35 of file abstracttab.h.


Constructor & Destructor Documentation

GlobalSearch::AbstractTab::AbstractTab ( AbstractDialog parent,
OptBase p 
) [explicit]

Constructor

Minimum constructor for derived tab:

  DerivedTab::DerivedTab(AbstractDialog *parent,
                         OptBase *p) :
    AbstractTab(parent, p)
  {
  ui.setupUi(m_tab_widget);

  initialize();
  }

Definition at line 28 of file abstracttab.cpp.

References m_tab_widget.

GlobalSearch::AbstractTab::~AbstractTab (  )  [virtual]

Destructor

Definition at line 72 of file abstracttab.cpp.


Member Function Documentation

void GlobalSearch::AbstractTab::clearBusyCursor (  )  [protected, slot]

Resets the application's busy cursor. This should not be called directly, instead emit finishedBackgroundProcessing(), which is safe to use from a background thread.

See also:
startingBackgroundProcessing()
finishedBackgroundProcessing()

Definition at line 84 of file abstracttab.cpp.

Referenced by initialize().

virtual void GlobalSearch::AbstractTab::disconnectGUI (  )  [inline, virtual, slot]

Used during benchmarking to disable any GUI update connections.

Definition at line 104 of file abstracttab.h.

Referenced by initialize().

void GlobalSearch::AbstractTab::finishedBackgroundProcessing (  )  [signal]

Emit this signal after user-requested processing has completed. This will reset the busy cursor in the application.

Referenced by initialize().

QWidget* GlobalSearch::AbstractTab::getTabWidget (  )  [inline]
Returns:
The widget for this tab.

Definition at line 66 of file abstracttab.h.

References m_tab_widget.

void GlobalSearch::AbstractTab::initialize (  )  [protected, virtual, slot]
void GlobalSearch::AbstractTab::initialized (  )  [signal]

Emitted when initialize completes

Referenced by initialize().

virtual void GlobalSearch::AbstractTab::lockGUI (  )  [inline, virtual, slot]

Disable portions of the GUI that shouldn't be modified after the search has started.

Reimplemented in GlobalSearch::AbstractEditTab.

Definition at line 73 of file abstracttab.h.

Referenced by initialize().

void GlobalSearch::AbstractTab::moleculeChanged ( GlobalSearch::Structure  )  [signal]

Emit to update the molecule displayed in the Avogadro GLWidget

Referenced by initialize().

virtual void GlobalSearch::AbstractTab::readSettings ( const QString &  filename = ""  )  [inline, virtual, slot]

Load any parameters that this tab is responible for here.

Note:
In most cases, this shouldn't be called directly, but rather call the same function in the parent dialog class.
Parameters:
filename If specified, read from given file. Otherwise read from system config file.

Definition at line 82 of file abstracttab.h.

Referenced by initialize(), and GlobalSearch::AbstractEditTab::loadScheme().

void GlobalSearch::AbstractTab::setBusyCursor (  )  [protected, slot]

Sets the application's busy cursor. This should not be called directly, instead emit startingBackgroundProcessing(), which is safe to use from a background thread.

See also:
startingBackgroundProcessing()
finishedBackgroundProcessing()

Definition at line 76 of file abstracttab.cpp.

Referenced by initialize().

void GlobalSearch::AbstractTab::startingBackgroundProcessing (  )  [signal]

Emit this signal before beginning user-requested processing. This will set the busy cursor in the application.

Referenced by initialize().

virtual void GlobalSearch::AbstractTab::updateGUI (  )  [inline, virtual, slot]

Set any GUI elements from information in internal data structures.

Reimplemented in GlobalSearch::AbstractEditTab.

Definition at line 99 of file abstracttab.h.

Referenced by initialize().

virtual void GlobalSearch::AbstractTab::writeSettings ( const QString &  filename = ""  )  [inline, virtual, slot]

Save any parameters that this tab is responible for here.

Note:
In most cases, this shouldn't be called directly, but rather call the same function in the parent dialog class.
Parameters:
filename If specified, write to given file. Otherwise write to system config file.

Definition at line 92 of file abstracttab.h.

Referenced by initialize(), and GlobalSearch::AbstractEditTab::saveScheme().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Enumerator
Generated on Mon Jul 16 14:40:05 2012 for GlobalSearch by  doxygen 1.6.3