mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
f7ba7c8e9f
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3806 a592a061-630c-0410-9148-cb99ea01b6c8
106 lines
1.3 KiB
C
106 lines
1.3 KiB
C
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 2000 The LyX Team.
|
|
*
|
|
* ======================================================
|
|
*
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include <qdialog.h>
|
|
#include <qapplication.h>
|
|
|
|
#include "debug.h"
|
|
#include "QtLyXView.h"
|
|
#include "Dialogs.h"
|
|
#include "Qt2Base.h"
|
|
#include "Qt2BC.h"
|
|
#include "support/LAssert.h"
|
|
|
|
Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
|
|
: ViewBC<Qt2BC>(c), updating_(false), title_(t)
|
|
{}
|
|
|
|
|
|
void Qt2Base::show()
|
|
{
|
|
if (!form()) {
|
|
build();
|
|
}
|
|
|
|
form()->setMinimumSize(form()->sizeHint());
|
|
|
|
update(); // make sure its up-to-date
|
|
|
|
if (form()->isVisible()) {
|
|
form()->raise();
|
|
} else {
|
|
form()->setCaption(title_);
|
|
form()->show();
|
|
}
|
|
}
|
|
|
|
|
|
void Qt2Base::hide()
|
|
{
|
|
if (form() && form()->isVisible())
|
|
form()->hide();
|
|
}
|
|
|
|
|
|
bool Qt2Base::isValid()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
void Qt2Base::changed()
|
|
{
|
|
if (updating_)
|
|
return;
|
|
|
|
if (isValid())
|
|
bc().valid();
|
|
else
|
|
bc().invalid();
|
|
}
|
|
|
|
|
|
void Qt2Base::slotWMHide()
|
|
{
|
|
CancelButton();
|
|
}
|
|
|
|
|
|
void Qt2Base::slotApply()
|
|
{
|
|
ApplyButton();
|
|
}
|
|
|
|
|
|
void Qt2Base::slotOK()
|
|
{
|
|
OKButton();
|
|
}
|
|
|
|
|
|
void Qt2Base::slotClose()
|
|
{
|
|
CancelButton();
|
|
}
|
|
|
|
|
|
void Qt2Base::slotRestore()
|
|
{
|
|
RestoreButton();
|
|
}
|