2006-03-05 17:24:44 +00:00
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiURLDialog.cpp
|
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
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
#include "GuiURLDialog.h"
|
2006-06-28 12:09:25 +00:00
|
|
|
#include "UrlView.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QCloseEvent>
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
GuiURLDialog::GuiURLDialog(UrlView * form)
|
2006-03-05 17:24:44 +00:00
|
|
|
: form_(form)
|
|
|
|
{
|
|
|
|
setupUi(this);
|
|
|
|
|
2007-08-12 12:40:11 +00:00
|
|
|
connect(okPB, SIGNAL(clicked()), form_, SLOT(slotOK()));
|
|
|
|
connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose()));
|
|
|
|
connect(urlED, SIGNAL(textChanged(const QString &)),
|
|
|
|
this, SLOT(changed_adaptor()));
|
|
|
|
connect(hyperlinkCB, SIGNAL(clicked()),
|
|
|
|
this, SLOT(changed_adaptor()));
|
|
|
|
connect(nameED, SIGNAL(textChanged(const QString &)),
|
|
|
|
this, SLOT(changed_adaptor()));
|
2007-03-28 20:14:50 +00:00
|
|
|
|
|
|
|
setFocusProxy(urlED);
|
2006-03-05 17:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
void GuiURLDialog::changed_adaptor()
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
|
|
|
form_->changed();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
void GuiURLDialog::closeEvent(QCloseEvent * e)
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
|
|
|
form_->slotWMHide();
|
|
|
|
e->accept();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
2006-05-18 08:51:12 +00:00
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
#include "GuiURLDialog_moc.cpp"
|