#include "GuiDialog.h"
#include "ui_RefUi.h"
-#include "FancyLineEdit.h"
#include "insets/InsetCommandParams.h"
namespace lyx {
namespace frontend {
+class FancyLineEdit;
+
class GuiRef : public GuiDialog, public Ui::RefUi
{
Q_OBJECT
GuiRef(GuiView & lv);
/// Dialog inherited methods
//@{
- void enableView(bool enable);
+ void enableView(bool enable) override;
//@}
private Q_SLOTS:
private:
///
- bool isBufferDependent() const { return true; }
+ bool isBufferDependent() const override { return true; }
/** disconnect from the inset when the Apply button is pressed.
Allows easy insertion of multiple references. */
- bool disconnectOnApply() const { return true; }
+ bool disconnectOnApply() const override { return true; }
///
void gotoRef(std::string const &);
///
void gotoBookmark();
///
- void closeEvent(QCloseEvent * e);
+ void closeEvent(QCloseEvent * e) override;
///
- bool isValid();
+ bool isValid() override;
/// apply changes
- void applyView();
+ void applyView() override;
/// update dialog
- void updateContents();
+ void updateContents() override;
///
void enableBoxes();
/// update references
void updateRefs();
///
- bool initialiseParams(std::string const & data);
+ bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
- void clearParams() { params_.clear(); }
+ void clearParams() override { params_.clear(); }
/// clean-up on hide.
- void dispatchParams();
+ void dispatchParams() override;
private:
///
int restored_buffer_;
/// store the last active buffer
int active_buffer_;
- /// the references
- std::vector<docstring> refs_;
+ /// the references as three strings: plain label name, label as gui
+ /// string, and pretty dereferenced name ("Lemma 3")
+ /// FIXME: might be a good idea to use a custom struct
+ std::vector<std::tuple<docstring, docstring, docstring>> refs_;
};
} // namespace frontend