2006-03-05 17:24:44 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
|
* \file GuiGraphics.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 Herbert Vo<EFBFBD>
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
#ifndef GUIGRAPHICS_H
|
|
|
|
|
#define GUIGRAPHICS_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 "ui_GraphicsUi.h"
|
|
|
|
|
#include "ControlGraphics.h"
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
2007-02-13 18:27:46 +00:00
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
#include <vector>
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
class QString;
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
namespace frontend {
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
class GuiGraphics;
|
|
|
|
|
|
|
|
|
|
class GuiGraphicsDialog : public QDialog, public Ui::GraphicsUi
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
GuiGraphicsDialog(GuiGraphics * form);
|
|
|
|
|
virtual void setAutoText();
|
2007-09-03 20:28:26 +00:00
|
|
|
|
virtual void showView();
|
2007-08-31 22:16:11 +00:00
|
|
|
|
protected Q_SLOTS:
|
|
|
|
|
virtual void change_adaptor();
|
|
|
|
|
virtual void change_bb();
|
|
|
|
|
virtual void on_browsePB_clicked();
|
|
|
|
|
virtual void on_getPB_clicked();
|
|
|
|
|
virtual void on_editPB_clicked();
|
|
|
|
|
virtual void on_filename_textChanged(const QString &);
|
|
|
|
|
virtual void on_scaleCB_toggled(bool);
|
|
|
|
|
virtual void on_WidthCB_toggled(bool);
|
|
|
|
|
virtual void on_HeightCB_toggled(bool);
|
|
|
|
|
virtual void on_angle_textChanged(const QString &);
|
|
|
|
|
protected:
|
|
|
|
|
virtual void closeEvent(QCloseEvent * e);
|
|
|
|
|
private:
|
|
|
|
|
GuiGraphics * form_;
|
|
|
|
|
};
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
class GuiGraphics : public GuiView<GuiGraphicsDialog>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
///
|
2007-08-31 05:53:55 +00:00
|
|
|
|
friend class GuiGraphicsDialog;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
///
|
2007-09-03 05:59:32 +00:00
|
|
|
|
GuiGraphics(GuiDialog &);
|
2007-08-31 22:16:11 +00:00
|
|
|
|
/// parent controller
|
|
|
|
|
ControlGraphics & controller()
|
|
|
|
|
{ return static_cast<ControlGraphics &>(this->getController()); }
|
|
|
|
|
/// parent controller
|
|
|
|
|
ControlGraphics const & controller() const
|
|
|
|
|
{ return static_cast<ControlGraphics const &>(this->getController()); }
|
2006-03-05 17:24:44 +00:00
|
|
|
|
protected:
|
|
|
|
|
virtual bool isValid();
|
|
|
|
|
private:
|
|
|
|
|
/// Apply changes
|
2007-09-03 20:28:26 +00:00
|
|
|
|
virtual void applyView();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
/// update
|
|
|
|
|
virtual void update_contents();
|
|
|
|
|
/// build the dialog
|
|
|
|
|
virtual void build_dialog();
|
|
|
|
|
/// get bounding box from file
|
|
|
|
|
void getBB();
|
|
|
|
|
|
|
|
|
|
/// Store the LaTeX names for the rotation origins.
|
|
|
|
|
std::vector<std::string> origin_ltx;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
#endif // GUIGRAPHICS_H
|