2006-03-05 17:24:44 +00:00
|
|
|
/**
|
|
|
|
* \file QURLDialog.C
|
|
|
|
* 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);
|
|
|
|
|
2006-12-30 10:23:06 +00:00
|
|
|
Q_CONNECT_1(QPushButton, okPB, clicked, bool,
|
|
|
|
UrlView, form_, slotOK, void);
|
|
|
|
Q_CONNECT_1(QPushButton, closePB, clicked, bool,
|
|
|
|
UrlView, form_, slotClose, void);
|
|
|
|
|
|
|
|
Q_CONNECT_1(QLineEdit, urlED, textChanged, const QString&,
|
|
|
|
QURLDialog, this, changed_adaptor, void);
|
|
|
|
Q_CONNECT_1(QCheckBox, hyperlinkCB, clicked, bool,
|
|
|
|
QURLDialog, this, changed_adaptor, void);
|
|
|
|
Q_CONNECT_1(QLineEdit, nameED, textChanged, const QString&,
|
|
|
|
QURLDialog, this, changed_adaptor, void);
|
2006-03-05 17:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QURLDialog::~QURLDialog()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QURLDialog::show()
|
|
|
|
{
|
|
|
|
QDialog::show();
|
|
|
|
urlED->setFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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"
|