Loading...
Searching...
No Matches
displayProperties.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: displayProperties.h,v 1.43.16.1 2007/03/25 21:25:46 oliver Exp $
//
#ifndef BALL_VIEW_DIALOGS_DISPLAYPROPERTIES_H
#define BALL_VIEW_DIALOGS_DISPLAYPROPERTIES_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
# include <BALL/VIEW/KERNEL/modularWidget.h>
#endif
#ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
# include <BALL/VIEW/DATATYPE/colorRGBA.h>
#endif
#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
# include <BALL/VIEW/KERNEL/preferencesEntry.h>
#endif
#include <BALL/VIEW/UIC/ui_displayProperties.h>
namespace BALL
{
class Composite;
namespace VIEW
{
class Representation;
class ColoringSettingsDialog;
class ModelSettingsDialog;
class Preferences;
class ModelInformation;
class BALL_VIEW_EXPORT DisplayProperties
: public QDialog,
public Ui_DisplayPropertiesData,
public ModularWidget,
public PreferencesEntry
{
Q_OBJECT
public:
BALL_EMBEDDABLE(DisplayProperties,ModularWidget)
//@{
DisplayProperties(QWidget *parent = NULL, const char* name = "DisplayProperties");
DisplayProperties(const DisplayProperties& dp);
virtual ~DisplayProperties();
virtual void onNotify(Message *message);
virtual void initializeWidget(MainControl& main_control);
virtual void initializePreferencesTab(Preferences &preferences);
virtual void finalizePreferencesTab(Preferences &preferences);
void applyPreferences();
virtual void checkMenu(MainControl& main_control);
void createRepresentationMode();
void modifyRepresentationMode(Representation* rep);
bool getSettingsFromString(const String& data);
void createRepresentation(String data_string, const vector<const Composite*>& new_systems);
void enableCreationForNewMolecules(bool state)
{ create_representations_for_new_molecules_ = state;}
Representation* getRepresentation()
{ return rep_;}
/* Create the new representation for the selection in the MolecularControl or for a given List of Composites.
Called by onNotify() after receiving CompositeMessage::NEW_MOLECULE and by apply().
To insert a new type of model, this is the only method in DisplayProperties you have to
change (See also VIEW/KERNEL/common.h).
@param hidden set to true will prevent that the representations model is created right now
*/
virtual Representation* createRepresentation(const std::list<Composite*>& composites, bool hidden = false);
void setModelSettingsDialog(ModelSettingsDialog* dialog);
void setColoringSettingsDialog(ColoringSettingsDialog* dialog);
public Q_SLOTS:
void show();
void selectModel(int index);
void selectMode(int index);
void selectColoringMethod(int index);
void setSurfaceDrawingPrecision(float value);
void setDrawingPrecision(int value);
void setTransparency(int value);
void setCustomColor(const ColorRGBA& color);
virtual void apply();
void editSelectionColor(QColor color);
void coloringOptionsPressed();
void modelOptionsPressed();
void precisionBoxChanged(int index);
void transparencySliderChanged();
void precisionSliderChanged();
void coloringUpdatesChanged();
void modelUpdatesChanged();
protected:
//_ Set buttons and slider according to the values
void checkDrawingPrecision_();
//_
virtual void getAdvancedModelOptions_();
//_
virtual void getAdvancedColoringOptions_();
//_
virtual void applyModelSettings_(Representation& rep);
//_
virtual void applyColoringSettings_(Representation& rep);
protected:
void applyTo_(Representation* rep);
// --------------------------------------------------------------------------------
// attributs
// --------------------------------------------------------------------------------
ModelSettingsDialog* model_settings_;
ColoringSettingsDialog* coloring_settings_;
Preferences* preferences_;
// the menu entry id of the dialog
QAction* id_;
QPushButton* create_button_;
// used by GeometricControl to modify an existing representation
Representation* rep_;
ColorRGBA custom_color_;
bool advanced_options_modified_;
bool create_representations_for_new_molecules_;
bool changed_selection_color_;
const ModelInformation* model_information_;
};
} } // namespaces
#endif // BALL_VIEW_DIALOGS_DISPLAYPROPERTIES_H
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::Composite
Definition composite.h:74
BALL::String
Definition string.h:57
BALL::VIEW::ColorRGBA
Definition colorRGBA.h:32
BALL::VIEW::ColoringSettingsDialog
Definition coloringSettingsDialog.h:45
BALL::VIEW::DisplayProperties::advanced_options_modified_
bool advanced_options_modified_
Definition displayProperties.h:283
BALL::VIEW::DisplayProperties::setCustomColor
void setCustomColor(const ColorRGBA &color)
BALL::VIEW::DisplayProperties::checkMenu
virtual void checkMenu(MainControl &main_control)
BALL::VIEW::DisplayProperties::applyColoringSettings_
virtual void applyColoringSettings_(Representation &rep)
BALL::VIEW::DisplayProperties::getSettingsFromString
bool getSettingsFromString(const String &data)
Settings from String.
BALL::VIEW::DisplayProperties::editSelectionColor
void editSelectionColor(QColor color)
BALL::VIEW::DisplayProperties::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::DisplayProperties::id_
QAction * id_
Definition displayProperties.h:276
BALL::VIEW::DisplayProperties::coloring_settings_
ColoringSettingsDialog * coloring_settings_
Definition displayProperties.h:272
BALL::VIEW::DisplayProperties::modelOptionsPressed
void modelOptionsPressed()
BALL::VIEW::DisplayProperties::coloringOptionsPressed
void coloringOptionsPressed()
BALL::VIEW::DisplayProperties::finalizePreferencesTab
virtual void finalizePreferencesTab(Preferences &preferences)
Remove the ModelSettingsDialog and the ColoringSettingsDialog from the Preferences.
BALL::VIEW::DisplayProperties::createRepresentation
virtual Representation * createRepresentation(const std::list< Composite * > &composites, bool hidden=false)
BALL::VIEW::DisplayProperties::model_settings_
ModelSettingsDialog * model_settings_
Definition displayProperties.h:271
BALL::VIEW::DisplayProperties::preferences_
Preferences * preferences_
Definition displayProperties.h:273
BALL::VIEW::DisplayProperties::getAdvancedModelOptions_
virtual void getAdvancedModelOptions_()
BALL::VIEW::DisplayProperties::createRepresentation
void createRepresentation(String data_string, const vector< const Composite * > &new_systems)
BALL::VIEW::DisplayProperties::show
void show()
BALL::VIEW::DisplayProperties::getRepresentation
Representation * getRepresentation()
Get the Representation on which DisplayProperties is working on.
Definition displayProperties.h:146
BALL::VIEW::DisplayProperties::rep_
Representation * rep_
Definition displayProperties.h:280
BALL::VIEW::DisplayProperties::precisionBoxChanged
void precisionBoxChanged(int index)
BALL::VIEW::DisplayProperties::setTransparency
void setTransparency(int value)
BALL::VIEW::DisplayProperties::initializePreferencesTab
virtual void initializePreferencesTab(Preferences &preferences)
Insert the ModelSettingsDialog and the ColoringSettingsDialog into the Preferences.
BALL::VIEW::DisplayProperties::changed_selection_color_
bool changed_selection_color_
Definition displayProperties.h:285
BALL::VIEW::DisplayProperties::modifyRepresentationMode
void modifyRepresentationMode(Representation *rep)
Switch to the mode, that an existing Representation will be modified.
BALL::VIEW::DisplayProperties::transparencySliderChanged
void transparencySliderChanged()
BALL::VIEW::DisplayProperties::enableCreationForNewMolecules
void enableCreationForNewMolecules(bool state)
Set if Representations are automaticaly created for new Molecules.
Definition displayProperties.h:142
BALL::VIEW::DisplayProperties::setSurfaceDrawingPrecision
void setSurfaceDrawingPrecision(float value)
BALL::VIEW::DisplayProperties::selectMode
void selectMode(int index)
BALL::VIEW::DisplayProperties::createRepresentationMode
void createRepresentationMode()
Switch to the mode, that a new Representation will be created.
BALL::VIEW::DisplayProperties::modelUpdatesChanged
void modelUpdatesChanged()
BALL::VIEW::DisplayProperties::coloringUpdatesChanged
void coloringUpdatesChanged()
BALL::VIEW::DisplayProperties::custom_color_
ColorRGBA custom_color_
Definition displayProperties.h:282
BALL::VIEW::DisplayProperties::checkDrawingPrecision_
void checkDrawingPrecision_()
BALL::VIEW::DisplayProperties::create_representations_for_new_molecules_
bool create_representations_for_new_molecules_
Definition displayProperties.h:284
BALL::VIEW::DisplayProperties::applyPreferences
void applyPreferences()
BALL::VIEW::DisplayProperties::getAdvancedColoringOptions_
virtual void getAdvancedColoringOptions_()
BALL::VIEW::DisplayProperties::onNotify
virtual void onNotify(Message *message)
BALL::VIEW::DisplayProperties::model_information_
const ModelInformation * model_information_
Definition displayProperties.h:286
BALL::VIEW::DisplayProperties::applyModelSettings_
virtual void applyModelSettings_(Representation &rep)
BALL::VIEW::DisplayProperties::setDrawingPrecision
void setDrawingPrecision(int value)
BALL::VIEW::DisplayProperties::selectColoringMethod
void selectColoringMethod(int index)
BALL::VIEW::DisplayProperties::apply
virtual void apply()
BALL::VIEW::DisplayProperties::selectModel
void selectModel(int index)
BALL::VIEW::DisplayProperties::create_button_
QPushButton * create_button_
Definition displayProperties.h:277
BALL::VIEW::DisplayProperties::applyTo_
void applyTo_(Representation *rep)
BALL::VIEW::DisplayProperties::setModelSettingsDialog
void setModelSettingsDialog(ModelSettingsDialog *dialog)
BALL::VIEW::DisplayProperties::DisplayProperties
DisplayProperties(QWidget *parent=NULL, const char *name="DisplayProperties")
BALL::VIEW::DisplayProperties::precisionSliderChanged
void precisionSliderChanged()
BALL::VIEW::DisplayProperties::setColoringSettingsDialog
void setColoringSettingsDialog(ColoringSettingsDialog *dialog)
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::Message
Definition message.h:53
BALL::VIEW::ModelInformation
Definition modelInformation.h:27
BALL::VIEW::ModelSettingsDialog
Definition modelSettingsDialog.h:46
BALL::VIEW::ModularWidget::ModularWidget
ModularWidget(const char *name="<ModularWidget>")
BALL::VIEW::PreferencesEntry::PreferencesEntry
PreferencesEntry()
BALL::VIEW::Preferences
Definition preferences.h:43
BALL::VIEW::Representation
Definition representation.h:59
QDialog
QPushButton
QWidget
colorRGBA.h
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
modularWidget.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
preferencesEntry.h