void
ExtDatePicker::dateChangedSlot(const ExtDate &date)
{
- kDebug(298) << "ExtDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
+ kDebug(298) << "ExtDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ").";
//must remain commented unless ExtDate gets added to kdelibs
void
ExtDatePicker::tableClickedSlot()
{
- kDebug(298) << "ExtDatePicker::tableClickedSlot: table clicked." << endl;
+ kDebug(298) << "ExtDatePicker::tableClickedSlot: table clicked.";
emit(dateSelected(table->getDate()));
emit(tableClicked());
}
}
else
{
- kDebug(298) << "ExtDatePicker::setDate: refusing to set invalid date." << endl;
+ kDebug(298) << "ExtDatePicker::setDate: refusing to set invalid date.";
return false;
}
}
// -----
if(val->date(line->text(), temp)==QValidator::Acceptable)
{
- kDebug(298) << "ExtDatePicker::lineEnterPressed: valid date entered." << endl;
+ kDebug(298) << "ExtDatePicker::lineEnterPressed: valid date entered.";
emit(dateEntered(temp));
setDate(temp);
} else {
KNotification::beep();
- kDebug(298) << "ExtDatePicker::lineEnterPressed: invalid date entered." << endl;
+ kDebug(298) << "ExtDatePicker::lineEnterPressed: invalid date entered.";
}
}
setFontSize(10);
if(!date_.isValid())
{
- kDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
+ kDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date.";
date_=ExtDate::currentDate();
}
setFocusPolicy( Qt::StrongFocus );
// -----
if(!date_.isValid())
{
- kDebug() << "ExtDateTable::setDate: refusing to set invalid date." << endl;
+ kDebug() << "ExtDateTable::setDate: refusing to set invalid date.";
return false;
}
if(date!=date_)
d->calendar->setYMD(temp, d->calendar->year(date), d->calendar->month(date), 1);
//temp.setYMD(date.year(), date.month(), 1);
- //kDebug() << "firstDayInWeek: " << temp.toString() << endl;
+ //kDebug() << "firstDayInWeek: " << temp.toString();
firstday=temp.dayOfWeek();
numdays=d->calendar->daysInMonth(date);
return QSize(maxCell.width()*numCols()+2*frameWidth(),
(maxCell.height()+2)*numRows()+2*frameWidth());
} else {
- kDebug() << "ExtDateTable::sizeHint: obscure failure - " << endl;
+ kDebug() << "ExtDateTable::sizeHint: obscure failure - ";
return QSize(-1, -1);
}
}
\code
ExtDateTime dt = ExtDateTime::currentDateTime();
ExtDateTime xmas( ExtDate(dt.date().year(),12,24), QTime(17,00) );
- kDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas" << endl;
+ kDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas";
\endcode
\sa addSecs(), daysTo(), QTime::secsTo()
lineEdit()->setSelection( iStart, iLength );
// //DEBUG
-// kDebug() << "selected text: " << lineEdit()->selectedText() << endl;
+// kDebug() << "selected text: " << lineEdit()->selectedText();
}
if ( c == 'Y' ) NewField = 2;
// //DEBUG
-// kDebug() << pos << " " << c << " " << NewField << endl;
+// kDebug() << pos << " " << c << " " << NewField;
}
void ExtDateEdit::focusInEvent( QFocusEvent *e ) {
// //DEBUG
-// kDebug() << "focusInEvent()" << endl;
+// kDebug() << "focusInEvent()";
QSpinBox::focusInEvent(e);
highlightActiveField();
void edLineEdit::mouseReleaseEvent( QMouseEvent * ) {
// //DEBUG
-// kDebug() << "mousePressEvent()" << endl;
+// kDebug() << "mousePressEvent()";
//assumes no prefix/suffix!
QString sdf = edParent->simpleDateFormat();
else if ( c == 'Y' ) edParent->setActiveField( 2 );
// //DEBUG
-// kDebug() << "ActiveField = " << edParent->activeField() << endl;
+// kDebug() << "ActiveField = " << edParent->activeField();
edParent->highlightActiveField();
}
void edLineEdit::keyPressEvent( QKeyEvent *e ) {
// //DEBUG
-// kDebug() << "keyPressEvent()" << endl;
+// kDebug() << "keyPressEvent()";
switch ( e->key() ) {
case Qt::Key_Up:
EDTEdit::~EDTEdit() {
//Output current date setting on exit
- kDebug() << "ExDateEdit: " << ed->date().toString() << endl;
- kDebug() << "ExDateTimeEdit: " << edt->date().toString() << endl;
+ kDebug() << "ExDateEdit: " << ed->date().toString();
+ kDebug() << "ExDateTimeEdit: " << edt->date().toString();
}
#include "edtedit_widget.moc"
void KEduVocDocument::merge(KEduVocDocument *docToMerge, bool matchIdentifiers)
{
- kDebug() << "Merging of docs is not implemented" << endl; /// @todo IMPLEMENT ME
+ kDebug() << "Merging of docs is not implemented"; /// @todo IMPLEMENT ME
/*
if (docToMerge) {
QApplication::setOverrideCursor(Qt::WaitCursor);
int KEduVocDocument::appendIdentifier(const QString & id)
{
d->m_identifiers.append(id);
- kDebug() << "appending identifier" << id << endl;
+ kDebug() << "appending identifier" << id;
return d->m_identifiers.size() - 1;
}
return;
if (index == 0) {
- kDebug() << "Warning - attempting to use removeTranslation(0) to remove the first translation!" << endl;
+ kDebug() << "Warning - attempting to use removeTranslation(0) to remove the first translation!";
// This will only work when we get everything moved into a translation class.
d->m_translations[0] = "";
return;
for (int i = 0; i < entryList.count(); ++i) {
-//kDebug() << "KEduVocKvtmlReader::readArticle() read " << entryList.count() << " articles. " << endl;
+//kDebug() << "KEduVocKvtmlReader::readArticle() read " << entryList.count() << " articles. ";
currentElement = entryList.item(i).toElement();
if (currentElement.parentNode() == domElementParent) {
QString lang;
else
lang = "original";
m_doc->appendIdentifier(lang);
-//kDebug() << " Identifier " << i << " is " << lang << endl;
+//kDebug() << " Identifier " << i << " is " << lang;
}
else
{
q_trans = lang;
}
-//kDebug() << " TranslationList.count(): " << translationList.count() << " Entry count: " << m_doc->entryCount() << endl;
+//kDebug() << " TranslationList.count(): " << translationList.count() << " Entry count: " << m_doc->entryCount();
if (m_doc->entryCount() == 0) { // this is because in kvtml the languages are saved in the FIRST ENTRY ONLY.
-//kDebug() << " Read Expression with identifiers: " << lang << endl;
+//kDebug() << " Read Expression with identifiers: " << lang;
// new translation
if (lang.isEmpty()) {
if (i == 0) {
expr.translation(i).gradeFrom(0).setQueryDate(qdate);
expr.translation(0).gradeFrom(i).setQueryDate(r_qdate);
}
-//kDebug() << "KEduVocKvtmlReader::readExpression(): id: " << i << " translation: " << textstr << endl;
+//kDebug() << "KEduVocKvtmlReader::readExpression(): id: " << i << " translation: " << textstr;
// Next translation
currentElement = currentElement.nextSiblingElement(KV_TRANS);
KEduVocTranslationPrivate () // ( KEduVocTranslation* qq )
//: q ( qq )
{
- kDebug() << "KEduVocTranslationPrivate()" <<endl;
+ kDebug() << "KEduVocTranslationPrivate()";
init();
}
/*
void KEduVocTranslation::KEduVocTranslationPrivate::init()
{
-kDebug() << "KEduVocTranslation::KEduVocTranslationPrivate::init()" << endl;
+kDebug() << "KEduVocTranslation::KEduVocTranslationPrivate::init()";
m_translation = QString();
}
*/
/*
void KEduVocTranslation::KEduVocTranslationPrivate::operator= ( const KEduVocTranslation::KEduVocTranslationPrivate &p )
{
- kDebug() << "KEduVocTranslation::KEduVocTranslationPrivate::operator=" << endl;
+ kDebug() << "KEduVocTranslation::KEduVocTranslationPrivate::operator=";
}
*/
void LeitnerSystemView::mousePressEvent(QMouseEvent* e)
{
- kDebug() << "mouseClick" << endl;
+ kDebug() << "mouseClick";
//if the user has clicked into a box
if( e->y() > d->m_imageY && e->y() < d->m_imageY + 64 && e->x() < width() )
{
KUrl outfile(arguments->url(1));
KEduVocDocument document;
- kDebug() << "Reading " << infile << endl;
+ kDebug() << "Reading " << infile;
document.open(infile);
- kDebug() << "Writing to " << outfile << endl;
+ kDebug() << "Writing to " << outfile;
document.saveAs(outfile, KEduVocDocument::kvtml, "converter");
}
}
if ( !layoutFile.exists() )
{
- kDebug() << "no such file: " << layoutFile.fileName() << endl;
+ kDebug() << "no such file: " << layoutFile.fileName();
return false;
}
// check if document is well-formed
if ( !Document.setContent( &layoutFile ) )
{
- kDebug() << "wrong xml of " << layoutFile.fileName() << endl;
+ kDebug() << "wrong xml of " << layoutFile.fileName();
layoutFile.close();
return false;
}
{
if ( attrs.localName( i ) == "units" )
{
- //kDebug() << "value of the unit: " << attrs.value(i) << endl;
+ //kDebug() << "value of the unit: " << attrs.value(i);
d->currentUnit = ChemicalDataObject::unit( attrs.value( i ) );
- //kDebug() << "Took " << d->currentUnit << endl;
+ //kDebug() << "Took " << d->currentUnit;
continue;
}
bool IsotopeParser::startElement(const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs)
{
-//X kDebug() << "IsotopeParser::startElement()" << endl;
+//X kDebug() << "IsotopeParser::startElement()";
if (localName == "isotopeList")
{
d->inElement = true;
if ( attrs.localName( i ) == "id" )
d->currentElementSymbol = attrs.value( i );
-//X kDebug() << "Symbol of the current Element: " << attrs.value( i ) << endl;
+//X kDebug() << "Symbol of the current Element: " << attrs.value( i );
}
} else if ( d->inElement && localName == "isotope")
{
-//X kDebug() << "setting inIsotope true!" << endl;
+//X kDebug() << "setting inIsotope true!";
d->currentIsotope = new Isotope();
d->currentIsotope->addData( ChemicalDataObject( QVariant( d->currentElementSymbol ), ChemicalDataObject::symbol ) );
d->inIsotope = true;
if ( attrs.localName( i ) == "number" )
{
d->currentIsotope->setNucleons( attrs.value( i ).toInt() );
-//X kDebug() << attrs.value( i ).toInt() << endl;
+//X kDebug() << attrs.value( i ).toInt();
}
}
} else if (d->inIsotope && localName == "scalar")
bool IsotopeParser::endElement( const QString&, const QString& localName, const QString& )
{
-//X kDebug() << "IsotopeParser::endElement()" << endl;
+//X kDebug() << "IsotopeParser::endElement()";
if ( localName == "isotope" )
{
d->isotopes.append(d->currentIsotope);
}
else if ( localName == "isotopeList" )
{//a new list of isotopes start...
-//X kDebug() << "setting d->inElement FALSE" << endl;
+//X kDebug() << "setting d->inElement FALSE";
d->inElement = false;
}
bool IsotopeParser::characters(const QString &ch)
{
-//X kDebug() << "IsotopeParser::characters() with ch: " << ch << endl;
+//X kDebug() << "IsotopeParser::characters() with ch: " << ch;
d->currentDataObject = ChemicalDataObject();
ChemicalDataObject::BlueObelisk type;
QVariant value;
*_resultMass = 0.0;
_resultMap->clear();
while (parseTerm(&subMass, &subMap)) {
- //kDebug() << "Parsed a term, weight = " << subresult << endl;
+ //kDebug() << "Parsed a term, weight = " << subresult;
// Add the mass and composition of the submolecule to the total.
*_resultMass += subMass;
_resultMap->clear();
if (nextToken() == ELEMENT_TOKEN) {
- //kDebug() << "Parsed an element: " << m_elementVal->symbol() << endl;
+ //kDebug() << "Parsed an element: " << m_elementVal->symbol();
*_resultMass = m_elementVal->dataAsVariant( ChemicalDataObject::mass ).toDouble();
_resultMap->add(m_elementVal, 1);
// Must end in a ")".
if (nextToken() == ')') {
- //kDebug() << "Parsed a submolecule. weight = " << *_result << endl;
+ //kDebug() << "Parsed a submolecule. weight = " << *_result;
getNextToken();
}
else
// Optional number.
if (nextToken() == INT_TOKEN) {
- //kDebug() << "Parsed a number: " << intVal() << endl;
+ //kDebug() << "Parsed a number: " << intVal();
*_resultMass *= intVal();
_resultMap->multiply(intVal());
getNextToken();
}
- kDebug() << "Weight of term = " << *_resultMass << endl;
+ kDebug() << "Weight of term = " << *_resultMass;
return true;
}
Element *
MoleculeParser::lookupElement( const QString& _name )
{
- kDebug() << "looking up " << _name << endl;
+ kDebug() << "looking up " << _name;
foreach( Element* e, m_elementList ){
if ( e->dataAsVariant(ChemicalDataObject::symbol) == _name ) {
- kDebug() << "Found element " << _name << endl;
+ kDebug() << "Found element " << _name;
return e;
}
}
//if there is an error make m_error true.
m_error = true;
- kDebug() << k_funcinfo << "no such element, parsing error!: " << _name << endl;
+ kDebug() << k_funcinfo << "no such element, parsing error!: " << _name;
return NULL;
}
int
Parser::getNextChar()
{
-// kDebug() << "Parser::getNextChar(): char = " << m_nextChar << endl;
-// kDebug() << "m_str.size() " << m_str.size() << " with m_str: " << m_str << " and m_index: " << m_index << endl;
+// kDebug() << "Parser::getNextChar(): char = " << m_nextChar;
+// kDebug() << "m_str.size() " << m_str.size() << " with m_str: " << m_str << " and m_index: " << m_index;
m_index++;
QList<Isotope*> v = parser->getIsotopes();
- kDebug() << "Found " << v.count() << " isotopes." << endl;;
+ kDebug() << "Found " << v.count() << " isotopes.";;
- kDebug() << "As a test I am now issuing all isotopes with 50 nuclueons: " << endl;
+ kDebug() << "As a test I am now issuing all isotopes with 50 nuclueons: ";
foreach( Isotope* i, v ){
if ( i )
{
if (i->nucleons() == 50 )
- kDebug() << " Isotope of " << i->parentElementSymbol() << " with a mass of " << i->mass() << endl;
+ kDebug() << " Isotope of " << i->parentElementSymbol() << " with a mass of " << i->mass();
}
}
QString unit = o.unitAsString();
if ( unit == "bo:noUnit" )
unit = "";
- kDebug() << "Name: " << o.dictRef() << " " << o.valueAsString() <<" " << unit << endl;
+ kDebug() << "Name: " << o.dictRef() << " " << o.valueAsString() <<" " << unit;
}
}
}