]> git.lyx.org Git - features.git/commitdiff
TOC dialog is back
authorJohn Levon <levon@movementarian.org>
Sun, 20 Jan 2002 18:38:52 +0000 (18:38 +0000)
committerJohn Levon <levon@movementarian.org>
Sun, 20 Jan 2002 18:38:52 +0000 (18:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3426 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/Makefile.am
src/frontends/qt2/QToc.C
src/frontends/qt2/QToc.h
src/frontends/qt2/QTocDialog.C
src/frontends/qt2/QTocDialog.h
src/frontends/qt2/ui/QTocDialog.ui

index b6dfacae0620fcb8179a3b352873c0c359040e75..21410f224216bb6ceac77488450673906eabf2a8 100644 (file)
@@ -1,3 +1,13 @@
+2002-01-20  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Makefile.am:
+       * Dialogs.C:
+       * QToc.h:
+       * QToc.C:
+       * QTocDialog.h:
+       * QTocDialog.C:
+       * ui/QTocDialog.ui: resuscitate TOC dialog
 2002-01-20  John Levon  <moz@compsoc.man.ac.uk>
 
        * QCitation.h:
index 50baf9a9184419ee22e1302924b67903ecfa0d27..ba778ff4251dba34b342f52629e795198dc2988e 100644 (file)
@@ -33,6 +33,7 @@
 #include "QTabularCreateDialog.h"
 #include "QTexinfoDialog.h"
 #include "QThesaurusDialog.h"
+#include "QTocDialog.h"
 #include "QURLDialog.h"
 #include "QVCLogDialog.h"
 
@@ -57,6 +58,7 @@
 #include "QSpellchecker.h"
 #include "QTabularCreate.h"
 #include "QTexinfo.h"
+#include "QToc.h"
 #include "QThesaurus.h"
 #include "QURL.h"
 #include "QVCLog.h"
@@ -71,8 +73,6 @@
 #include "xforms/FormBrowser.h"
 #include "xforms/form_browser.h"
 #include "xforms/FormDocument.h"
-#include "xforms/FormERT.h"
-#include "xforms/form_ert.h"
 #include "xforms/FormFloat.h"
 #include "xforms/form_float.h"
 #include "xforms/FormMathsPanel.h"
@@ -80,8 +80,6 @@
 #include "xforms/FormPreferences.h"
 #include "xforms/FormShowFile.h"
 #include "xforms/FormTabular.h"
-#include "xforms/FormToc.h"
-#include "xforms/form_toc.h"
  
 #include "GUI.h"
 
@@ -113,14 +111,13 @@ Dialogs::Dialogs(LyXView * lv)
        add(new GUITabularCreate<QTabularCreate, Qt2BC>(*lv, *this));
        add(new GUITexinfo<QTexinfo, Qt2BC>(*lv, *this));
        add(new GUIThesaurus<QThesaurus, Qt2BC>(*lv, *this));
+       add(new GUIToc<QToc, Qt2BC>(*lv, *this));
        add(new GUIUrl<QURL, Qt2BC>(*lv, *this));
        add(new GUIVCLog<QVCLog, Qt2BC>(*lv, *this));
 
        // dialogs not yet converted
-       add(new GUIERT<FormERT, xformsBC>(*lv, *this));
        add(new GUIFloat<FormFloat, xformsBC>(*lv, *this));
        add(new GUIShowFile<FormShowFile, xformsBC>(*lv, *this));
-       add(new GUIToc<FormToc, xformsBC>(*lv, *this));
 
        // dialogs not yet MVCd
        add(new FormDocument(lv, this));
index a6f1ad4034ab9e8985c59d9993335db78a20c6a8..6921ab6bf7d1117144be25637c40d9277dfc3c44 100644 (file)
@@ -26,7 +26,6 @@ libqt2_la_LIBADD = \
        ../xforms/FormBase.lo \
        ../xforms/FormBaseDeprecated.lo \
        ../xforms/FormBrowser.lo \
-       ../xforms/FormERT.lo \
        ../xforms/FormFloat.lo \
        ../xforms/FormMathsBitmap.lo \
        ../xforms/FormMathsDeco.lo \
@@ -41,7 +40,6 @@ libqt2_la_LIBADD = \
        ../xforms/FormTabular.lo \
        ../xforms/FormDocument.lo \
        ../xforms/FormInset.lo \
-       ../xforms/FormToc.lo \
        ../xforms/MathsSymbols.lo \
        ../xforms/Menubar_pimpl.lo \
        ../xforms/RadioButtonGroup.lo \
@@ -49,11 +47,9 @@ libqt2_la_LIBADD = \
        ../xforms/bmtable.lo \
        ../xforms/form_browser.lo \
        ../xforms/form_document.lo \
-       ../xforms/form_ert.lo \
        ../xforms/form_float.lo \
        ../xforms/form_preferences.lo \
        ../xforms/form_tabular.lo \
-       ../xforms/form_toc.lo \
        ../xforms/form_maths_deco.lo \
        ../xforms/form_maths_delim.lo \
        ../xforms/form_maths_matrix.lo \
index 4a3ac167d317a4ece93dc8930e66f80e5edeb917..84acd10baffe363a28900a2e7f528108d6ad2a34 100644 (file)
@@ -8,99 +8,87 @@
 
 #include <config.h>
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include <stack>
 
 #include <qslider.h>
+#include <qlistview.h>
+#include <qpushbutton.h>
+#include <qcombobox.h>
 #include "QTocDialog.h"
-#include "QtLyXView.h"
-
-#include "Dialogs.h"
-#include "BufferView.h" 
 #include "QToc.h"
+#include "Qt2BC.h" 
 #include "gettext.h"
-#include "buffer.h"
 #include "support/lstrings.h"
-#include "lyxfunc.h"
 #include "debug.h"
 
-#include <qlistview.h>
-#include <qcombobox.h>
-
+#include "QtLyXView.h"
 using std::vector;
-using std::pair;
-using std::stack;
-using std::endl;
-using SigC::slot;
-
-
-QToc::QToc(LyXView *v, Dialogs *d)
-       : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0),
-       /*toclist(0),*/ depth(1)
-{
-       d->showTOC.connect(slot(this, &QToc::showTOC));
-       d->createTOC.connect(slot(this, &QToc::createTOC));
-}
-
  
