2006-03-05 17:24:44 +00:00
|
|
|
/**
|
2007-04-26 03:53:02 +00:00
|
|
|
* \file QURLDialog.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>
|
|
|
|
|
|
|
|
#include "QURLDialog.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 {
|
|
|
|
|
2006-06-28 12:09:25 +00:00
|
|
|
QURLDialog::QURLDialog(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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QURLDialog::changed_adaptor()
|
|
|
|
{
|
|
|
|
form_->changed();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QURLDialog::closeEvent(QCloseEvent * e)
|
|
|
|
{
|
|
|
|
form_->slotWMHide();
|
|
|
|
e->accept();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
2006-05-18 08:51:12 +00:00
|
|
|
|
|
|
|
#include "QURLDialog_moc.cpp"
|