BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Protected Slots | Protected Member Functions | Protected Attributes | List of all members
BALL::VIEW::LabelDialog Class Reference

#include <BALL/VIEW/DIALOGS/labelDialog.h>

Inheritance diagram for BALL::VIEW::LabelDialog:
QDialog BALL::VIEW::ModularWidget BALL::Embeddable BALL::VIEW::ConnectionObject

Public Slots

Public slots
void show ()
 

Public Member Functions

Constructors
 LabelDialog (QWidget *parent=NULL, const char *name="LabelDialog")
 
Destructors
virtual ~LabelDialog ()
 
Accessors: inspectors and mutators
virtual void onNotify (Message *message)
 
virtual void fetchPreferences (INIFile &inifile)
 
virtual void writePreferences (INIFile &inifile)
 
virtual void initializeWidget (MainControl &main_control)
 
- Public Member Functions inherited from BALL::VIEW::ModularWidget
void setWorkingDirFromFilename_ (String filename)
 
virtual void showHelp (const String &url)
 
 ModularWidget (const char *name="<ModularWidget>")
 
 ModularWidget (const ModularWidget &widget)
 
virtual ~ModularWidget ()
 
virtual void destroy ()
 
virtual void clear ()
 
virtual void checkMenu (MainControl &main_control)
 
QAction * insertMenuEntry (Position parent_id, const String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence())
 
void setMenuHint (const String &hint)
 
void setMenuHelp (const String &url)
 
virtual void registerForHelpSystem (const QObject *object, const String &url)
 
virtual void addToolBarEntries (QToolBar *main_tb)
 
void setIcon (const String &filename, bool add_to_main_toolbar=true)
 
virtual void initializePreferencesTab (Preferences &preferences)
 
virtual void finalizePreferencesTab (Preferences &preferences)
 
virtual void applyPreferences ()
 
bool lockComposites ()
 
bool unlockComposites ()
 Unlock the Composites. More...
 
MainControlgetMainControl () const
 
virtual void setStatusbarText (const String &text, bool important=false)
 
virtual void setStatusbarText (const QString &text, bool important=false)
  More...
 
String getWorkingDir ()
 Implemented for convenience. More...
 
void setWorkingDir (const String &dir)
 Implemented for convenience. More...
 
FragmentDBgetFragmentDB () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
virtual void finalizeWidget (MainControl &main_control)
 
virtual bool canHandle (const String &) const
 
virtual bool openFile (const String &)
 
- Public Member Functions inherited from BALL::Embeddable
 Embeddable (const String &identifier="<Embeddable>")
 
 Embeddable (const Embeddable &embeddable)
 
virtual ~Embeddable ()
 
void setIdentifier (const String &identifier)
 
const StringgetIdentifier () const
 
void unregisterThis ()
 
virtual void registerThis ()
 
- Public Member Functions inherited from BALL::VIEW::ConnectionObject
 ConnectionObject ()
 
virtual ~ConnectionObject ()
 
void registerConnectionObject (ConnectionObject &object)
 
void unregisterConnectionObject (ConnectionObject &object)
 
bool isConnectionObjectRegistered (const ConnectionObject &object)
 
ConnectionObjectgetParent () const
 
ConnectionObjectgetRoot ()
 
virtual bool isValid () const
 

Protected Slots

virtual void checkMenu (MainControl &main_control)
 Overloaded from ModularWidget. More...
 
Protected slots
virtual void accept ()
 
virtual void editColor ()
 
virtual void addTag ()
 
virtual void fontSelected ()
 
virtual void modeChanged ()
 
void textChanged ()
 

Protected Member Functions

RepresentationcreateOneLabel_ ()
 
RepresentationcreateMultipleLabels_ ()
 

Protected Attributes

QAction * id_
 
ColorRGBA custom_color_
 
QFont font_
 
- Protected Attributes inherited from BALL::VIEW::ModularWidget
QAction * window_menu_entry_
 
bool show_window_enty_
 
bool default_visible_
 
QAction * last_action_
 
QList< QAction * > main_toolbar_actions_
 

Additional Inherited Members

- Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > EmbeddableVector
 
- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer)
 
- Static Protected Member Functions inherited from BALL::Embeddable
static void registerInstance_ (const std::type_info &type, const Embeddable *instance)
 
static void unregisterInstance_ (const Embeddable *instance)
 
static Size countInstances_ (const std::type_info &type)
 
static EmbeddablegetInstance_ (const std::type_info &type, Position index)
 
static EmbeddablegetInstance_ (const std::type_info &type, const String &identifier)
 

Detailed Description

Dialog for creating labels for a selection of molecular objects. The class MolecularControl is responsible for creating such a selection. The text, color and font of the labels can be changed. If this dialog is used, it should be created with MainControl as parent.

Definition at line 38 of file labelDialog.h.

Constructor & Destructor Documentation

BALL::VIEW::LabelDialog::LabelDialog ( QWidget parent = NULL,
const char *  name = "LabelDialog" 
)

Default Constructor. Calls registerWidget .

Parameters
parentthe parent widget
name
See Also
QDialog
ModularWidget
virtual BALL::VIEW::LabelDialog::~LabelDialog ( )
virtual

Destructor.

Member Function Documentation

virtual void BALL::VIEW::LabelDialog::accept ( )
protectedvirtualslot

Indicates the apply button was pressed. Creates a new Representation with the Label and notifies the widgets.

See Also
GeometricCenterProcessor
RepresentationMessage
virtual void BALL::VIEW::LabelDialog::addTag ( )
protectedvirtualslot
virtual void BALL::VIEW::LabelDialog::checkMenu ( MainControl main_control)
protectedvirtualslot

Overloaded from ModularWidget.

Representation* BALL::VIEW::LabelDialog::createMultipleLabels_ ( )
protected
Representation* BALL::VIEW::LabelDialog::createOneLabel_ ( )
protected
virtual void BALL::VIEW::LabelDialog::editColor ( )
protectedvirtualslot

Opens the dialog to select the color for the label text. See documentation of QT-library for information concerning QColorDialog widgets.

virtual void BALL::VIEW::LabelDialog::fetchPreferences ( INIFile inifile)
virtual

ModularWidget methodsFetches the preferences (the position and the selected color of {*this} labelDialog) from the INIFile.

See Also
writePreferences

Reimplemented from BALL::VIEW::ModularWidget.

virtual void BALL::VIEW::LabelDialog::fontSelected ( )
protectedvirtualslot
virtual void BALL::VIEW::LabelDialog::initializeWidget ( MainControl main_control)
virtual

Initializes the popup menu Display with its checkable submenu Add Label ; This method is called automatically immediately before the main application is started.

Parameters
main_controlthe MainControl object to be initialized
See Also
openDialog
finalizeWidget
insertMenuEntry

Reimplemented from BALL::VIEW::ModularWidget.

virtual void BALL::VIEW::LabelDialog::modeChanged ( )
protectedvirtualslot
virtual void BALL::VIEW::LabelDialog::onNotify ( Message message)
virtual

Message handling method. Catches only ControlSelectionMessage from MolecularControl. If such a message is catched the apply button will be enabled and labels can be appended onto the selection.

Parameters
messagethe pointer to the message that should be processed

Reimplemented from BALL::VIEW::ConnectionObject.

void BALL::VIEW::LabelDialog::show ( )
slot

Show and raise the dialog

void BALL::VIEW::LabelDialog::textChanged ( )
protectedslot
virtual void BALL::VIEW::LabelDialog::writePreferences ( INIFile inifile)
virtual

Writes the preferences (the position and the selected color) to the INIFile. This method will be called inside the method MainControl::aboutToExit

See Also
fetchPreferences

Reimplemented from BALL::VIEW::ModularWidget.

Member Data Documentation

ColorRGBA BALL::VIEW::LabelDialog::custom_color_
protected

Definition at line 166 of file labelDialog.h.

QFont BALL::VIEW::LabelDialog::font_
protected

Definition at line 167 of file labelDialog.h.

QAction* BALL::VIEW::LabelDialog::id_
protected

Definition at line 164 of file labelDialog.h.