2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiExternal.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.
|
|
|
|
*
|
2007-10-07 08:55:20 +00:00
|
|
|
* \author Asger Alstrup
|
2006-03-05 17:24:44 +00:00
|
|
|
* \author John Levon
|
2007-10-07 08:55:20 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUIEXTERNAL_H
|
|
|
|
#define GUIEXTERNAL_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_ExternalUi.h"
|
2007-04-25 08:42:22 +00:00
|
|
|
|
2007-10-07 08:55:20 +00:00
|
|
|
#include "insets/InsetExternal.h"
|
|
|
|
|
2008-04-18 19:17:11 +00:00
|
|
|
#include <QHash>
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-09 19:34:27 +00:00
|
|
|
class GuiExternal : public GuiDialog, public Ui::ExternalUi
|
2007-08-31 22:16:11 +00:00
|
|
|
{
|
2007-04-25 08:42:22 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
public:
|
2007-11-23 09:44:02 +00:00
|
|
|
GuiExternal(GuiView & lv);
|
2007-09-05 20:33:29 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void bbChanged();
|
|
|
|
void browseClicked();
|
|
|
|
void change_adaptor();
|
|
|
|
void editClicked();
|
2008-04-18 19:39:15 +00:00
|
|
|
void extraChanged(const QString &);
|
|
|
|
void formatChanged(const QString &);
|
2007-09-05 20:33:29 +00:00
|
|
|
void getbbClicked();
|
|
|
|
void sizeChanged();
|
|
|
|
void templateChanged();
|
|
|
|
void widthUnitChanged();
|
2007-04-25 08:42:22 +00:00
|
|
|
|
2008-04-18 19:52:16 +00:00
|
|
|
private:
|
2007-10-07 08:55:20 +00:00
|
|
|
///
|
2008-04-18 19:17:11 +00:00
|
|
|
typedef QHash<QString, QString> MapType;
|
2007-10-07 08:55:20 +00:00
|
|
|
|
2008-02-17 20:16:14 +00:00
|
|
|
///
|
2007-09-05 20:33:29 +00:00
|
|
|
bool activateAspectratio() const;
|
2006-03-05 17:24:44 +00:00
|
|
|
/// Apply changes
|
2007-09-05 20:33:29 +00:00
|
|
|
void applyView();
|
2006-03-05 17:24:44 +00:00
|
|
|
/// update
|
2007-09-11 18:33:42 +00:00
|
|
|
void updateContents();
|
2006-03-05 17:24:44 +00:00
|
|
|
/// Helper function called when the template is changed.
|
|
|
|
void updateTemplate();
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
///
|
2006-03-05 17:24:44 +00:00
|
|
|
MapType extra_;
|
2007-10-07 08:55:20 +00:00
|
|
|
///
|
|
|
|
bool initialiseParams(std::string const & data);
|
|
|
|
/// clean-up on hide.
|
|
|
|
void clearParams();
|
|
|
|
/// clean-up on hide.
|
|
|
|
void dispatchParams();
|
|
|
|
///
|
|
|
|
bool isBufferDependent() const { return true; }
|
|
|
|
|
|
|
|
///
|
|
|
|
void editExternal();
|
|
|
|
///
|
2008-03-06 00:07:19 +00:00
|
|
|
QString browse(QString const & input_file,
|
|
|
|
QString const & template_name) const;
|
2007-10-07 08:55:20 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
InsetExternalParams params_;
|
2008-04-18 19:39:15 +00:00
|
|
|
///
|
2007-10-07 08:55:20 +00:00
|
|
|
bool bbChanged_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUIEXTERNAL_H
|