mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
Move debug window into designers stuff instead of dynamical building
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32661 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7384d3dd35
commit
85c73e7fcc
@ -24,14 +24,24 @@ namespace lyx {
|
||||
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());
|
||||
|
||||
@ -47,7 +57,7 @@ GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
|
||||
|
||||
void GuiProgressView::clearText()
|
||||
{
|
||||
text_edit.clear();
|
||||
widget_->outTE->clear();
|
||||
}
|
||||
|
||||
|
||||
@ -56,8 +66,8 @@ void GuiProgressView::appendText(QString const & text)
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,19 +12,29 @@
|
||||
#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
|
||||
{
|
||||
@ -36,6 +46,7 @@ public:
|
||||
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; }
|
||||
@ -45,6 +56,7 @@ public:
|
||||
bool canApply() const { return true; }
|
||||
bool canApplyToReadOnly() const { return true; }
|
||||
void updateView() {}
|
||||
bool wantInitialFocus() const { return false; }
|
||||
///@}
|
||||
|
||||
private Q_SLOTS:
|
||||
@ -52,7 +64,7 @@ private Q_SLOTS:
|
||||
void clearText();
|
||||
|
||||
private:
|
||||
QTextEdit text_edit;
|
||||
ProgressViewWidget * widget_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -316,6 +316,7 @@ UIFILES = \
|
||||
PrintUi.ui \
|
||||
PrintindexUi.ui \
|
||||
PrintNomenclUi.ui \
|
||||
ProgressViewUi.ui \
|
||||
RefUi.ui \
|
||||
SearchUi.ui \
|
||||
SendtoUi.ui \
|
||||
|
82
src/frontends/qt4/ui/ProgressViewUi.ui
Normal file
82
src/frontends/qt4/ui/ProgressViewUi.ui
Normal file
@ -0,0 +1,82 @@
|
||||
<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>
|
Loading…
Reference in New Issue
Block a user