2000-09-14 09:09:56 +00:00
|
|
|
/*
|
2000-10-17 08:27:35 +00:00
|
|
|
* refdlg.h
|
2000-09-14 09:09:56 +00:00
|
|
|
* (C) 2000 LyX Team
|
|
|
|
* John Levon, moz@compsoc.man.ac.uk
|
|
|
|
*/
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2000-10-17 08:27:35 +00:00
|
|
|
#ifndef REFDLG_H
|
|
|
|
#define REFDLG_H
|
2000-09-14 09:09:56 +00:00
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <gettext.h>
|
|
|
|
|
|
|
|
#include "FormRef.h"
|
|
|
|
|
|
|
|
#include <qlayout.h>
|
|
|
|
#include <qcombobox.h>
|
|
|
|
#include <qcheckbox.h>
|
|
|
|
#include <qlistbox.h>
|
|
|
|
#include <qlabel.h>
|
|
|
|
#include <qtooltip.h>
|
|
|
|
#include <qlineedit.h>
|
|
|
|
#include <qpushbutton.h>
|
|
|
|
|
2001-01-24 11:43:48 +00:00
|
|
|
class RefDialog : public QWidget {
|
2000-09-14 09:09:56 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2000-10-17 08:27:35 +00:00
|
|
|
RefDialog(FormRef *form, QWidget *parent=0, const char *name=0,
|
2000-09-14 09:09:56 +00:00
|
|
|
bool modal=false, WFlags f=0);
|
2000-10-17 08:27:35 +00:00
|
|
|
~RefDialog();
|
2000-09-14 09:09:56 +00:00
|
|
|
|
|
|
|
// widgets
|
|
|
|
|
|
|
|
QListBox *refs;
|
|
|
|
QLabel *labelrefs;
|
|
|
|
QLineEdit *refname;
|
|
|
|
QLineEdit *reference;
|
|
|
|
QLabel *labelrefname;
|
|
|
|
QLabel *labelreference;
|
|
|
|
QCheckBox *sort;
|
|
|
|
QComboBox *type;
|
|
|
|
QLabel *labeltype;
|
|
|
|
QPushButton *buttonGoto;
|
|
|
|
QPushButton *buttonUpdate;
|
|
|
|
QPushButton *buttonOk;
|
|
|
|
QPushButton *buttonCancel;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *e);
|
|
|
|
|
|
|
|
private:
|
|
|
|
FormRef *form_;
|
|
|
|
|
|
|
|
// layouts
|
|
|
|
|
|
|
|
QHBoxLayout *topLayout;
|
|
|
|
QVBoxLayout *layout;
|
|
|
|
QHBoxLayout *upperLayout;
|
|
|
|
QVBoxLayout *browserLayout;
|
|
|
|
QVBoxLayout *rightLayout;
|
|
|
|
QHBoxLayout *nameLayout;
|
|
|
|
QHBoxLayout *referenceLayout;
|
|
|
|
QHBoxLayout *buttonLayout;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
/// adaptor to FormRef::select
|
2000-09-15 15:32:07 +00:00
|
|
|
void select_adaptor(const char *sel) {
|
|
|
|
form_->select(sel);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// adaptor to FormRef::highlight
|
2000-09-14 09:09:56 +00:00
|
|
|
void highlight_adaptor(const char *sel) {
|
2000-09-15 15:32:07 +00:00
|
|
|
form_->highlight(sel);
|
2000-09-14 09:09:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// adaptor to FormRef::set_sort
|
|
|
|
void sort_adaptor(bool sort) {
|
|
|
|
form_->set_sort(sort);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// adaptor to FormRef::gotoRef
|
|
|
|
void goto_adaptor(void) {
|
|
|
|
form_->goto_ref();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// adaptor to FormRef::update
|
|
|
|
void update_adaptor(void) {
|
2000-09-15 15:32:07 +00:00
|
|
|
form_->do_ref_update();
|
2000-09-14 09:09:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// adaptor to FormRef::apply
|
|
|
|
void apply_adaptor(void) {
|
|
|
|
form_->apply();
|
|
|
|
form_->close();
|
|
|
|
hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// adaptor to FormRef::close
|
|
|
|
void close_adaptor(void) {
|
|
|
|
form_->close();
|
|
|
|
hide();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|