2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiIndex.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
|
|
|
|
* \author Kalle Dalheimer
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUIINDEX_H
|
|
|
|
#define GUIINDEX_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-08-31 22:16:11 +00:00
|
|
|
#include "ControlCommand.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_IndexUi.h"
|
2007-04-25 08:42:22 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class GuiIndexDialogBase : public GuiDialog, public Ui::IndexUi
|
|
|
|
{
|
2007-04-25 08:42:22 +00:00
|
|
|
Q_OBJECT
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2007-04-25 08:42:22 +00:00
|
|
|
public:
|
2007-09-05 20:33:29 +00:00
|
|
|
GuiIndexDialogBase(LyXView & lv, docstring const & title,
|
|
|
|
QString const & label);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void change_adaptor();
|
|
|
|
void reject();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
|
|
|
private:
|
2007-09-05 20:33:29 +00:00
|
|
|
///
|
|
|
|
void closeEvent(QCloseEvent * e);
|
|
|
|
/// parent controller
|
|
|
|
ControlCommand & controller() const;
|
|
|
|
///
|
|
|
|
bool isValid();
|
|
|
|
/// Apply changes
|
|
|
|
void applyView();
|
|
|
|
/// update
|
|
|
|
void update_contents();
|
|
|
|
|
|
|
|
///
|
|
|
|
QString label_;
|
2007-04-25 08:42:22 +00:00
|
|
|
};
|
|
|
|
|
2007-04-25 16:39:21 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class GuiIndexDialog : public GuiIndexDialogBase
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-09-05 20:33:29 +00:00
|
|
|
GuiIndexDialog(LyXView & lv)
|
|
|
|
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"))
|
|
|
|
{}
|
|
|
|
};
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class GuiLabelDialog : public GuiIndexDialogBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GuiLabelDialog(LyXView & lv)
|
|
|
|
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"))
|
|
|
|
{}
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUIINDEX_H
|