2002-09-24 13:57:09 +00:00
|
|
|
// -*- C++ -*-
|
2001-08-19 13:25:15 +00:00
|
|
|
/**
|
|
|
|
* \file QRef.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-08-19 13:25:15 +00:00
|
|
|
*
|
2001-08-26 00:29:39 +00:00
|
|
|
* \author John Levon
|
2002-09-24 13:57:09 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-03-23 06:31:30 +00:00
|
|
|
*/
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#ifndef QREF_H
|
|
|
|
#define QREF_H
|
2001-03-23 06:31:30 +00:00
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
#include "QDialogView.h"
|
2002-09-24 13:57:09 +00:00
|
|
|
#include <vector>
|
|
|
|
#include "LString.h"
|
2001-03-23 06:31:30 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
class ControlRef;
|
2001-08-19 13:25:15 +00:00
|
|
|
class QRefDialog;
|
2002-08-12 14:28:43 +00:00
|
|
|
|
2001-03-23 06:31:30 +00:00
|
|
|
|
2002-10-20 01:48:28 +00:00
|
|
|
class QRef
|
2003-02-25 14:51:38 +00:00
|
|
|
: public QController<ControlRef, QView<QRefDialog> >
|
2001-08-26 00:29:39 +00:00
|
|
|
{
|
2002-10-20 01:48:28 +00:00
|
|
|
public:
|
2001-08-26 00:29:39 +00:00
|
|
|
friend class QRefDialog;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2003-02-25 14:51:38 +00:00
|
|
|
QRef(Dialog &);
|
2001-08-26 00:29:39 +00:00
|
|
|
private:
|
2002-03-21 21:21:28 +00:00
|
|
|
/// apply changes
|
|
|
|
virtual void apply();
|
2001-08-26 00:29:39 +00:00
|
|
|
/// build dialog
|
|
|
|
virtual void build_dialog();
|
2001-03-23 06:31:30 +00:00
|
|
|
/// update dialog
|
2001-08-26 00:29:39 +00:00
|
|
|
virtual void update_contents();
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
/// is name allowed for this ?
|
2001-08-26 00:29:39 +00:00
|
|
|
bool nameAllowed();
|
2001-03-23 06:31:30 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// is type allowed for this ?
|
|
|
|
bool typeAllowed();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// go to current reference
|
|
|
|
void gotoRef();
|
|
|
|
|
|
|
|
/// set go back button
|
|
|
|
void setGoBack();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// set goto ref button
|
|
|
|
void setGotoRef();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// re-enter references
|
|
|
|
void redoRefs();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// update references
|
|
|
|
void updateRefs();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// sort or not persistent state
|
2002-03-21 21:21:28 +00:00
|
|
|
bool sort_;
|
2001-03-23 06:31:30 +00:00
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
/// at a reference ?
|
2001-08-26 00:29:39 +00:00
|
|
|
bool at_ref_;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
/// the references
|
|
|
|
std::vector<string> refs_;
|
2001-03-23 06:31:30 +00:00
|
|
|
};
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#endif // QREF_H
|