-QToc::~QToc()
-{
-       delete dialog_;
-}
-
-
-void QToc::showTOC(InsetCommand * const inset)
+typedef Qt2CB<ControlToc, Qt2DB<QTocDialog> > base_class;
+QToc::QToc(ControlToc & c)
+       : base_class(c, _("Table of contents"))
+{}
+void QToc::build_dialog()
 {
-       // FIXME: when could inset be 0 here ?
-       if (inset == 0)
-               return;
+       dialog_.reset(new QTocDialog(this));
 
-       inset_ = inset;
-       //FIXME ih_ = inset_->hide.connect(slot(this,&QToc::hide));
-       params = inset->params();
-       
-       show();
+        // Manage the cancel/close button
+       bc().setCancel(dialog_->closePB);
 }
 
 
-void QToc::createTOC(string const & arg)
+void QToc::updateType()
+{ 
+       dialog_->typeCO->clear();
+       vector<string> const & choice = controller().getTypes();
+       string const & type = toc::getType(controller().params().getCmdName());
+
+       for (vector<string>::const_iterator it = choice.begin();
+               it != choice.end(); ++it) {
+               dialog_->typeCO->insertItem(it->c_str());
+               if (*it == type) {
+                       dialog_->typeCO->setCurrentItem(it - choice.begin());
+                       dialog_->setCaption(type.c_str());
+               }
+       }
+} 
+void QToc::update_contents()
 {
-       if (inset_)
-               close();
-
-       params.setFromString(arg);
-       show();
+       updateType();
+       updateToc(depth_);
 }
 
-
 void QToc::updateToc(int newdepth)
 {
-       if (!lv_->view()->available()) {
-               //toclist.clear();
-               dialog_->tocLV->clear();
-               return;
-       }
-
-#if 0 
-       vector< vector<Buffer::TocItem> > tmp =
-               lv_->view()->buffer()->getTocList();
-
+       string const type = dialog_->typeCO->currentText().latin1();
+       Buffer::SingleList const & contents = controller().getContents(type);
        // Check if all elements are the same.
-       if (newdepth==depth && toclist.size() == tmp[type].size()) {
-               unsigned int i = 0;
-               for (; i < toclist.size(); ++i) {
-                       if (toclist[i] !=  tmp[type][i])
-                               break;
-               }
-               if (i >= toclist.size())
-                       return;
+       if (newdepth == depth_ && toclist == contents) {
+               return;
        }
 
-       depth=newdepth;
+       dialog_->tocLV->clear();
+       depth_ = newdepth;
 
-       toclist = tmp[type];
+       toclist = contents;
 
-       dialog_->tocLV->clear();
-       if (toclist.empty()) 
+       if (toclist.empty())
                return;
 
        dialog_->tocLV->setUpdatesEnabled(false);
@@ -115,7 +103,7 @@ void QToc::updateToc(int newdepth)
        // rather than QListViewItem; and the TOC can move in and out an arbitrary number
        // of levels
 
-       for (vector< Buffer::TocItem >::const_iterator iter = toclist.begin();
+       for (Buffer::SingleList::const_iterator iter = toclist.begin();
                iter != toclist.end(); ++iter) {
                if (iter->depth == curdepth) {
                        // insert it after the last one we processed
@@ -146,11 +134,12 @@ void QToc::updateToc(int newdepth)
                        else
                                item = (last) ? (new QListViewItem(parent,last)) : (new QListViewItem(parent));
                }
                lyxerr[Debug::GUI] << "Table of contents" << endl << "Added item " << iter->str.c_str()
                        << " at depth " << iter->depth << ", previous sibling \"" << (last ? last->text(0).latin1() : "0")
                        << "\", parent \"" << (parent ? parent->text(0).latin1() : "0") << "\"" << endl;
                item->setText(0,iter->str.c_str());
-               item->setOpen(iter->depth < depth);
+               item->setOpen(iter->depth < depth_);
                curdepth = iter->depth;
                last = item;
        }
@@ -160,123 +149,27 @@ void QToc::updateToc(int newdepth)
 }
 
 
-void QToc::setType(Buffer::TocType toctype)
-{
-       type = toctype;
-       switch (type) {
-               case Buffer::TOC_TOC:
-                       dialog_->setCaption(_("Table of Contents"));
-                       dialog_->tocLV->setColumnText(0,_("Table of Contents"));
-                       dialog_->depthSL->setEnabled(true);
-                       break;
-               case Buffer::TOC_LOF:
-                       dialog_->setCaption(_("List of Figures"));
-                       dialog_->tocLV->setColumnText(0,_("List of Figures"));
-                       dialog_->depthSL->setEnabled(false);
-                       break;
-               case Buffer::TOC_LOT:
-                       dialog_->setCaption(_("List of Tables"));
-                       dialog_->tocLV->setColumnText(0,_("List of Tables"));
-                       dialog_->depthSL->setEnabled(false);
-                       break;
-               case Buffer::TOC_LOA:
-                       dialog_->setCaption(_("List of Algorithms"));
-                       dialog_->tocLV->setColumnText(0,_("List of Algorithms"));
-                       dialog_->depthSL->setEnabled(false);
-                       break;
-       }
-}
-
-
-void QToc::set_depth(int newdepth)
-{
-       if (newdepth!=depth)
-               updateToc(newdepth);
-#endif 
-}
-
-
-void QToc::update()
-{
-#if 0 
-       if (params.getCmdName()=="tableofcontents") {
-               setType(Buffer::TOC_TOC);
-               dialog_->typeCO->setCurrentItem(0);
-       } else if (params.getCmdName()=="listoffigures") {
-               setType(Buffer::TOC_LOF);
-               dialog_->typeCO->setCurrentItem(1);
-       } else if (params.getCmdName()=="listoftables") {
-               setType(Buffer::TOC_LOT);
-               dialog_->typeCO->setCurrentItem(2);
-       } else {
-               setType(Buffer::TOC_LOA);
-               dialog_->typeCO->setCurrentItem(3);
-       }
-
-       updateToc(depth);
-}
-
-
-void QToc::select(const char *text)
+void QToc::select(string const & text)
 {
-       if (!lv_->view()->available())
-               return;
-
-       vector <Buffer::TocItem>::const_iterator iter = toclist.begin();
+       Buffer::SingleList::const_iterator iter = toclist.begin();
        for (; iter != toclist.end(); ++iter) {
-               if (iter->str==text)
+               if (iter->str == text)
                        break;
        }
        
-       if (iter==toclist.end()) {
-               lyxerr[Debug::GUI] << "Couldn't find highlighted TOC entry : " << text << endl;
+       if (iter == toclist.end()) {
+               lyxerr[Debug::GUI] << "Couldn't find highlighted TOC entry : " 
+                       << text << endl;
                return;
        }
 
-       lv_->getLyXFunc()->Dispatch(LFUN_GOTO_PARAGRAPH, tostr(iter->par->id()).c_str());
-}
-
-
-void QToc::set_type(Buffer::TocType toctype)
-{
-       if (toctype==type)
-               return;
-
-       setType(toctype);
-       updateToc(depth);
-#endif 
-}
-
-
-void QToc::show()
-{
-       if (!dialog_)
-               dialog_ = new QTocDialog(this, 0, _("LyX: Table of Contents"), false);
-
-       if (!dialog_->isVisible()) {
-               h_ = d_->hideBufferDependent.connect(slot(this, &QToc::hide));
-               //u_ = d_->updateBufferDependent.connect(slot(this, &QToc::update));
-       }
-
-       dialog_->raise();
-       dialog_->setActiveWindow();
-
-       update();
-       dialog_->show();
-}
-
-
-void QToc::close()
-{
-       h_.disconnect();
-       u_.disconnect();
-       ih_.disconnect();
-       inset_ = 0;
+       controller().Goto(iter->par->id());
 }
 
 
-void QToc::hide()
+void QToc::set_depth(int depth)
 {
-       dialog_->hide();
-       close();
+       if (depth != depth_)
+               updateToc(depth);
 }
index 62edfb5a0804bb81256d3a901d4136ac32a8cd79..dda236452fb573313e8e28d412d4d32c6e3ba117 100644 (file)
 #ifndef QTOC_H
 #define QTOC_H
 
-#include "DialogBase.h"
-#include "LString.h"
-#include "boost/utility.hpp"
-#include "insets/insetcommand.h"
-#include "buffer.h"
+#ifdef __GNUG__
+#pragma interface
+#endif
 
-class Dialogs;
+#include "Qt2Base.h"
+
+#include "ControlToc.h"
+class ControlToc;
 class QTocDialog;
 
-class QToc : public DialogBase {
+class QToc : 
+       public Qt2CB<ControlToc, Qt2DB<QTocDialog> > 
+{
 public:
-       QToc(LyXView *, Dialogs *);
-       ~QToc();
-
-       // Build the dialog
-       virtual void build();
-       /// Update the dialog before showing it.
-       virtual void update();
-       /// close the connections
-       virtual void close();
+       QToc(ControlToc &);
 
+       friend class QTocDialog;
 private:
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
-
-       /// create a Toc inset
-       void createTOC(string const &);
-       /// view a Toc inset
-       void showTOC(InsetCommand * const);
-       
-       /// update the Toc
-       void updateToc(int);
-
-       /// Real GUI implementation.
-       QTocDialog * dialog_;
-
-       /// the LyXView we belong to
-       LyXView * lv_;
-
-       /** Which Dialogs do we belong to?
-           Used so we can get at the signals we have to connect to.
-       */
-       Dialogs * d_;
-       /// pointer to the inset if any
-       InsetCommand * inset_;
-       /// insets params
-       InsetCommandParams params;
-       
-       /// Hide connection.
-       SigC::Connection h_;
-       /// Update connection.
-       SigC::Connection u_;
-       /// Inset hide connection.
-       SigC::Connection ih_;
+       /// update the listview
+       void updateToc(int newdepth);
+
+       /// update the float types
+       void updateType();
+
+       /// select an entry
+       void select(string const & text);
+       /// set the depth
+       void set_depth(int depth);
+       virtual void apply() {};
+       /// update dialog 
+       virtual void update_contents();
+
+       /// build dialog
+       virtual void build_dialog();
 
        /// the toc list
-       //std::vector <Buffer::TocItem> toclist;
+       Buffer::SingleList toclist;
 
        /// depth of list shown
-       int depth;
+       int depth_;
 };
 
 #endif // QTOC_H
index f434c95135bf5c16954cfc5ee7c34b6a5ea6e322..a2a4e73a763fe19523ebe29a264d479a6c73ac85 100644 (file)
@@ -7,17 +7,19 @@
  */
 
 #include <config.h>
-#include <debug.h>
 #include "QTocDialog.h"
 #include "Dialogs.h"
 #include "QToc.h"
 
 #include <qlistview.h>
+#include <qpushbutton.h>
 
-QTocDialog::QTocDialog(QToc * form, QWidget * parent, const char * name, bool modal, WFlags fl)
-       : QTocDialogBase(parent, name, modal, fl),
+QTocDialog::QTocDialog(QToc * form)
+       : QTocDialogBase(0, 0, false, 0),
        form_(form)
 {
+       connect(closePB, SIGNAL(clicked()),
+               form, SLOT(slotClose()));
 }
  
 
@@ -26,43 +28,21 @@ QTocDialog::~QTocDialog()
 }
  
 
-void QTocDialog::activate_adaptor(int index)
+void QTocDialog::activate_adaptor(int)
 {
-       switch (index) {
-       case 0:
-               //form_->set_type(Buffer::TOC_TOC);
-               break;
-       case 1:
-               //form_->set_type(Buffer::TOC_LOF);
-               break;
-       case 2:
-               //form_->set_type(Buffer::TOC_LOT);
-               break;
-       case 3:
-               //form_->set_type(Buffer::TOC_LOA);
-               break;
-       default:
-               lyxerr[Debug::GUI] << "Unknown TOC combo selection." << std::endl;
-               break;
-       }
+       form_->updateToc(form_->depth_);
 }
  
-void QTocDialog::close_adaptor()
-{
-       form_->close();
-       hide();
-}
-
-
-void QTocDialog::depth_adaptor(int /*depth*/)
+void QTocDialog::depth_adaptor(int depth)
 {
-       //form_->set_depth(depth);
+       form_->set_depth(depth);
 }
 
 
-void QTocDialog::select_adaptor(QListViewItem * /*item*/)
+void QTocDialog::select_adaptor(QListViewItem * item)
 {
-       //form_->select(item->text(0));
+       form_->select(item->text(0).latin1());
 }
 
 
@@ -74,6 +54,6 @@ void QTocDialog::update_adaptor()
  
 void QTocDialog::closeEvent(QCloseEvent * e)
 {
-       form_->close();
+       form_->slotWMHide();
        e->accept();
 }
index b01da871a9b796fa79da88d90a5dc0983a623693..f678e81c1cc079313a602c78bb95ff90a40f387f 100644 (file)
@@ -17,12 +17,11 @@ class QTocDialog : public QTocDialogBase
 { Q_OBJECT
 
 public:
-       QTocDialog(QToc * form, QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0);
+       QTocDialog(QToc * form);
        ~QTocDialog();
 
 public slots:
        void activate_adaptor(int);
-       void close_adaptor();
        void depth_adaptor(int);
        void select_adaptor(QListViewItem *);
        void update_adaptor();
index 65c8a4d4631e8cc13f6177357f13dc7c66de3746..4b921d63718dee5e1b5a1a9314a5d90a93c64021 100644 (file)
@@ -13,7 +13,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>369</width>
+            <width>361</width>
             <height>313</height>
         </rect>
     </property>
             <name>spacing</name>
             <number>6</number>
         </property>
+        <widget>
+            <class>QLayoutWidget</class>
+            <property stdset="1">
+                <name>name</name>
+                <cstring>Layout3</cstring>
+            </property>
+            <hbox>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>0</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <widget>
+                    <class>QLabel</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>typeLA</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Type</string>
+                    </property>
+                    <property>
+                        <name>buddy</name>
+                        <cstring>typeCO</cstring>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QComboBox</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>typeCO</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>sizePolicy</name>
+                        <sizepolicy>
+                            <hsizetype>3</hsizetype>
+                            <vsizetype>0</vsizetype>
+                        </sizepolicy>
+                    </property>
+                </widget>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer3</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>orientation</name>
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+            </hbox>
+        </widget>
         <widget>
             <class>QListView</class>
             <column>
                 <property>
                     <name>text</name>
-                    <string>Table Of Contents</string>
+                    <string>Contents list</string>
                 </property>
                 <property>
                     <name>clickable</name>
                 <name>name</name>
                 <cstring>depthSL</cstring>
             </property>
-            <property stdset="1">
-                <name>orientation</name>
-                <enum>Horizontal</enum>
-            </property>
             <property stdset="1">
                 <name>maxValue</name>
                 <number>5</number>
                 <name>pageStep</name>
                 <number>1</number>
             </property>
+            <property stdset="1">
+                <name>orientation</name>
+                <enum>Horizontal</enum>
+            </property>
         </widget>
         <widget>
             <class>QLayoutWidget</class>
             <property stdset="1">
                 <name>name</name>
-                <cstring>Layout39</cstring>
+                <cstring>Layout2</cstring>
             </property>
             <hbox>
                 <property stdset="1">
                     <name>spacing</name>
                     <number>6</number>
                 </property>
+                <widget>
+                    <class>QPushButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>updatePB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Update</string>
+                    </property>
+                </widget>
                 <spacer>
                     <property>
                         <name>name</name>
-                        <cstring>Spacer11</cstring>
+                        <cstring>Spacer2</cstring>
                     </property>
                     <property stdset="1">
                         <name>orientation</name>
                         </size>
                     </property>
                 </spacer>
-                <widget>
-                    <class>QLabel</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>typeLA</cstring>
-                    </property>
-                    <property stdset="1">
-                        <name>text</name>
-                        <string>&amp;Type</string>
-                    </property>
-                    <property>
-                        <name>buddy</name>
-                        <cstring>typeCO</cstring>
-                    </property>
-                </widget>
-                <widget>
-                    <class>QComboBox</class>
-                    <item>
-                        <property>
-                            <name>text</name>
-                            <string>Table of Contents</string>
-                        </property>
-                    </item>
-                    <item>
-                        <property>
-                            <name>text</name>
-                            <string>List of Figures</string>
-                        </property>
-                    </item>
-                    <item>
-                        <property>
-                            <name>text</name>
-                            <string>List of Tables</string>
-                        </property>
-                    </item>
-                    <item>
-                        <property>
-                            <name>text</name>
-                            <string>List of Algorithms</string>
-                        </property>
-                    </item>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>typeCO</cstring>
-                    </property>
-                </widget>
-                <widget>
-                    <class>QPushButton</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>updatePB</cstring>
-                    </property>
-                    <property stdset="1">
-                        <name>text</name>
-                        <string>&amp;Update</string>
-                    </property>
-                </widget>
                 <widget>
                     <class>QPushButton</class>
                     <property stdset="1">
         <receiver>QTocDialogBase</receiver>
         <slot>update_adaptor()</slot>
     </connection>
-    <connection>
-        <sender>closePB</sender>
-        <signal>clicked()</signal>
-        <receiver>QTocDialogBase</receiver>
-        <slot>close_adaptor()</slot>
-    </connection>
     <connection>
         <sender>depthSL</sender>
         <signal>valueChanged(int)</signal>