lyx_mirror/src/frontends/qt4/QListings.h
Lars Gullik Bjønnes 897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00

72 lines
1.6 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();
/// turn off inline when float is clicked
void on_floatCB_stateChanged(int state);
/// turn off float when inline is clicked
void on_inlineCB_stateChanged(int state);
/// turn off numbering options when none is selected
void on_numberSideCO_currentIndexChanged(int);
/// show dialect when language is chosen
void on_languageCO_currentIndexChanged(int);
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