/usr/include/BALL/VIEW/DIALOGS/atomOverview.h is in libballview1.4-dev 1.4.3~beta1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | // -*- 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;
/** 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.
\ingroup ViewDialogs
*/
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_;
};
/** @name Constructors
*/
//@{
/** Default Constructor.
@param parent the parent widget
@param name
*/
AtomOverview(QWidget *parent = NULL, const char *name = "AtomOverview");
//@}
/** @name Destructors
*/
//@{
/** Destructor.
*/
virtual ~AtomOverview();
//@}
/** @name Accessors: inspectors and mutators
*/
//@{
///
void setParent(AtomContainer* ac);
///
void showOnlySelection(bool state) {only_selection_ = state;}
//@}
/** @name Protected slots
*/
//@{
protected slots:
/** Indicates the apply button was pressed.
Creates a new Representation with the Label and notifies the widgets.
@see GeometricCenterProcessor
@see RepresentationMessage
*/
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
|