mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
transpose const char
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5423 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8e6f463ee9
commit
bcbfc72c47
@ -1,3 +1,7 @@
|
|||||||
|
2002-10-15 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||||
|
|
||||||
|
* QBrowseBox.C (QBrowseBox): transpose const char
|
||||||
|
|
||||||
2002-10-15 Angus Leeming <leeming@lyx.org>
|
2002-10-15 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* QBrowseBox.C (c-tor): default values should go only in the .h file.
|
* QBrowseBox.C (c-tor): default values should go only in the .h file.
|
||||||
@ -20,7 +24,7 @@
|
|||||||
* qfont_loader.C (available): Implemented.
|
* qfont_loader.C (available): Implemented.
|
||||||
|
|
||||||
2002-10-09 Edwin Leuven <leuven@fee.uva.nl>
|
2002-10-09 Edwin Leuven <leuven@fee.uva.nl>
|
||||||
|
|
||||||
* QDocument.C: Brand new document dialog
|
* QDocument.C: Brand new document dialog
|
||||||
* QDocument.h:
|
* QDocument.h:
|
||||||
* QDocumentDialog.C:
|
* QDocumentDialog.C:
|
||||||
@ -51,7 +55,7 @@
|
|||||||
* ui/QGraphicsDialog.ui:
|
* ui/QGraphicsDialog.ui:
|
||||||
* ui/QPrintDialog.ui:
|
* ui/QPrintDialog.ui:
|
||||||
* ui/QRefDialog.ui:
|
* ui/QRefDialog.ui:
|
||||||
|
|
||||||
2002-09-28 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
2002-09-28 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
* ui/QWrapDialog.ui:
|
* ui/QWrapDialog.ui:
|
||||||
@ -61,7 +65,7 @@
|
|||||||
* Dialogs.C:
|
* Dialogs.C:
|
||||||
* Dialogs2.C:
|
* Dialogs2.C:
|
||||||
* Dialogs_impl.h: Implement Wrap figure dialog
|
* Dialogs_impl.h: Implement Wrap figure dialog
|
||||||
|
|
||||||
2002-09-25 Angus Leeming <leeming@lyx.org>
|
2002-09-25 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* Dialogs2.C:
|
* Dialogs2.C:
|
||||||
@ -76,8 +80,8 @@
|
|||||||
2002-09-24 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2002-09-24 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* ui/moc/Makefile.am (INCLUDES):
|
* ui/moc/Makefile.am (INCLUDES):
|
||||||
* ui/Makefile.am (INCLUDES):
|
* ui/Makefile.am (INCLUDES):
|
||||||
* moc/Makefile.am (INCLUDES):
|
* moc/Makefile.am (INCLUDES):
|
||||||
* Makefile.am (INCLUDES): loose SIGC_INCLUDES
|
* Makefile.am (INCLUDES): loose SIGC_INCLUDES
|
||||||
|
|
||||||
2002-09-24 John Levon <levon@movementarian.org>
|
2002-09-24 John Levon <levon@movementarian.org>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* \file QBrowseBox.C
|
* \file QBrowseBox.C
|
||||||
*
|
*
|
||||||
* Original file taken from klyx 0.10 sources:
|
* Original file taken from klyx 0.10 sources:
|
||||||
* $Id: QBrowseBox.C,v 1.2 2002/10/15 17:45:12 leeming Exp $
|
* $Id: QBrowseBox.C,v 1.3 2002/10/15 18:29:01 larsbj Exp $
|
||||||
*
|
*
|
||||||
* \author Kalle Dalheimer ?
|
* \author Kalle Dalheimer ?
|
||||||
*
|
*
|
||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
QBrowseBox::QBrowseBox(int rows, int cols, QWidget * parent,
|
QBrowseBox::QBrowseBox(int rows, int cols, QWidget * parent,
|
||||||
const char * name, WFlags fl)
|
char const * name, WFlags fl)
|
||||||
: QGridView()
|
: QGridView()
|
||||||
{
|
{
|
||||||
setNumRows( rows );
|
setNumRows( rows );
|
||||||
@ -34,8 +34,8 @@ QBrowseBox::QBrowseBox(int rows, int cols, QWidget * parent,
|
|||||||
setCellWidth( width()/cols );
|
setCellWidth( width()/cols );
|
||||||
setCellHeight( height()/rows );
|
setCellHeight( height()/rows );
|
||||||
|
|
||||||
_texts = new QString[rows*cols];
|
_texts = new QString[rows * cols];
|
||||||
_pixmaps = new QPixmap[rows*cols];
|
_pixmaps = new QPixmap[rows * cols];
|
||||||
|
|
||||||
_activecell.setX( 0 );
|
_activecell.setX( 0 );
|
||||||
_activecell.setY( 0 );
|
_activecell.setY( 0 );
|
||||||
@ -67,13 +67,13 @@ int QBrowseBox::coordsToIndex( int row, int col )
|
|||||||
return row + col*numCols();
|
return row + col*numCols();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QBrowseBox::insertItem( const QString& text, int row, int col )
|
void QBrowseBox::insertItem( const QString& text, int row, int col )
|
||||||
{
|
{
|
||||||
_texts[ coordsToIndex( row, col ) ] = text;
|
_texts[ coordsToIndex( row, col ) ] = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QBrowseBox::insertItem( QPixmap pixmap, int row, int col )
|
void QBrowseBox::insertItem( QPixmap pixmap, int row, int col )
|
||||||
{
|
{
|
||||||
_pixmaps[ coordsToIndex( row, col ) ] = pixmap;
|
_pixmaps[ coordsToIndex( row, col ) ] = pixmap;
|
||||||
@ -83,9 +83,9 @@ void QBrowseBox::insertItem( QPixmap pixmap)
|
|||||||
{
|
{
|
||||||
int w = (pixmap.width()/numCols());
|
int w = (pixmap.width()/numCols());
|
||||||
int h = (pixmap.height()/numRows());
|
int h = (pixmap.height()/numRows());
|
||||||
|
|
||||||
for( int row = 0; row < numRows(); row++ )
|
for( int row = 0; row < numRows(); row++ )
|
||||||
for( int col = 0; col < numCols(); col++ )
|
for( int col = 0; col < numCols(); col++ )
|
||||||
{
|
{
|
||||||
QPixmap small(w,h);
|
QPixmap small(w,h);
|
||||||
bitBlt(&small,0,0,&pixmap,col*w,row*h,w,h,Qt::CopyROP,false);
|
bitBlt(&small,0,0,&pixmap,col*w,row*h,w,h,Qt::CopyROP,false);
|
||||||
@ -95,14 +95,14 @@ void QBrowseBox::insertItem( QPixmap pixmap)
|
|||||||
resize(pixmap.width() + (numCols()+1)*frameWidth(),
|
resize(pixmap.width() + (numCols()+1)*frameWidth(),
|
||||||
pixmap.height() +(numRows()+1)*frameWidth());
|
pixmap.height() +(numRows()+1)*frameWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBrowseBox::removeItem( int row, int col )
|
void QBrowseBox::removeItem( int row, int col )
|
||||||
{
|
{
|
||||||
_texts[ coordsToIndex( row, col ) ] = "";
|
_texts[ coordsToIndex( row, col ) ] = "";
|
||||||
_pixmaps[ coordsToIndex( row, col ) ].resize( 0, 0 );
|
_pixmaps[ coordsToIndex( row, col ) ].resize( 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QBrowseBox::clear()
|
void QBrowseBox::clear()
|
||||||
{
|
{
|
||||||
for( int row = 0; row < numRows(); row++ )
|
for( int row = 0; row < numRows(); row++ )
|
||||||
@ -110,7 +110,7 @@ void QBrowseBox::clear()
|
|||||||
removeItem( row, col );
|
removeItem( row, col );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString QBrowseBox::text( int row, int col )
|
QString QBrowseBox::text( int row, int col )
|
||||||
{
|
{
|
||||||
if( col<0 || col >= numCols() || row<0 || row >= numRows() )
|
if( col<0 || col >= numCols() || row<0 || row >= numRows() )
|
||||||
@ -118,7 +118,7 @@ QString QBrowseBox::text( int row, int col )
|
|||||||
return _texts[ coordsToIndex( row, col ) ];
|
return _texts[ coordsToIndex( row, col ) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QPixmap QBrowseBox::pixmap( int row, int col )
|
QPixmap QBrowseBox::pixmap( int row, int col )
|
||||||
{
|
{
|
||||||
static QPixmap empty;
|
static QPixmap empty;
|
||||||
@ -149,7 +149,7 @@ void QBrowseBox::keyPressEvent( QKeyEvent* e )
|
|||||||
default:
|
default:
|
||||||
e->ignore();
|
e->ignore();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBrowseBox::mouseReleaseEvent( QMouseEvent* e )
|
void QBrowseBox::mouseReleaseEvent( QMouseEvent* e )
|
||||||
@ -168,7 +168,7 @@ void QBrowseBox::paintCell( class QPainter * painter, int row, int col )
|
|||||||
{
|
{
|
||||||
painter->setClipRect(cellGeometry(row,col));//, QPainter::CoordPainter);
|
painter->setClipRect(cellGeometry(row,col));//, QPainter::CoordPainter);
|
||||||
bool ispixmap = false;
|
bool ispixmap = false;
|
||||||
|
|
||||||
if( ! _pixmaps[coordsToIndex(row,col)].isNull() ) {
|
if( ! _pixmaps[coordsToIndex(row,col)].isNull() ) {
|
||||||
painter->drawPixmap(0,0,_pixmaps[coordsToIndex(row,col)]);
|
painter->drawPixmap(0,0,_pixmaps[coordsToIndex(row,col)]);
|
||||||
ispixmap = true;
|
ispixmap = true;
|
||||||
@ -212,7 +212,7 @@ void QBrowseBox::mouseMoveEvent( QMouseEvent* e )
|
|||||||
|
|
||||||
int cellx;
|
int cellx;
|
||||||
int celly;
|
int celly;
|
||||||
|
|
||||||
if( x < 0 || y < 0 || x > width() || y > height() ) {
|
if( x < 0 || y < 0 || x > width() || y > height() ) {
|
||||||
// outside the box
|
// outside the box
|
||||||
cellx = -1;
|
cellx = -1;
|
||||||
@ -233,17 +233,17 @@ void QBrowseBox::mouseMoveEvent( QMouseEvent* e )
|
|||||||
// remove old highlighting
|
// remove old highlighting
|
||||||
updateCell( oldactivecellx, oldactivecelly );
|
updateCell( oldactivecellx, oldactivecelly );
|
||||||
// set new highlighting
|
// set new highlighting
|
||||||
updateCell( _activecell.x(), _activecell.y() );
|
updateCell( _activecell.x(), _activecell.y() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBrowseBox::moveLeft( )
|
void QBrowseBox::moveLeft( )
|
||||||
{
|
{
|
||||||
int const y = _activecell.y();
|
int const y = _activecell.y();
|
||||||
|
|
||||||
if (y>0)
|
if (y>0)
|
||||||
_activecell.setY(y-1);
|
_activecell.setY(y-1);
|
||||||
|
|
||||||
updateCell(_activecell.x(), y);
|
updateCell(_activecell.x(), y);
|
||||||
updateCell(_activecell.x(), _activecell.y());
|
updateCell(_activecell.x(), _activecell.y());
|
||||||
}
|
}
|
||||||
@ -251,10 +251,10 @@ void QBrowseBox::moveLeft( )
|
|||||||
void QBrowseBox::moveRight( )
|
void QBrowseBox::moveRight( )
|
||||||
{
|
{
|
||||||
int const y = _activecell.y();
|
int const y = _activecell.y();
|
||||||
|
|
||||||
if (y<numCols()-1)
|
if (y<numCols()-1)
|
||||||
_activecell.setY(y+1);
|
_activecell.setY(y+1);
|
||||||
|
|
||||||
updateCell(_activecell.x(), y);
|
updateCell(_activecell.x(), y);
|
||||||
updateCell(_activecell.x(),_activecell.y());
|
updateCell(_activecell.x(),_activecell.y());
|
||||||
}
|
}
|
||||||
@ -262,10 +262,10 @@ void QBrowseBox::moveRight( )
|
|||||||
void QBrowseBox::moveUp( )
|
void QBrowseBox::moveUp( )
|
||||||
{
|
{
|
||||||
int const x = _activecell.x();
|
int const x = _activecell.x();
|
||||||
|
|
||||||
if (x>0)
|
if (x>0)
|
||||||
_activecell.setX(x-1);
|
_activecell.setX(x-1);
|
||||||
|
|
||||||
updateCell(x, _activecell.y());
|
updateCell(x, _activecell.y());
|
||||||
updateCell(_activecell.x(),_activecell.y());
|
updateCell(_activecell.x(),_activecell.y());
|
||||||
}
|
}
|
||||||
@ -273,10 +273,10 @@ void QBrowseBox::moveUp( )
|
|||||||
void QBrowseBox::moveDown( )
|
void QBrowseBox::moveDown( )
|
||||||
{
|
{
|
||||||
int const x = _activecell.x();
|
int const x = _activecell.x();
|
||||||
|
|
||||||
if (x<numRows()-1)
|
if (x<numRows()-1)
|
||||||
_activecell.setX(x+1);
|
_activecell.setX(x+1);
|
||||||
|
|
||||||
updateCell(x, _activecell.y());
|
updateCell(x, _activecell.y());
|
||||||
updateCell(_activecell.x(),_activecell.y());
|
updateCell(_activecell.x(),_activecell.y());
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* \file QDocument.C
|
* \file QDocument.C
|
||||||
* This file is part of LyX, the document processor.
|
* This file is part of LyX, the document processor.
|
||||||
* Licence details can be found in the file COPYING.
|
* Licence details can be found in the file COPYING.
|
||||||
*
|
*
|
||||||
* \author Edwin Leuven
|
* \author Edwin Leuven
|
||||||
*
|
*
|
||||||
* Full author contact details are available in file CREDITS
|
* Full author contact details are available in file CREDITS
|
||||||
@ -73,7 +73,7 @@ void QDocument::build_dialog()
|
|||||||
dialog_->langModule->languageCO->insertItem(
|
dialog_->langModule->languageCO->insertItem(
|
||||||
lit->first.c_str());
|
lit->first.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog_->langModule->quoteStyleCO->insertItem(_("``text''"));
|
dialog_->langModule->quoteStyleCO->insertItem(_("``text''"));
|
||||||
dialog_->langModule->quoteStyleCO->insertItem(_("''text''"));
|
dialog_->langModule->quoteStyleCO->insertItem(_("''text''"));
|
||||||
dialog_->langModule->quoteStyleCO->insertItem(_(",,text``"));
|
dialog_->langModule->quoteStyleCO->insertItem(_(",,text``"));
|
||||||
@ -87,7 +87,7 @@ void QDocument::build_dialog()
|
|||||||
"koi8-r","koi8-u","cp866","cp1251",
|
"koi8-r","koi8-u","cp866","cp1251",
|
||||||
"iso88595","pt154",0};
|
"iso88595","pt154",0};
|
||||||
dialog_->packagesModule->encodingCO->insertStrList(items);
|
dialog_->packagesModule->encodingCO->insertStrList(items);
|
||||||
|
|
||||||
dialog_->packagesModule->lspacingCO->insertItem(
|
dialog_->packagesModule->lspacingCO->insertItem(
|
||||||
_("Single"),Spacing::Single);
|
_("Single"),Spacing::Single);
|
||||||
dialog_->packagesModule->lspacingCO->insertItem(
|
dialog_->packagesModule->lspacingCO->insertItem(
|
||||||
@ -120,12 +120,12 @@ void QDocument::build_dialog()
|
|||||||
QString font = tex_fonts[n];
|
QString font = tex_fonts[n];
|
||||||
dialog_->layoutModule->fontsCO->insertItem(font);
|
dialog_->layoutModule->fontsCO->insertItem(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog_->layoutModule->fontsizeCO->insertItem(_("default"));
|
dialog_->layoutModule->fontsizeCO->insertItem(_("default"));
|
||||||
dialog_->layoutModule->fontsizeCO->insertItem(_("10"));
|
dialog_->layoutModule->fontsizeCO->insertItem(_("10"));
|
||||||
dialog_->layoutModule->fontsizeCO->insertItem(_("11"));
|
dialog_->layoutModule->fontsizeCO->insertItem(_("11"));
|
||||||
dialog_->layoutModule->fontsizeCO->insertItem(_("12"));
|
dialog_->layoutModule->fontsizeCO->insertItem(_("12"));
|
||||||
|
|
||||||
dialog_->layoutModule->skipCO->insertItem(_("Smallskip"));
|
dialog_->layoutModule->skipCO->insertItem(_("Smallskip"));
|
||||||
dialog_->layoutModule->skipCO->insertItem(_("Medskip"));
|
dialog_->layoutModule->skipCO->insertItem(_("Medskip"));
|
||||||
dialog_->layoutModule->skipCO->insertItem(_("Bigskip"));
|
dialog_->layoutModule->skipCO->insertItem(_("Bigskip"));
|
||||||
@ -143,7 +143,7 @@ void QDocument::build_dialog()
|
|||||||
string const bmtablefile = LibFileSearch("images", "standard", "xpm");
|
string const bmtablefile = LibFileSearch("images", "standard", "xpm");
|
||||||
QString s = bmtablefile.c_str();
|
QString s = bmtablefile.c_str();
|
||||||
qWarning("%d",s);
|
qWarning("%d",s);
|
||||||
|
|
||||||
// Manage the restore, ok, apply, restore and cancel/close buttons
|
// Manage the restore, ok, apply, restore and cancel/close buttons
|
||||||
bc().setOK(dialog_->okPB);
|
bc().setOK(dialog_->okPB);
|
||||||
bc().setApply(dialog_->applyPB);
|
bc().setApply(dialog_->applyPB);
|
||||||
@ -157,7 +157,7 @@ void QDocument::apply()
|
|||||||
/* preamble */
|
/* preamble */
|
||||||
controller().params().preamble =
|
controller().params().preamble =
|
||||||
dialog_->preambleModule->preambleMLE->text().latin1();
|
dialog_->preambleModule->preambleMLE->text().latin1();
|
||||||
|
|
||||||
/* biblio */
|
/* biblio */
|
||||||
controller().params().use_natbib =
|
controller().params().use_natbib =
|
||||||
dialog_->biblioModule->natbibCB->isChecked();
|
dialog_->biblioModule->natbibCB->isChecked();
|
||||||
@ -170,7 +170,7 @@ void QDocument::apply()
|
|||||||
else
|
else
|
||||||
controller().params().quotes_times = InsetQuotes::DoubleQ;
|
controller().params().quotes_times = InsetQuotes::DoubleQ;
|
||||||
|
|
||||||
|
|
||||||
InsetQuotes::quote_language lga = InsetQuotes::EnglishQ;
|
InsetQuotes::quote_language lga = InsetQuotes::EnglishQ;
|
||||||
switch (dialog_->langModule->quoteStyleCO->currentItem()) {
|
switch (dialog_->langModule->quoteStyleCO->currentItem()) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -221,13 +221,13 @@ void QDocument::apply()
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
controller().params().graphicsDriver =
|
controller().params().graphicsDriver =
|
||||||
dialog_->packagesModule->psdriverCO->currentText().latin1();
|
dialog_->packagesModule->psdriverCO->currentText().latin1();
|
||||||
|
|
||||||
controller().params().use_amsmath =
|
controller().params().use_amsmath =
|
||||||
dialog_->packagesModule->amsCB->isChecked();
|
dialog_->packagesModule->amsCB->isChecked();
|
||||||
|
|
||||||
controller().params().inputenc =
|
controller().params().inputenc =
|
||||||
dialog_->packagesModule->encodingCO->currentText().latin1();
|
dialog_->packagesModule->encodingCO->currentText().latin1();
|
||||||
|
|
||||||
@ -236,16 +236,16 @@ void QDocument::apply()
|
|||||||
dialog_->layoutModule->classCO->currentItem();
|
dialog_->layoutModule->classCO->currentItem();
|
||||||
|
|
||||||
//bool succes = controller().classApply();
|
//bool succes = controller().classApply();
|
||||||
|
|
||||||
controller().params().fonts =
|
controller().params().fonts =
|
||||||
dialog_->layoutModule->fontsCO->currentText().latin1();
|
dialog_->layoutModule->fontsCO->currentText().latin1();
|
||||||
|
|
||||||
controller().params().fontsize =
|
controller().params().fontsize =
|
||||||
dialog_->layoutModule->fontsizeCO->currentText().latin1();
|
dialog_->layoutModule->fontsizeCO->currentText().latin1();
|
||||||
|
|
||||||
controller().params().pagestyle =
|
controller().params().pagestyle =
|
||||||
dialog_->layoutModule->pagestyleCO->currentText().latin1();
|
dialog_->layoutModule->pagestyleCO->currentText().latin1();
|
||||||
|
|
||||||
if (dialog_->layoutModule->indentRB->isChecked())
|
if (dialog_->layoutModule->indentRB->isChecked())
|
||||||
controller().params().paragraph_separation = BufferParams::PARSEP_INDENT;
|
controller().params().paragraph_separation = BufferParams::PARSEP_INDENT;
|
||||||
else
|
else
|
||||||
@ -280,14 +280,14 @@ void QDocument::apply()
|
|||||||
|
|
||||||
controller().params().options =
|
controller().params().options =
|
||||||
dialog_->layoutModule->optionsLE->text().latin1();
|
dialog_->layoutModule->optionsLE->text().latin1();
|
||||||
|
|
||||||
controller().params().float_placement =
|
controller().params().float_placement =
|
||||||
dialog_->layoutModule->floatPlacementLE->text().latin1();
|
dialog_->layoutModule->floatPlacementLE->text().latin1();
|
||||||
|
|
||||||
/* paper */
|
/* paper */
|
||||||
controller().params().papersize2 =
|
controller().params().papersize2 =
|
||||||
dialog_->paperModule->papersizeCO->currentItem();
|
dialog_->paperModule->papersizeCO->currentItem();
|
||||||
|
|
||||||
controller().params().paperwidth =
|
controller().params().paperwidth =
|
||||||
LyXLength(dialog_->paperModule->paperwidthLE->text().toDouble(),
|
LyXLength(dialog_->paperModule->paperwidthLE->text().toDouble(),
|
||||||
dialog_->paperModule->paperwidthUnitCO->currentLengthItem()
|
dialog_->paperModule->paperwidthUnitCO->currentLengthItem()
|
||||||
@ -302,12 +302,12 @@ void QDocument::apply()
|
|||||||
controller().params().columns = 2;
|
controller().params().columns = 2;
|
||||||
else
|
else
|
||||||
controller().params().columns = 1;
|
controller().params().columns = 1;
|
||||||
|
|
||||||
if (dialog_->paperModule->facingPagesCB->isChecked())
|
if (dialog_->paperModule->facingPagesCB->isChecked())
|
||||||
controller().params().sides = LyXTextClass::TwoSides;
|
controller().params().sides = LyXTextClass::TwoSides;
|
||||||
else
|
else
|
||||||
controller().params().sides = LyXTextClass::OneSide;
|
controller().params().sides = LyXTextClass::OneSide;
|
||||||
|
|
||||||
if (dialog_->paperModule->landscapeRB->isChecked())
|
if (dialog_->paperModule->landscapeRB->isChecked())
|
||||||
controller().params().orientation = BufferParams::ORIENTATION_LANDSCAPE;
|
controller().params().orientation = BufferParams::ORIENTATION_LANDSCAPE;
|
||||||
else
|
else
|
||||||
@ -322,12 +322,12 @@ void QDocument::apply()
|
|||||||
margin = margin - 1;
|
margin = margin - 1;
|
||||||
}
|
}
|
||||||
controller().params().paperpackage = char(margin);
|
controller().params().paperpackage = char(margin);
|
||||||
|
|
||||||
controller().params().leftmargin =
|
controller().params().leftmargin =
|
||||||
LyXLength(dialog_->marginsModule->innerLE->text().toDouble(),
|
LyXLength(dialog_->marginsModule->innerLE->text().toDouble(),
|
||||||
dialog_->marginsModule->innerUnit->currentLengthItem()
|
dialog_->marginsModule->innerUnit->currentLengthItem()
|
||||||
).asString();
|
).asString();
|
||||||
|
|
||||||
controller().params().topmargin =
|
controller().params().topmargin =
|
||||||
LyXLength(dialog_->marginsModule->topLE->text().toDouble(),
|
LyXLength(dialog_->marginsModule->topLE->text().toDouble(),
|
||||||
dialog_->marginsModule->topUnit->currentLengthItem()
|
dialog_->marginsModule->topUnit->currentLengthItem()
|
||||||
@ -397,13 +397,13 @@ void QDocument::update_contents()
|
|||||||
controller().params().use_natbib);
|
controller().params().use_natbib);
|
||||||
dialog_->biblioModule->citeStyleCO->setCurrentItem(
|
dialog_->biblioModule->citeStyleCO->setCurrentItem(
|
||||||
controller().params().use_numerical_citations ? 1 : 0);
|
controller().params().use_numerical_citations ? 1 : 0);
|
||||||
|
|
||||||
/* language & quotes */
|
/* language & quotes */
|
||||||
dialog_->langModule->singleQuoteRB->setChecked(
|
dialog_->langModule->singleQuoteRB->setChecked(
|
||||||
controller().params().quotes_times == InsetQuotes::SingleQ);
|
controller().params().quotes_times == InsetQuotes::SingleQ);
|
||||||
dialog_->langModule->doubleQuoteRB->setChecked(
|
dialog_->langModule->doubleQuoteRB->setChecked(
|
||||||
controller().params().quotes_times == InsetQuotes::DoubleQ);
|
controller().params().quotes_times == InsetQuotes::DoubleQ);
|
||||||
|
|
||||||
int const pos = int(findPos(lang_,
|
int const pos = int(findPos(lang_,
|
||||||
controller().params().language->lang()));
|
controller().params().language->lang()));
|
||||||
dialog_->langModule->languageCO->setCurrentItem(pos);
|
dialog_->langModule->languageCO->setCurrentItem(pos);
|
||||||
@ -430,8 +430,8 @@ void QDocument::update_contents()
|
|||||||
}
|
}
|
||||||
++pos2;
|
++pos2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString text = controller().params().graphicsDriver.c_str();
|
QString text = controller().params().graphicsDriver.c_str();
|
||||||
int nitem = dialog_->packagesModule->psdriverCO->count();
|
int nitem = dialog_->packagesModule->psdriverCO->count();
|
||||||
for (int n=0; n<nitem ; ++n) {
|
for (int n=0; n<nitem ; ++n) {
|
||||||
@ -440,8 +440,8 @@ void QDocument::update_contents()
|
|||||||
dialog_->packagesModule->psdriverCO->setCurrentItem(n);
|
dialog_->packagesModule->psdriverCO->setCurrentItem(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dialog_->packagesModule->amsCB->setChecked(
|
dialog_->packagesModule->amsCB->setChecked(
|
||||||
controller().params().use_amsmath);
|
controller().params().use_amsmath);
|
||||||
|
|
||||||
@ -465,11 +465,11 @@ void QDocument::update_contents()
|
|||||||
|
|
||||||
dialog_->updateFontsize(controller().textClass().opt_fontsize(),
|
dialog_->updateFontsize(controller().textClass().opt_fontsize(),
|
||||||
controller().params().fontsize);
|
controller().params().fontsize);
|
||||||
|
|
||||||
dialog_->updatePagestyle(controller().textClass().opt_pagestyle(),
|
dialog_->updatePagestyle(controller().textClass().opt_pagestyle(),
|
||||||
controller().params().pagestyle);
|
controller().params().pagestyle);
|
||||||
|
|
||||||
|
|
||||||
for (int n=0; tex_fonts[n][0]; ++n) {
|
for (int n=0; tex_fonts[n][0]; ++n) {
|
||||||
if (tex_fonts[n]==controller().params().fonts) {
|
if (tex_fonts[n]==controller().params().fonts) {
|
||||||
dialog_->layoutModule->fontsCO->setCurrentItem(n);
|
dialog_->layoutModule->fontsCO->setCurrentItem(n);
|
||||||
@ -483,7 +483,7 @@ void QDocument::update_contents()
|
|||||||
} else {
|
} else {
|
||||||
dialog_->layoutModule->skipRB->setChecked(true);
|
dialog_->layoutModule->skipRB->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
switch (controller().params().getDefSkip().kind()) {
|
switch (controller().params().getDefSkip().kind()) {
|
||||||
case VSpace::SMALLSKIP:
|
case VSpace::SMALLSKIP:
|
||||||
@ -516,7 +516,7 @@ void QDocument::update_contents()
|
|||||||
} else {
|
} else {
|
||||||
dialog_->layoutModule->optionsLE->setText("");
|
dialog_->layoutModule->optionsLE->setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* paper */
|
/* paper */
|
||||||
int const psize = controller().params().papersize2;
|
int const psize = controller().params().papersize2;
|
||||||
dialog_->paperModule->papersizeCO->setCurrentItem(psize);
|
dialog_->paperModule->papersizeCO->setCurrentItem(psize);
|
||||||
@ -530,22 +530,22 @@ void QDocument::update_contents()
|
|||||||
|
|
||||||
dialog_->paperModule->facingPagesCB->setChecked(
|
dialog_->paperModule->facingPagesCB->setChecked(
|
||||||
controller().params().sides == LyXTextClass::TwoSides);
|
controller().params().sides == LyXTextClass::TwoSides);
|
||||||
|
|
||||||
dialog_->paperModule->twoColumnCB->setChecked(
|
dialog_->paperModule->twoColumnCB->setChecked(
|
||||||
controller().params().columns == 2);
|
controller().params().columns == 2);
|
||||||
|
|
||||||
dialog_->paperModule->paperwidthUnitCO->setCurrentItem(
|
dialog_->paperModule->paperwidthUnitCO->setCurrentItem(
|
||||||
LyXLength(controller().params().paperwidth).unit());
|
LyXLength(controller().params().paperwidth).unit());
|
||||||
|
|
||||||
dialog_->paperModule->paperwidthLE->setText(
|
dialog_->paperModule->paperwidthLE->setText(
|
||||||
tostr(LyXLength(controller().params().paperwidth).value()).c_str());
|
tostr(LyXLength(controller().params().paperwidth).value()).c_str());
|
||||||
|
|
||||||
dialog_->paperModule->paperheightUnitCO->setCurrentItem(
|
dialog_->paperModule->paperheightUnitCO->setCurrentItem(
|
||||||
LyXLength(controller().params().paperheight).unit());
|
LyXLength(controller().params().paperheight).unit());
|
||||||
|
|
||||||
dialog_->paperModule->paperheightLE->setText(
|
dialog_->paperModule->paperheightLE->setText(
|
||||||
tostr(LyXLength(controller().params().paperheight).value()).c_str());
|
tostr(LyXLength(controller().params().paperheight).value()).c_str());
|
||||||
|
|
||||||
/* margins */
|
/* margins */
|
||||||
int item = controller().params().paperpackage;
|
int item = controller().params().paperpackage;
|
||||||
if (controller().params().use_geometry) {
|
if (controller().params().use_geometry) {
|
||||||
@ -560,43 +560,36 @@ void QDocument::update_contents()
|
|||||||
LyXLength(controller().params().topmargin).unit());
|
LyXLength(controller().params().topmargin).unit());
|
||||||
dialog_->marginsModule->topLE->setText(
|
dialog_->marginsModule->topLE->setText(
|
||||||
tostr(LyXLength(controller().params().topmargin).value()).c_str());
|
tostr(LyXLength(controller().params().topmargin).value()).c_str());
|
||||||
|
|
||||||
dialog_->marginsModule->bottomUnit->setCurrentItem(
|
dialog_->marginsModule->bottomUnit->setCurrentItem(
|
||||||
LyXLength(controller().params().bottommargin).unit());
|
LyXLength(controller().params().bottommargin).unit());
|
||||||
dialog_->marginsModule->bottomLE->setText(
|
dialog_->marginsModule->bottomLE->setText(
|
||||||
tostr(LyXLength(controller().params().bottommargin).value()).c_str());
|
tostr(LyXLength(controller().params().bottommargin).value()).c_str());
|
||||||
|
|
||||||
dialog_->marginsModule->innerUnit->setCurrentItem(
|
dialog_->marginsModule->innerUnit->setCurrentItem(
|
||||||
LyXLength(controller().params().leftmargin).unit());
|
LyXLength(controller().params().leftmargin).unit());
|
||||||
dialog_->marginsModule->innerLE->setText(
|
dialog_->marginsModule->innerLE->setText(
|
||||||
tostr(LyXLength(controller().params().leftmargin).value()).c_str());
|
tostr(LyXLength(controller().params().leftmargin).value()).c_str());
|
||||||
|
|
||||||
dialog_->marginsModule->outerUnit->setCurrentItem(
|
dialog_->marginsModule->outerUnit->setCurrentItem(
|
||||||
LyXLength(controller().params().rightmargin).unit());
|
LyXLength(controller().params().rightmargin).unit());
|
||||||
dialog_->marginsModule->outerLE->setText(
|
dialog_->marginsModule->outerLE->setText(
|
||||||
tostr(LyXLength(controller().params().rightmargin).value()).c_str());
|
tostr(LyXLength(controller().params().rightmargin).value()).c_str());
|
||||||
|
|
||||||
dialog_->marginsModule->headheightUnit->setCurrentItem(
|
dialog_->marginsModule->headheightUnit->setCurrentItem(
|
||||||
LyXLength(controller().params().headheight).unit());
|
LyXLength(controller().params().headheight).unit());
|
||||||
dialog_->marginsModule->headheightLE->setText(
|
dialog_->marginsModule->headheightLE->setText(
|
||||||
tostr(LyXLength(controller().params().headheight).value()).c_str());
|
tostr(LyXLength(controller().params().headheight).value()).c_str());
|
||||||
|
|
||||||
dialog_->marginsModule->headsepUnit->setCurrentItem(
|
dialog_->marginsModule->headsepUnit->setCurrentItem(
|
||||||
LyXLength(controller().params().headsep).unit());
|
LyXLength(controller().params().headsep).unit());
|
||||||
dialog_->marginsModule->headsepLE->setText(
|
dialog_->marginsModule->headsepLE->setText(
|
||||||
tostr(LyXLength(controller().params().headsep).value()).c_str());
|
tostr(LyXLength(controller().params().headsep).value()).c_str());
|
||||||
|
|
||||||
dialog_->marginsModule->footskipUnit->setCurrentItem(
|
dialog_->marginsModule->footskipUnit->setCurrentItem(
|
||||||
LyXLength(controller().params().footskip).unit());
|
LyXLength(controller().params().footskip).unit());
|
||||||
dialog_->marginsModule->footskipLE->setText(
|
dialog_->marginsModule->footskipLE->setText(
|
||||||
tostr(LyXLength(controller().params().footskip).value()).c_str());
|
tostr(LyXLength(controller().params().footskip).value()).c_str());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user