mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-23 08:39:07 +00:00
62 lines
1.2 KiB
C
62 lines
1.2 KiB
C
|
// -*- C++ -*-
|
||
|
/**
|
||
|
* \file QListings.h
|
||
|
* This file is part of LyX, the document processor.
|
||
|
* Licence details can be found in the file COPYING.
|
||
|
*
|
||
|
* \author Bo Peng
|
||
|
*
|
||
|
* Full author contact details are available in file CREDITS.
|
||
|
*/
|
||
|
|
||
|
#ifndef QLISTINGS_H
|
||
|
#define QLISTINGS_H
|
||
|
|
||
|
#include "QDialogView.h"
|
||
|
#include "ui/ListingsUi.h"
|
||
|
|
||
|
#include <QDialog>
|
||
|
#include <QCloseEvent>
|
||
|
|
||
|
namespace lyx {
|
||
|
namespace frontend {
|
||
|
|
||
|
class QListings;
|
||
|
|
||
|
class QListingsDialog : public QDialog, public Ui::QListingsUi {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
QListingsDialog(QListings * form);
|
||
|
protected Q_SLOTS:
|
||
|
virtual void change_adaptor();
|
||
|
/// AFAIK, QValidator only works for QLineEdit so
|
||
|
/// I have to validate listingsED (QTextEdit) manually.
|
||
|
void validate_listings_params();
|
||
|
protected:
|
||
|
virtual void closeEvent(QCloseEvent * e);
|
||
|
private:
|
||
|
QListings * form_;
|
||
|
};
|
||
|
|
||
|
|
||
|
class ControlListings;
|
||
|
|
||
|
class QListings : public QController<ControlListings, QView<QListingsDialog> > {
|
||
|
public:
|
||
|
friend class QListingsDialog;
|
||
|
|
||
|
QListings(Dialog &);
|
||
|
private:
|
||
|
/// Apply changes
|
||
|
virtual void apply();
|
||
|
/// update
|
||
|
virtual void update_contents();
|
||
|
/// build the dialog
|
||
|
virtual void build_dialog();
|
||
|
};
|
||
|
|
||
|
} // namespace frontend
|
||
|
} // namespace lyx
|
||
|
|
||
|
#endif // QLISTINGS_H
|