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:30:02 +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() ) );
|
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"
|