namespace frontend {
+ProgressViewWidget::ProgressViewWidget()
+{
+ setupUi(this);
+
+}
+
+
+GuiProgressView::~GuiProgressView()
+{
+ delete widget_;
+}
GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
- Qt::WindowFlags flags) : DockView(parent, "progress", "Progress monitoring", area, flags)
+ Qt::WindowFlags flags) : DockView(parent, "progress", "Debug/Progress window", area, flags)
{
- setWindowTitle(qt_("Progress monitoring"));
- setWidget(&text_edit);
- text_edit.setReadOnly(true);
+ widget_ = new ProgressViewWidget();
+ setWidget(widget_);
GuiProgress* progress = dynamic_cast<GuiProgress*>(support::ProgressInterface::instance());
void GuiProgressView::clearText()
{
- text_edit.clear();
+ widget_->outTE->clear();
}
if (text.isEmpty())
return;
QString time = QTime::currentTime().toString();
- text_edit.insertPlainText(time + ": " + text.trimmed() + "\n");
- text_edit.ensureCursorVisible();
+ widget_->outTE->insertPlainText(time + ": " + text.trimmed() + "\n");
+ widget_->outTE->ensureCursorVisible();
}
#ifndef GUIPROGRESSVIEW_H
#define GUIPROGRESSVIEW_H
+#include "ui_ProgressViewUi.h"
#include "DockView.h"
#include "GuiProgress.h"
-#include <QTextEdit>
-
#include <string>
+#include <QDockWidget>
+#include "qt_helpers.h"
namespace lyx {
namespace frontend {
+class ProgressViewWidget : public QWidget, public Ui::ProgressViewUi
+{
+ Q_OBJECT
+
+public:
+ ProgressViewWidget();
+private:
+
+};
class GuiProgressView : public DockView
{
Qt::DockWidgetArea area, ///< Position of the dock (and also drawer)
Qt::WindowFlags flags = 0);
+ ~GuiProgressView();
/// Controller inherited method.
///@{
bool initialiseParams(std::string const &) { return true; }
bool canApply() const { return true; }
bool canApplyToReadOnly() const { return true; }
void updateView() {}
+ bool wantInitialFocus() const { return false; }
///@}
private Q_SLOTS:
void clearText();
private:
- QTextEdit text_edit;
+ ProgressViewWidget * widget_;
};
PrintUi.ui \
PrintindexUi.ui \
PrintNomenclUi.ui \
+ ProgressViewUi.ui \
RefUi.ui \
SearchUi.ui \
SendtoUi.ui \
--- /dev/null
+<ui version="4.0" >
+ <class>ProgressViewUi</class>
+ <widget class="QWidget" name="ProgressViewUi" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>468</width>
+ <height>94</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string/>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="1" >
+ <layout class="QVBoxLayout" >
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="autoClearCB" >
+ <property name="toolTip" >
+ <string>Automatic cleanup of the window before LaTeX compilation proceeds</string>
+ </property>
+ <property name="text" >
+ <string>&Automatic clear</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="updatePB" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>&Update</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QTextEdit" name="outTE" />
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>autoClearCB</tabstop>
+ <tabstop>updatePB</tabstop>
+ </tabstops>
+ <includes>
+ <include location="local" >qt_i18n.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>