2001-08-19 13:25:15 +00:00
|
|
|
/**
|
|
|
|
* \file QRef.h
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
2001-08-26 00:29:39 +00:00
|
|
|
* \author John Levon
|
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
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
#include <config.h>
|
|
|
|
#include <vector>
|
2001-03-23 06:31:30 +00:00
|
|
|
#include "LString.h"
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
#include "Qt2Base.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;
|
2001-03-23 06:31:30 +00:00
|
|
|
|
2001-08-26 00:29:39 +00:00
|
|
|
class QRef :
|
|
|
|
public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
|
|
|
|
{
|
|
|
|
friend class QRefDialog;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
|
|
|
public:
|
2001-08-26 00:29:39 +00:00
|
|
|
QRef(ControlRef & c);
|
2001-03-23 06:31:30 +00:00
|
|
|
|
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
|