lyx_mirror/src/frontends/qt4/QListings.h
Bo Peng 0bbdc3ffeb InsetListings: Enhanced listings dialog, more than 10 widgets are added to handle common listings parameters.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18282 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-13 04:06:37 +00:00

64 lines
1.3 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);
/// get values from all the widgets and form a string
std::string construct_params();
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