2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiDelimiterDialog.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUIDELIMITERDIALOG_H
|
|
|
|
#define GUIDELIMITERDIALOG_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
#include "GuiDialogView.h"
|
2007-08-31 22:16:11 +00:00
|
|
|
#include "ControlMath.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_DelimiterUi.h"
|
2007-04-05 09:26:09 +00:00
|
|
|
|
2007-04-05 12:12:07 +00:00
|
|
|
class QListWidgetItem;
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-04-19 21:42:42 +00:00
|
|
|
class ControlMath;
|
2007-08-31 22:16:11 +00:00
|
|
|
class GuiDelimiter;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
class GuiDelimiterDialog : public QDialog, public Ui::DelimiterUi
|
|
|
|
{
|
2006-03-05 17:24:44 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2007-08-31 22:16:11 +00:00
|
|
|
GuiDelimiterDialog(GuiDelimiter * form, QWidget * parent);
|
2006-06-30 14:37:33 +00:00
|
|
|
public Q_SLOTS:
|
2007-04-05 12:12:07 +00:00
|
|
|
void on_leftLW_itemActivated(QListWidgetItem *);
|
2007-04-05 12:39:22 +00:00
|
|
|
void on_rightLW_itemActivated(QListWidgetItem *);
|
2007-04-05 12:12:07 +00:00
|
|
|
void on_leftLW_currentRowChanged(int);
|
|
|
|
void on_rightLW_currentRowChanged(int);
|
2006-08-16 14:22:47 +00:00
|
|
|
void on_matchCB_stateChanged(int);
|
2007-04-17 20:04:15 +00:00
|
|
|
void on_insertPB_clicked();
|
|
|
|
void on_sizeCO_activated(int);
|
2006-03-05 17:24:44 +00:00
|
|
|
private:
|
2007-04-12 16:49:01 +00:00
|
|
|
///
|
|
|
|
char_type doMatch(char_type const symbol) const;
|
2007-04-17 20:04:15 +00:00
|
|
|
///
|
|
|
|
void updateTeXCode(int size);
|
2006-03-05 17:24:44 +00:00
|
|
|
/// owning form
|
2007-08-31 22:16:11 +00:00
|
|
|
GuiDelimiter * form_;
|
2007-04-17 20:04:15 +00:00
|
|
|
/// TeX code that will be inserted.
|
|
|
|
QString tex_code_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
2007-04-19 21:42:42 +00:00
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
class GuiDelimiter : public GuiView<GuiDelimiterDialog>
|
|
|
|
{
|
2007-04-19 21:42:42 +00:00
|
|
|
public:
|
2007-08-31 05:53:55 +00:00
|
|
|
friend class GuiDelimiterDialog;
|
2007-08-31 22:16:11 +00:00
|
|
|
///
|
2007-09-03 05:59:32 +00:00
|
|
|
GuiDelimiter(GuiDialog &);
|
2007-08-31 22:16:11 +00:00
|
|
|
/// parent controller
|
|
|
|
ControlMath & controller()
|
|
|
|
{ return static_cast<ControlMath &>(this->getController()); }
|
|
|
|
/// parent controller
|
|
|
|
ControlMath const & controller() const
|
|
|
|
{ return static_cast<ControlMath const &>(this->getController()); }
|
2007-04-19 21:42:42 +00:00
|
|
|
private:
|
2007-09-03 20:28:26 +00:00
|
|
|
virtual void applyView() {}
|
2007-04-19 21:42:42 +00:00
|
|
|
virtual void update_contents() {}
|
|
|
|
/// Build the dialog.
|
|
|
|
virtual void build_dialog();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUIDELIMITERDIALOG_H
|