COPASI API  4.16.103
Public Slots | Public Member Functions | Protected Attributes | List of all members
ObjectBrowserDialog Class Reference

#include <ObjectBrowserDialog.h>

Inheritance diagram for ObjectBrowserDialog:
Inheritance graph
[legend]
Collaboration diagram for ObjectBrowserDialog:
Collaboration graph
[legend]

Public Slots

void cancelClicked ()
 
void okClicked ()
 
void toggleViewClicked ()
 

Public Member Functions

 ObjectBrowserDialog (QWidget *parent=0, const char *name=0, bool modal=true, int state=0)
 
void selectObjects (std::vector< const CCopasiObject * > *pObjectVector)
 
void setOutputVector (std::vector< const CCopasiObject * > *pObjectVector)
 
virtual ~ObjectBrowserDialog ()
 

Protected Attributes

QPushButton * cancelButton
 
QPushButton * clearButton
 
QFrame * Line1
 
QGridLayout * ObjectBrowserDialogLayout
 
ObjectBrowserWidgetobjectBrowserWidget
 
QPushButton * okButton
 
QSpacerItem * spacer
 
QPushButton * toggleViewButton
 

Detailed Description

Definition at line 32 of file ObjectBrowserDialog.h.

Constructor & Destructor Documentation

ObjectBrowserDialog::ObjectBrowserDialog ( QWidget *  parent = 0,
const char *  name = 0,
bool  modal = true,
int  state = 0 
)

Definition at line 32 of file ObjectBrowserDialog.cpp.

References cancelButton, cancelClicked(), clearButton, Line1, ObjectBrowserDialogLayout, objectBrowserWidget, okButton, okClicked(), toggleViewButton, and toggleViewClicked().

33  : QDialog(parent),
34  clearButton(NULL),
35  toggleViewButton(NULL),
36  cancelButton(NULL),
37  okButton(NULL),
38  Line1(NULL),
39  spacer(NULL),
40  objectBrowserWidget(NULL),
42 {
43  setObjectName(QString::fromUtf8(name));
44  setModal(modal);
45  setAttribute(Qt::WA_DeleteOnClose);
46  ObjectBrowserDialogLayout = new QGridLayout(this);
47  ObjectBrowserDialogLayout->setMargin(11);
48  ObjectBrowserDialogLayout->setSpacing(6);
49  ObjectBrowserDialogLayout->setObjectName(QString::fromUtf8("ObjectBrowserDialogLayout"));
50 
52  ObjectBrowserDialogLayout->addWidget(objectBrowserWidget, 0, 0, 1, 2);
53 
54  Line1 = new QFrame(this);
55  Line1->setObjectName("Line1");
56  Line1->setFrameShape(QFrame::HLine);
57  Line1->setFrameShadow(QFrame::Sunken);
58  Line1->setFrameShape(QFrame::HLine);
59  ObjectBrowserDialogLayout->addWidget(Line1, 1, 0, 1, 2);
60 
61  if (state == 0)
62  {
63  clearButton = new QPushButton(this);
64  clearButton->setObjectName("clearButton");
65  clearButton->setText("Clear");
66 
67  toggleViewButton = new QPushButton(this);
68  toggleViewButton->setObjectName("toggleViewButton");
69  toggleViewButton->setText("Selected Items");
70 
71  cancelButton = new QPushButton(this);
72  cancelButton->setObjectName("cancelButton");
73  cancelButton->setText("Cancel");
74 
75  okButton = new QPushButton(this);
76  okButton->setObjectName("okButton");
77  okButton->setText("OK");
78  okButton->setDefault(true);
79  okButton->setAutoDefault(true);
80 
81  connect(clearButton, SIGNAL(clicked()), objectBrowserWidget, SLOT(clearClicked()));
82  connect(toggleViewButton, SIGNAL(clicked()), this, SLOT(toggleViewClicked()));
83  connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked()));
84  connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked()));
85 
86  ObjectBrowserDialogLayout->addWidget(clearButton, 2, 0);
88  ObjectBrowserDialogLayout->addWidget(cancelButton, 2, 2);
89  ObjectBrowserDialogLayout->addWidget(okButton, 2, 3);
90 
91  setTabOrder(okButton, clearButton);
92  setTabOrder(clearButton, toggleViewButton);
93  setTabOrder(toggleViewButton, cancelButton);
94  setTabOrder(cancelButton, objectBrowserWidget);
95  }
96  else
97  {
98  okButton = new QPushButton(this);
99  okButton->setObjectName("okButton");
100  okButton->setText("Close");
101  okButton->setDefault(true);
102  okButton->setAutoDefault(true);
103  ObjectBrowserDialogLayout->addWidget(okButton, 2, 1, 1, 1);
104 
105  connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked()));
106 
107  setTabOrder(okButton, objectBrowserWidget);
108  }
109 
110  if (!name)
111  setObjectName("ObjectBrowser");
112 
113  resize(420, 460);
114  setWindowTitle(trUtf8("Object Browser"));
115 }
QGridLayout * ObjectBrowserDialogLayout
ObjectBrowserWidget * objectBrowserWidget
QPushButton * cancelButton
QPushButton * toggleViewButton
ObjectBrowserDialog::~ObjectBrowserDialog ( )
virtual

