lyx_mirror/src/frontends/qt4/QTocDialog.h
Abdelrazak Younes 5a4d33d97e Add outlining functionality to the Qt4 TOC dialog.
The Toc dialog is not finished yet, there's some clean-up to do especially in select_adapdator which doesn't seem to work. This makes lyx crash when clicking on the Up, Down, In or Out buttons.

    * frontends/qt4/QTocDialog.[Ch]: add automatic slots

    * frontends/qt4/QTocDialog.[Ch]: add "enableButtons(bool)"

    * frontends/qt4/ui/QTocUi.ui: add pushbuttons

    * frontends/qt4/QToc.[Ch]: add move* methods.

The following Qt4 equivalent changes to revision r13521 are not done yet:
    * frontends/qt2/QToc.[Ch]: add move* method.
    (QToc::updateToc):
    (QToc::select): add code for TOC window positioning, and
    outlining methods



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13530 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-29 16:57:47 +00:00

72 lines
1.3 KiB
C++

// -*- C++ -*-
/**
* \file QTocDialog.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
* \author Abdelrazak Younes
*
* Full author contact details are available in file CREDITS.
*/
#ifndef QTOCDIALOG_H
#define QTOCDIALOG_H
#include "ui/QTocUi.h"
#include "controllers/ControlToc.h"
#include <QDialog>
#include <QCloseEvent>
class QTreeWidget;
class QTreeWidgetItem;
namespace lyx {
namespace frontend {
class QToc;
class QTocDialog : public QDialog, public Ui::QTocUi {
Q_OBJECT
public:
QTocDialog(QToc * form);
~QTocDialog();
/// update the listview
void updateToc(bool newdepth=false);
/// update the float types
void updateType();
public slots:
void activate_adaptor(int);
void depth_adaptor(int);
void select_adaptor(QTreeWidgetItem *);
void update_adaptor();
protected slots:
void on_moveUpPB_clicked();
void on_moveDownPB_clicked();
void on_moveInPB_clicked();
void on_moveOutPB_clicked();
protected:
void enableButtons(bool enable = true);
void closeEvent(QCloseEvent * e);
private:
void populateItem(QTreeWidgetItem * parentItem, toc::Toc::const_iterator& iter);
QToc * form_;
/// depth of list shown
int depth_;
};
} // namespace frontend
} // namespace lyx
#endif // QTOCDIALOG_H