[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/kraft/src
From: Thomas Richard <thomas.richard () proan ! be>
Date: 2009-11-30 21:49:02
Message-ID: 1259617742.600312.29802.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1056801 by trichard:
-Removed undo button in prefsdialog (not needed)
-Made the timestamp of archived documents work again
M +2 -1 archiveman.cpp
M +3 -1 documentman.cpp
M +0 -20 prefsdialog.cpp
M +0 -3 prefsdialog.h
--- trunk/playground/office/kraft/src/archiveman.cpp #1056800:1056801
@@ -183,7 +183,7 @@
record->setValue( "clientUid", doc->addressUid() );
record->setValue( "salut", doc->salut() );
record->setValue( "goodbye", doc->goodbye() );
- // record->setValue( "printDate", "NOW()" );
+ record->setValue( "printDate", QDateTime::currentDateTime().toTime_t () );
record->setValue( "date", doc->date() );
record->setValue( "pretext", KraftDB::self()->mysqlEuroEncode(doc->preText() ) \
);
record->setValue( "posttext", KraftDB::self()->mysqlEuroEncode(doc->postText() ) \
); @@ -193,6 +193,7 @@
record->setValue( "tax", DocumentMan::self()->tax( doc->date() ) );
record->setValue( "reducedTax", DocumentMan::self()->reducedTax( doc->date() ) \
); cur.insert();
+ kDebug() <<cur.lastQuery();
dbID id = KraftDB::self()->getLastInsertID();
archivePos( id.toInt(), doc );
--- trunk/playground/office/kraft/src/documentman.cpp #1056800:1056801
@@ -89,7 +89,9 @@
archCur.select( "ident='" + ident +"'" );
while ( archCur.next() ) {
int id = archCur.value( "archDocID" ).toInt();
- QDateTime dt = archCur.value( "printDate" ).toDateTime();
+ unsigned int timestamp = archCur.value( "printDate").toUInt();
+ QDateTime dt;
+ dt.setTime_t(timestamp);
int state = archCur.value( "state" ).toInt();
dig.addArchDocDigest( ArchDocDigest( dt, state, ident, id ) );
}
--- trunk/playground/office/kraft/src/prefsdialog.cpp #1056800:1056801
@@ -177,8 +177,6 @@
mTaxModel->setHeaderData(2, Qt::Horizontal, tr("Reduced Tax [%]"));
mTaxModel->setHeaderData(3, Qt::Horizontal, tr("Start Date"));
- connect(mTaxModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, \
SLOT(slotTaxDataChanged(QModelIndex,QModelIndex)));
-
mTaxTreeView = new ImpTreeView;
vboxLay->addWidget( mTaxTreeView );
mTaxTreeView->setModel(mTaxModel);
@@ -196,11 +194,6 @@
QHBoxLayout *butLay = new QHBoxLayout;
butLay->addStretch( 1 );
- mUndoTax = new KPushButton( KIcon("edit-undo"), i18n( "Undo changes" ));
- mUndoTax->setEnabled(false);
- connect( mUndoTax, SIGNAL( clicked() ), SLOT( slotUndoTax() ) );
- butLay->addWidget( mUndoTax );
-
KPushButton *but = new KPushButton( KIcon("list-add"), i18n( "Add" ));
connect( but, SIGNAL( clicked() ), SLOT( slotAddTax() ) );
butLay->addWidget( but );
@@ -227,22 +220,9 @@
int row = mTaxTreeView->currentIndex().row();
//mTaxTreeView->setRowHidden( row, mTaxTreeView->rootIndex(), true );
mTaxModel->removeRows(row, 1);
- slotTaxDataChanged(QModelIndex(), QModelIndex());
}
}
-void PrefsDialog::slotUndoTax()
-{
- mTaxModel->revertAll();
- mTaxTreeView->unhideRows();
- mUndoTax->setEnabled(false);
-}
-
-void PrefsDialog::slotTaxDataChanged(QModelIndex,QModelIndex)
-{
- mUndoTax->setEnabled(true);
-}
-
void PrefsDialog::slotTaxSelected(QModelIndex)
{
bool state = false;
--- trunk/playground/office/kraft/src/prefsdialog.h #1056800:1056801
@@ -60,8 +60,6 @@
void slotAddTax();
void slotDeleteTax();
- void slotUndoTax();
- void slotTaxDataChanged(QModelIndex,QModelIndex);
void slotTaxSelected(QModelIndex);
void slotDocTypeRemoved( const QString& );
@@ -88,7 +86,6 @@
DocTypeEdit *mDocTypeEdit;
QPushButton *mDelTax;
- QPushButton *mUndoTax;
ImpTreeView *mTaxTreeView;
QSqlTableModel *mTaxModel;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic