2009-12-22 10:04:30 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file GuiProgressView.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Peter Kümmel
|
2009-12-29 15:05:37 +00:00
|
|
|
* \author Pavel Sanda
|
2009-12-22 10:04:30 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUIPROGRESSVIEW_H
|
|
|
|
#define GUIPROGRESSVIEW_H
|
|
|
|
|
2010-01-07 02:19:21 +00:00
|
|
|
#if QT_VERSION < 0x040400
|
|
|
|
#define settingsLayout gridLayout1
|
|
|
|
#endif
|
|
|
|
|
2009-12-28 21:40:14 +00:00
|
|
|
#include "ui_ProgressViewUi.h"
|
2009-12-22 10:04:30 +00:00
|
|
|
|
|
|
|
#include "DockView.h"
|
|
|
|
|
|
|
|
#include "GuiProgress.h"
|
|
|
|
|
|
|
|
#include <string>
|
2009-12-30 14:48:47 +00:00
|
|
|
#include <QList>
|
|
|
|
|
2009-12-22 10:04:30 +00:00
|
|
|
|
2009-12-29 15:05:37 +00:00
|
|
|
class QHideEvent;
|
|
|
|
class QShowEvent;
|
|
|
|
|
|
|
|
|
2009-12-22 10:04:30 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2009-12-30 14:48:47 +00:00
|
|
|
struct LevelButton;
|
|
|
|
|
2009-12-29 15:05:37 +00:00
|
|
|
|
2009-12-28 21:40:14 +00:00
|
|
|
class ProgressViewWidget : public QWidget, public Ui::ProgressViewUi
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ProgressViewWidget();
|
|
|
|
private:
|
|
|
|
|
|
|
|
};
|
2009-12-22 10:04:30 +00:00
|
|
|
|
|
|
|
class GuiProgressView : public DockView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GuiProgressView(
|
|
|
|
GuiView & parent, ///< the main window where to dock.
|
|
|
|
Qt::DockWidgetArea area, ///< Position of the dock (and also drawer)
|
|
|
|
Qt::WindowFlags flags = 0);
|
|
|
|
|
2009-12-28 21:40:14 +00:00
|
|
|
~GuiProgressView();
|
2009-12-22 10:04:30 +00:00
|
|
|
/// Controller inherited method.
|
|
|
|
///@{
|
|
|
|
bool initialiseParams(std::string const &) { return true; }
|
|
|
|
void clearParams() {}
|
|
|
|
void dispatchParams() {}
|
|
|
|
bool isBufferDependent() const { return false; }
|
|
|
|
bool canApply() const { return true; }
|
|
|
|
bool canApplyToReadOnly() const { return true; }
|
|
|
|
void updateView() {}
|
2009-12-28 21:40:14 +00:00
|
|
|
bool wantInitialFocus() const { return false; }
|
2009-12-28 21:55:50 +00:00
|
|
|
void restoreSession();
|
|
|
|
void saveSession() const;
|
2009-12-22 10:04:30 +00:00
|
|
|
///@}
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void appendText(QString const & text);
|
2010-01-03 16:30:54 +00:00
|
|
|
void appendLyXErrText(QString const & text);
|
2009-12-22 10:04:30 +00:00
|
|
|
void clearText();
|
|
|
|
|
2009-12-30 14:48:47 +00:00
|
|
|
void levelChanged();
|
2010-01-05 22:32:58 +00:00
|
|
|
void tristateChanged(int state);
|
2009-12-29 15:05:37 +00:00
|
|
|
|
2009-12-22 10:04:30 +00:00
|
|
|
private:
|
2009-12-28 21:40:14 +00:00
|
|
|
ProgressViewWidget * widget_;
|
2009-12-29 15:05:37 +00:00
|
|
|
|
|
|
|
void showEvent(QShowEvent*);
|
|
|
|
void hideEvent(QHideEvent*);
|
2009-12-30 14:48:47 +00:00
|
|
|
|
|
|
|
QList<LevelButton*> level_buttons;
|
2010-01-05 22:32:58 +00:00
|
|
|
QList<LevelButton*> checked_buttons;
|
|
|
|
LevelButton* toggle_button;
|
2009-12-22 10:04:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|