Definition at line 117 of file ObjectBrowserDialog.cpp.

118 {}

Member Function Documentation

void ObjectBrowserDialog::cancelClicked ( )
slot

Definition at line 125 of file ObjectBrowserDialog.cpp.

Referenced by ObjectBrowserDialog().

126 {
127  close();
128 }
void ObjectBrowserDialog::okClicked ( )
slot

Definition at line 130 of file ObjectBrowserDialog.cpp.

References ObjectBrowserWidget::commitClicked(), and objectBrowserWidget.

Referenced by ObjectBrowserDialog().

131 {
133  done(QDialog::Accepted);
134 }
ObjectBrowserWidget * objectBrowserWidget
void ObjectBrowserDialog::selectObjects ( std::vector< const CCopasiObject * > *  pObjectVector)

Definition at line 146 of file ObjectBrowserDialog.cpp.

References objectBrowserWidget, and ObjectBrowserWidget::selectObjects().

147 {
149 }
ObjectBrowserWidget * objectBrowserWidget
void selectObjects(std::vector< const CCopasiObject * > *pObjectVector)
void ObjectBrowserDialog::setOutputVector ( std::vector< const CCopasiObject * > *  pObjectVector)

Definition at line 120 of file ObjectBrowserDialog.cpp.

References objectBrowserWidget, and ObjectBrowserWidget::setOutputVector().

121 {
123 }
ObjectBrowserWidget * objectBrowserWidget
void setOutputVector(std::vector< const CCopasiObject * > *pObjectVector)
void ObjectBrowserDialog::toggleViewClicked ( )
slot

Definition at line 136 of file ObjectBrowserDialog.cpp.

References objectBrowserWidget, toggleViewButton, and ObjectBrowserWidget::toggleViewClicked().

Referenced by ObjectBrowserDialog().

137 {
138  if (toggleViewButton->text() == "Selected Items")
139  toggleViewButton->setText("Tree View");
140  else
141  toggleViewButton->setText("Selected Items");
142 
144 }
ObjectBrowserWidget * objectBrowserWidget
virtual void toggleViewClicked()
QPushButton * toggleViewButton

Member Data Documentation

QPushButton* ObjectBrowserDialog::cancelButton
protected

Definition at line 46 of file ObjectBrowserDialog.h.

Referenced by ObjectBrowserDialog().

QPushButton* ObjectBrowserDialog::clearButton
protected

Definition at line 44 of file ObjectBrowserDialog.h.

Referenced by ObjectBrowserDialog().

QFrame* ObjectBrowserDialog::Line1
protected

Definition at line 48 of file ObjectBrowserDialog.h.

Referenced by ObjectBrowserDialog().

QGridLayout* ObjectBrowserDialog::ObjectBrowserDialogLayout
protected

Definition at line 51 of file ObjectBrowserDialog.h.

Referenced by ObjectBrowserDialog().

ObjectBrowserWidget* ObjectBrowserDialog::objectBrowserWidget
protected
QPushButton* ObjectBrowserDialog::okButton
protected

Definition at line 47 of file ObjectBrowserDialog.h.

Referenced by ObjectBrowserDialog().

QSpacerItem* ObjectBrowserDialog::spacer
protected

Definition at line 49 of file ObjectBrowserDialog.h.

QPushButton* ObjectBrowserDialog::toggleViewButton
protected

Definition at line 45 of file ObjectBrowserDialog.h.

Referenced by ObjectBrowserDialog(), and toggleViewClicked().


The documentation for this class was generated from the following files: