Loading...
Searching...
No Matches
atomOverview.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_DIALOGS_ATOMOVERVIEW_H
#define BALL_VIEW_DIALOGS_ATOMOVERVIEW_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_CONCEPT_COMPOSITE_H
# include <BALL/CONCEPT/composite.h>
#endif
#include <BALL/VIEW/UIC/ui_atomOverview.h>
namespace BALL
{
class AtomContainer;
namespace VIEW
{
class MainControl;
class BALL_VIEW_EXPORT AtomOverview
: public QDialog,
public Ui_AtomOverviewData
{
Q_OBJECT
public:
class BALL_VIEW_EXPORT OverviewProcessor
: public UnaryProcessor<Composite>
{
public:
BALL_CREATE(OverviewProcessor)
OverviewProcessor();
OverviewProcessor(const OverviewProcessor& model_processor);
virtual ~OverviewProcessor();
Processor::Result operator() (Composite& composite);
void setTable(QTableWidget* widget) { table_ = widget;}
void showOnlySelection(bool state) {only_selection_ = state;}
protected:
QTableWidget* table_;
bool only_selection_;
};
class BALL_VIEW_EXPORT ApplyProcessor
: public UnaryProcessor<Composite>
{
public:
BALL_CREATE(ApplyProcessor)
ApplyProcessor();
ApplyProcessor(const ApplyProcessor& model_processor);
virtual ~ApplyProcessor();
Processor::Result operator() (Composite& composite);
void setTable(QTableWidget* widget) { table_ = widget; row_ = 0;}
void setMainControl(MainControl* main_control) {main_control_ = main_control;}
void showOnlySelection(bool state) {only_selection_ = state;}
protected:
QTableWidget* table_;
Position row_;
bool only_selection_;
MainControl* main_control_;
};
AtomOverview(QWidget *parent = NULL, const char *name = "AtomOverview");
virtual ~AtomOverview();
void setParent(AtomContainer* ac);
void showOnlySelection(bool state) {only_selection_ = state;}
protected Q_SLOTS:
virtual void accept();
void itemChanged(QTableWidgetItem* item);
void itemActivated(QTableWidgetItem* item);
protected:
void restoreItem_(QTableWidgetItem* item);
AtomContainer* parent_;
OverviewProcessor processor_;
ApplyProcessor apply_processor_;
String item_backup_;
bool ignore_;
bool only_selection_;
};
} } // namespaces
#endif // BALL_VIEW_DIALOGS_AtomOverview_H
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::AtomContainer
Definition atomContainer.h:32
BALL::Composite
Definition composite.h:74
BALL::Processor
Definition processor.h:32
BALL::Result
Definition result.h:22
BALL::String
Definition string.h:57
BALL::UnaryProcessor< Composite >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
BALL::VIEW::AtomOverview::ApplyProcessor
Definition atomOverview.h:75
BALL::VIEW::AtomOverview::ApplyProcessor::only_selection_
bool only_selection_
Definition atomOverview.h:105
BALL::VIEW::AtomOverview::ApplyProcessor::main_control_
MainControl * main_control_
Definition atomOverview.h:106
BALL::VIEW::AtomOverview::ApplyProcessor::setMainControl
void setMainControl(MainControl *main_control)
Definition atomOverview.h:96
BALL::VIEW::AtomOverview::ApplyProcessor::table_
QTableWidget * table_
Definition atomOverview.h:103
BALL::VIEW::AtomOverview::ApplyProcessor::setTable
void setTable(QTableWidget *widget)
Definition atomOverview.h:93
BALL::VIEW::AtomOverview::ApplyProcessor::ApplyProcessor
ApplyProcessor()
BALL::VIEW::AtomOverview::ApplyProcessor::showOnlySelection
void showOnlySelection(bool state)
Definition atomOverview.h:99
BALL::VIEW::AtomOverview::ApplyProcessor::row_
Position row_
Definition atomOverview.h:104
BALL::VIEW::AtomOverview::OverviewProcessor
Definition atomOverview.h:43
BALL::VIEW::AtomOverview::OverviewProcessor::OverviewProcessor
OverviewProcessor()
BALL::VIEW::AtomOverview::OverviewProcessor::showOnlySelection
void showOnlySelection(bool state)
Definition atomOverview.h:64
BALL::VIEW::AtomOverview::OverviewProcessor::only_selection_
bool only_selection_
Definition atomOverview.h:69
BALL::VIEW::AtomOverview::OverviewProcessor::table_
QTableWidget * table_
Definition atomOverview.h:68
BALL::VIEW::AtomOverview::OverviewProcessor::setTable
void setTable(QTableWidget *widget)
Definition atomOverview.h:61
BALL::VIEW::AtomOverview::ignore_
bool ignore_
Definition atomOverview.h:165
BALL::VIEW::AtomOverview::itemActivated
void itemActivated(QTableWidgetItem *item)
BALL::VIEW::AtomOverview::item_backup_
String item_backup_
Definition atomOverview.h:164
BALL::VIEW::AtomOverview::apply_processor_
ApplyProcessor apply_processor_
Definition atomOverview.h:163
BALL::VIEW::AtomOverview::processor_
OverviewProcessor processor_
Definition atomOverview.h:162
BALL::VIEW::AtomOverview::showOnlySelection
void showOnlySelection(bool state)
Definition atomOverview.h:138
BALL::VIEW::AtomOverview::restoreItem_
void restoreItem_(QTableWidgetItem *item)
BALL::VIEW::AtomOverview::setParent
void setParent(AtomContainer *ac)
BALL::VIEW::AtomOverview::only_selection_
bool only_selection_
Definition atomOverview.h:166
BALL::VIEW::AtomOverview::itemChanged
void itemChanged(QTableWidgetItem *item)
BALL::VIEW::AtomOverview::parent_
AtomContainer * parent_
Definition atomOverview.h:161
BALL::VIEW::AtomOverview::~AtomOverview
virtual ~AtomOverview()
BALL::VIEW::AtomOverview::accept
virtual void accept()
BALL::VIEW::AtomOverview::AtomOverview
AtomOverview(QWidget *parent=NULL, const char *name="AtomOverview")
BALL::VIEW::MainControl
Definition mainControl.h:118
QDialog
QTableWidget
QWidget
composite.h
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140