mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
parent
5b84f11f80
commit
051a1a56a9
@ -305,26 +305,6 @@ typedef map<string, GuiToolbar *> ToolbarMap;
|
|||||||
|
|
||||||
typedef shared_ptr<Dialog> DialogPtr;
|
typedef shared_ptr<Dialog> DialogPtr;
|
||||||
|
|
||||||
|
|
||||||
// see https://wiki.qt.io/Clickable_QLabel
|
|
||||||
class QClickableLabel : public QLabel {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit QClickableLabel(QWidget * parent)
|
|
||||||
: QLabel(parent)
|
|
||||||
{}
|
|
||||||
|
|
||||||
~QClickableLabel() {}
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void clicked();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void mousePressEvent(QMouseEvent *) {
|
|
||||||
Q_EMIT clicked();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
@ -630,7 +610,7 @@ GuiView::GuiView(int id)
|
|||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
// add busy indicator to statusbar
|
// add busy indicator to statusbar
|
||||||
QClickableLabel * busylabel = new QClickableLabel(statusBar());
|
QLabel * busylabel = new QLabel(statusBar());
|
||||||
statusBar()->addPermanentWidget(busylabel);
|
statusBar()->addPermanentWidget(busylabel);
|
||||||
search_mode mode = theGuiApp()->imageSearchMode();
|
search_mode mode = theGuiApp()->imageSearchMode();
|
||||||
QString fn = toqstr(lyx::libFileSearch("images", "busy", "gif", mode).absFileName());
|
QString fn = toqstr(lyx::libFileSearch("images", "busy", "gif", mode).absFileName());
|
||||||
@ -643,7 +623,6 @@ GuiView::GuiView(int id)
|
|||||||
busylabel, SLOT(show()));
|
busylabel, SLOT(show()));
|
||||||
connect(&d.processing_thread_watcher_, SIGNAL(finished()),
|
connect(&d.processing_thread_watcher_, SIGNAL(finished()),
|
||||||
busylabel, SLOT(hide()));
|
busylabel, SLOT(hide()));
|
||||||
connect(busylabel, SIGNAL(clicked()), this, SLOT(checkKillBackground()));
|
|
||||||
|
|
||||||
QFontMetrics const fm(statusBar()->fontMetrics());
|
QFontMetrics const fm(statusBar()->fontMetrics());
|
||||||
int const iconheight = max(int(d.normalIconSize), fm.height());
|
int const iconheight = max(int(d.normalIconSize), fm.height());
|
||||||
@ -734,17 +713,6 @@ void GuiView::disableShellEscape()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiView::checkKillBackground()
|
|
||||||
{
|
|
||||||
docstring const ttl = _("Cancel background process?");
|
|
||||||
docstring const msg = _("Do you want to cancel the background export process?");
|
|
||||||
const int decision =
|
|
||||||
Alert::prompt(ttl, msg, 1, 1, _("&Cancel Export"), _("Conti&nue"));
|
|
||||||
if (decision == 0)
|
|
||||||
Systemcall::killscript();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas()
|
QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas()
|
||||||
{
|
{
|
||||||
QVector<GuiWorkArea*> areas;
|
QVector<GuiWorkArea*> areas;
|
||||||
|
@ -231,8 +231,6 @@ public Q_SLOTS:
|
|||||||
void updateWindowTitle(GuiWorkArea * wa);
|
void updateWindowTitle(GuiWorkArea * wa);
|
||||||
///
|
///
|
||||||
void disableShellEscape();
|
void disableShellEscape();
|
||||||
///
|
|
||||||
void checkKillBackground();
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
///
|
///
|
||||||
|
@ -197,7 +197,6 @@ MOCHEADER = \
|
|||||||
GuiChanges.h \
|
GuiChanges.h \
|
||||||
GuiCharacter.h \
|
GuiCharacter.h \
|
||||||
GuiCitation.h \
|
GuiCitation.h \
|
||||||
GuiClickableLabel.h \
|
|
||||||
GuiClipboard.h \
|
GuiClipboard.h \
|
||||||
GuiCommandBuffer.h \
|
GuiCommandBuffer.h \
|
||||||
GuiCommandEdit.h \
|
GuiCommandEdit.h \
|
||||||
|
Loading…
Reference in New Issue
Block a user