mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-23 17:28:45 +00:00
Changed: Code formatting
This commit is contained in:
parent
f3cc7fc0ba
commit
ad5cc68107
5 changed files with 45 additions and 33 deletions
|
@ -147,7 +147,6 @@ namespace NLMISC
|
||||||
bool DebugNeedAssert;
|
bool DebugNeedAssert;
|
||||||
bool NoAssert;
|
bool NoAssert;
|
||||||
bool AlreadyCreateSharedAmongThreads;
|
bool AlreadyCreateSharedAmongThreads;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This class implements the context interface for the a library module.
|
/** This class implements the context interface for the a library module.
|
||||||
|
@ -184,6 +183,7 @@ namespace NLMISC
|
||||||
virtual void setNoAssert(bool noAssert);
|
virtual void setNoAssert(bool noAssert);
|
||||||
virtual bool getAlreadyCreateSharedAmongThreads();
|
virtual bool getAlreadyCreateSharedAmongThreads();
|
||||||
virtual void setAlreadyCreateSharedAmongThreads(bool b);
|
virtual void setAlreadyCreateSharedAmongThreads(bool b);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Pointer to the application context.
|
/// Pointer to the application context.
|
||||||
INelContext *_ApplicationContext;
|
INelContext *_ApplicationContext;
|
||||||
|
|
|
@ -543,13 +543,16 @@ ColorPickerPopup::ColorPickerPopup(int width, bool withColorDialog,
|
||||||
setMouseTracking(true);
|
setMouseTracking(true);
|
||||||
cols = width;
|
cols = width;
|
||||||
|
|
||||||
if (withColorDialog) {
|
if (withColorDialog)
|
||||||
|
{
|
||||||
moreButton = new ColorPickerButton(this);
|
moreButton = new ColorPickerButton(this);
|
||||||
moreButton->setFixedWidth(24);
|
moreButton->setFixedWidth(24);
|
||||||
moreButton->setFixedHeight(21);
|
moreButton->setFixedHeight(21);
|
||||||
moreButton->setFrameRect(QRect(2, 2, 20, 17));
|
moreButton->setFrameRect(QRect(2, 2, 20, 17));
|
||||||
connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog()));
|
connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog()));
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
moreButton = 0;
|
moreButton = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1061,12 +1064,17 @@ void ColorPickerButton::keyPressEvent(QKeyEvent *e)
|
||||||
if (e->key() == Qt::Key_Up
|
if (e->key() == Qt::Key_Up
|
||||||
|| e->key() == Qt::Key_Down
|
|| e->key() == Qt::Key_Down
|
||||||
|| e->key() == Qt::Key_Left
|
|| e->key() == Qt::Key_Left
|
||||||
|| e->key() == Qt::Key_Right) {
|
|| e->key() == Qt::Key_Right)
|
||||||
|
{
|
||||||
qApp->sendEvent(parent(), e);
|
qApp->sendEvent(parent(), e);
|
||||||
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
|
}
|
||||||
|
else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return)
|
||||||
|
{
|
||||||
setFrameShadow(Sunken);
|
setFrameShadow(Sunken);
|
||||||
update();
|
update();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
QFrame::keyPressEvent(e);
|
QFrame::keyPressEvent(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1079,13 +1087,18 @@ void ColorPickerButton::keyReleaseEvent(QKeyEvent *e)
|
||||||
if (e->key() == Qt::Key_Up
|
if (e->key() == Qt::Key_Up
|
||||||
|| e->key() == Qt::Key_Down
|
|| e->key() == Qt::Key_Down
|
||||||
|| e->key() == Qt::Key_Left
|
|| e->key() == Qt::Key_Left
|
||||||
|| e->key() == Qt::Key_Right) {
|
|| e->key() == Qt::Key_Right)
|
||||||
|
{
|
||||||
qApp->sendEvent(parent(), e);
|
qApp->sendEvent(parent(), e);
|
||||||
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
|
}
|
||||||
|
else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return)
|
||||||
|
{
|
||||||
setFrameShadow(Raised);
|
setFrameShadow(Raised);
|
||||||
repaint();
|
repaint();
|
||||||
emit clicked();
|
emit clicked();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
QFrame::keyReleaseEvent(e);
|
QFrame::keyReleaseEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1511,8 +1511,6 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, ¶meters, &_DeviceInterface);
|
// _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, ¶meters, &_DeviceInterface);
|
||||||
|
|
||||||
// Check some caps
|
// Check some caps
|
||||||
|
@ -2661,7 +2659,8 @@ bool CDriverD3D::reset (const GfxMode& mode)
|
||||||
#ifndef NL_NO_ASM
|
#ifndef NL_NO_ASM
|
||||||
CFpuRestorer fpuRestorer; // fpu control word is changed by "Reset"
|
CFpuRestorer fpuRestorer; // fpu control word is changed by "Reset"
|
||||||
#endif
|
#endif
|
||||||
if (_Rasterizer!=D3DDEVTYPE_REF) {
|
if (_Rasterizer!=D3DDEVTYPE_REF)
|
||||||
|
{
|
||||||
HRESULT hr = _DeviceInterface->Reset (¶meters);
|
HRESULT hr = _DeviceInterface->Reset (¶meters);
|
||||||
if (hr != D3D_OK)
|
if (hr != D3D_OK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue