00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERRESULTSDIALOG_H 00006 #define BALL_VIEW_DIALOGS_ASSIGNBONDORDERRESULTSDIALOG_H 00007 00008 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H 00009 # include <BALL/VIEW/KERNEL/modularWidget.h> 00010 #endif 00011 00012 #ifndef BALL_VIEW_WIDGETS_SDWIDGET_H 00013 # include <BALL/VIEW/WIDGETS/SDWidget.h> 00014 #endif 00015 00016 #ifndef BALL_STRUCTURE_ASSIGNBONDORDERPROCESSOR_H 00017 # include <BALL/STRUCTURE/assignBondOrderProcessor.h> 00018 #endif 00019 00020 #include <BALL/VIEW/UIC/ui_assignBondOrderResultsDialog.h> 00021 00022 #include <QtGui/QDialog> 00023 #include <map> 00024 00025 namespace BALL 00026 { 00027 namespace VIEW 00028 { 00031 class BALL_VIEW_EXPORT AssignBondOrderResultsDialog : 00032 public QDialog, 00033 public Ui_AssignBondOrderResultsDialogData, 00034 public ModularWidget 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 00040 BALL_EMBEDDABLE(AssignBondOrderResultsDialog, ModularWidget) 00041 00042 00043 AssignBondOrderResultsDialog(QWidget *parent = NULL, const char *name = "AssignBondOrderResultsDialog"); 00044 00046 virtual ~AssignBondOrderResultsDialog(); 00047 00049 virtual void initializeWidget(MainControl& main_control); 00050 00052 void setProcessor(AssignBondOrderProcessor* abop); 00053 00054 public slots: 00055 00057 void show(); 00058 00060 void addSolutionToStructures(); 00061 00063 void computeNextSolution(); 00064 00066 void switchView(QTreeWidgetItem* item, int column); 00067 00069 void createEntries(); 00070 00072 void clearEntries(); 00073 00075 void finished(); 00076 00077 protected: 00078 00079 SDWidget sdwidget_; 00080 00081 // systems, which have already been mapped to 2D 00082 std::map<QTreeWidgetItem*, System*> sd_systems_; 00083 00084 // system copies with applied solutions 00085 std::map<QTreeWidgetItem*, System*> solution_systems_; 00086 00087 // the solution number 00088 std::map<QTreeWidgetItem*, Position> solution_number_; 00089 00090 // the solution description 00091 std::map<QTreeWidgetItem*, String> descriptions_; 00092 00093 AssignBondOrderProcessor* bond_order_processor_; 00094 00095 QTreeWidgetItem * root_; 00096 00097 QTreeWidgetItem * activated_item_; 00098 }; 00099 } 00100 } 00101 #endif