From: Jürgen Spitzmüller Date: Fri, 18 May 2007 18:35:28 +0000 (+0000) Subject: * src/frontends/qt4/QListings.cpp: X-Git-Tag: 1.6.10~9704 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4d5c28c305aec561f18956bfb2a289ffd2f6441f;p=features.git * src/frontends/qt4/QListings.cpp: - add Apply button * src/frontends/qt4/ui/ListingsUi.ui: - add Apply button - add accelerators git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18409 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/QListings.cpp b/src/frontends/qt4/QListings.cpp index 2feab75244..53303055c9 100644 --- a/src/frontends/qt4/QListings.cpp +++ b/src/frontends/qt4/QListings.cpp @@ -4,7 +4,7 @@ * Licence details can be found in the file COPYING. * * \author Bo Peng - * \author Jürgen Spitzmüller + * \author Jürgen Spitzmüller * * Full author contact details are available in file CREDITS. */ @@ -63,6 +63,7 @@ QListingsDialog::QListingsDialog(QListings * form) setupUi(this); connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK())); + connect(applyPB, SIGNAL(clicked()), form_, SLOT(slotApply())); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); connect(languageCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor())); @@ -161,7 +162,8 @@ void QListingsDialog::validate_listings_params() InsetListingsParams par(construct_params()); if (!isOK) { isOK = true; - listingsTB->setPlainText("Input listings parameters on the right. Enter ? for a list of parameters."); + listingsTB->setPlainText( + "Input listings parameters on the right. Enter ? for a list of parameters."); okPB->setEnabled(true); } } catch (invalidParam & e) { @@ -209,14 +211,15 @@ void QListings::build_dialog() dialog_.reset(new QListingsDialog(this)); bcview().setOK(dialog_->okPB); + bcview().setApply(dialog_->applyPB); bcview().setCancel(dialog_->closePB); - dialog_->listingsTB->setPlainText("Input listings parameters on the right. Enter ? for a list of parameters."); + dialog_->listingsTB->setPlainText( + "Input listings parameters on the right. Enter ? for a list of parameters."); update_contents(); } -/// not used right now. void QListings::apply() { InsetListingsParams & params = controller().params(); diff --git a/src/frontends/qt4/ui/ListingsUi.ui b/src/frontends/qt4/ui/ListingsUi.ui index 403b85dcd7..af312207db 100644 --- a/src/frontends/qt4/ui/ListingsUi.ui +++ b/src/frontends/qt4/ui/ListingsUi.ui @@ -18,21 +18,74 @@ true - + 9 6 - + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 291 + 27 + + + + + + + + &OK + + + true + + + + + + + &Apply + + + true + + + + + + + &Cancel + + + + + + 0 - Main Settings + &Main Settings @@ -85,14 +138,14 @@ - Float + &Float - Inline listing + &Inline listing @@ -142,7 +195,10 @@ - Side: + &Side: + + + numberSideCO @@ -165,7 +221,7 @@ File name of image - Step: + S&tep: false @@ -178,7 +234,7 @@ - Font size: + Font si&ze: false @@ -233,7 +289,7 @@ - First line: + Fi&rst line: false @@ -272,7 +328,7 @@ - Last line: + &Last line: false @@ -318,7 +374,7 @@ Insert a special symbol for a space - &Space as Symbol + S&pace as Symbol 276824147 @@ -344,7 +400,7 @@ - Font style: + Font st&yle: false @@ -381,7 +437,7 @@ - Font size: + F&ont size: false @@ -424,7 +480,7 @@ - Advanced + Ad&vanced @@ -444,7 +500,7 @@ - More Parameters + More &Parameters @@ -494,53 +550,11 @@ - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 101 - 27 - - - - - - - - OK - - - true - - - - - - - Cancel - - - - - okPB + applyPB closePB listingsTW inlineCB @@ -557,8 +571,8 @@ breaklinesCB spaceCB extendedcharsCB - listingsTB listingsED + listingsTB qt_helpers.h