[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/kraft/src
From: Klaas Freitag <freitag () suse ! de>
Date: 2007-02-26 20:33:16
Message-ID: 1172521996.749810.23742.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 637559 by freitag:
store size of templ-to-pos dialogs
M +6 -4 kraftsettings.kcfg
M +19 -0 kraftview.cpp
--- trunk/playground/office/kraft/src/kraftsettings.kcfg #637558:637559
@@ -31,6 +31,12 @@
<entry name="assistantSplitterSetting" type="IntList">
<label>The splitter setting for the the doc assistant</label>
</entry>
+ <entry name="plantTemplateToPosDialogSize" type="Size">
+ <label>The window size of the template to document dialog for plants</label>
+ </entry>
+ <entry name="templateToPosDialogSize" type="Size">
+ <label>The window size of the template to document dialog</label>
+ </entry>
</group>
<group name="material">
<entry name="materialAddOnPercent" type="Double">
@@ -42,10 +48,6 @@
</entry>
</group>
<group name="reporting">
- <entry name="NCReportBinary">
- <label>The complete filename of the NCReport binary</label>
- <default>ncreport</default>
- </entry>
<entry name="Trml2PdfBinary">
<label>The complete filename of the trml2pdf binary</label>
<default>trml2pdf</default>
--- trunk/playground/office/kraft/src/kraftview.cpp #637558:637559
@@ -751,6 +751,8 @@
TemplToPositionDialogBase *dia = 0;
DocPosition *dp = new DocPosition();
+ QSize s;
+
if ( tmpl && kat ) {
if ( kat->type() == TemplateCatalog ) {
FloskelTemplate *ftmpl = static_cast<FloskelTemplate*>( tmpl );
@@ -758,6 +760,8 @@
dp->setUnit( ftmpl->einheit() );
dp->setUnitPrice( ftmpl->einheitsPreis() );
dia = new InsertTemplDialog( this );
+ s = KraftSettings::self()->templateToPosDialogSize();
+
} else if ( kat->type() == MaterialCatalog ) {
StockMaterial *mat = static_cast<StockMaterial*>( tmpl );
dp->setText( mat->name() );
@@ -765,11 +769,14 @@
dp->setUnitPrice( mat->salesPrice() );
dia = new InsertTemplDialog( this );
+ s = KraftSettings::self()->templateToPosDialogSize();
+
} else if ( kat->type() == PlantCatalog ) {
BrunsRecord *bruns = static_cast<BrunsRecord*>( tmpl );
dia = new InsertPlantDialog( this );
InsertPlantDialog *plantDia = static_cast<InsertPlantDialog*>( dia );
plantDia->setSelectedPlant( bruns );
+ s = KraftSettings::self()->plantTemplateToPosDialogSize();
}
}
@@ -782,6 +789,8 @@
dia->setPositionList( currentPositionList(), newpos );
+ dia->setInitialSize( s );
+
if ( dia->exec() ) {
*dp = dia->docPosition();
// The database ids for the calculations have to be wiped out
@@ -789,6 +798,16 @@
// the document calculation info they have to go to the
// doc calculation tables with new ids
+ // store the initial size of the template-to-doc-pos dialogs
+ s = dia->size();
+ if ( kat->type() == PlantCatalog ) {
+ KraftSettings::self()->setPlantTemplateToPosDialogSize( s );
+ } else {
+ KraftSettings::self()->setTemplateToPosDialogSize( s );
+ }
+ KraftSettings::self()->writeConfig();
+
+ kdDebug() << "The finish size is " << s << endl;
newpos = dia->insertAfterPosition();
mRememberAmount = dp->amount();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic