treescreen_old.h

Go to the documentation of this file.
00001 #ifndef _TREESCREEN_H_
00002 #define _TREESCREEN_H_
00003 
00004 #include <QtGlobal>
00005 #include <QWidget>
00006 #include <QListView>
00007 #include <QToolButton>
00008 #include <QHBoxLayout>
00009 #include <QVBoxLayout>
00010 #include <QTreeView>
00011 #include <QToolBar>
00012 #include <QInputDialog>
00013 
00014 #include "knowtreemodel.h"
00015 
00016 class treescreen : public QWidget
00017 {
00018  Q_OBJECT
00019 
00020 public:
00021  treescreen(QWidget *parent=0);
00022  virtual ~treescreen();
00023 
00024  knowtreemodel *kntrmodel;
00025 
00026  void save_knowtree(void);
00027  
00028  void update_selected_branch(void);
00029  
00030  QItemSelectionModel *get_selection_model(void);
00031 
00032  
00033 private slots:
00034  void expand_all_subbranch(void);
00035  void collapse_all_subbranch(void);
00036  void expand_or_collapse_recurse(QModelIndex index,bool mode);
00037  void ins_subbranch(void);
00038  void ins_branch(void);
00039  void edit_branch(void);
00040  void del_branch(void);
00041  
00042  // Действия при клике на ветку дерева
00043  void on_knowtree_clicked(const QModelIndex &index);
00044 
00045  
00046 private:
00047  QToolBar *tools_line;
00048 
00049  QTreeView  *knowtree;
00050 
00051  QVBoxLayout *treescreen_layout;
00052 
00053  QAction *action_expand_all_subbranch;
00054  QAction *action_collapse_all_subbranch;
00055  QAction *action_ins_branch;
00056  QAction *action_ins_subbranch;
00057  QAction *action_edit_branch;
00058  QAction *action_del_branch;
00059 
00060  void setup_ui(void);
00061  void setup_signals(void);
00062  void setup_actions(void);
00063  void assembly(void);
00064 
00065  void init_knowtree(void);
00066  
00067  void insert_new_branch(void);
00068  
00069  int get_first_selected_item_index(void);
00070  QModelIndex get_current_item_index(void);
00071 
00072 };
00073 
00074 
00075 #endif  // _TREESCREEN_H_
00076 

Generated on Mon Feb 2 00:25:34 2009 for mytetra by  doxygen 1.5.1