summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
authorzautrix <zautrix>2005-04-17 14:27:55 (UTC)
committer zautrix <zautrix>2005-04-17 14:27:55 (UTC)
commitb411ec2d8961d07c3e2e9aefc9e04322b7851859 (patch) (side-by-side diff)
tree79e2a70f1ad32562456b0bfa03aa2b916095fbb0 /korganizer/koeventviewer.cpp
parent2d81c75c4ffb8f144ae58e90e68496500d07a19e (diff)
downloadkdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.zip
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.gz
kdepimpi-b411ec2d8961d07c3e2e9aefc9e04322b7851859.tar.bz2
qdebugcleanup
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index fefc778..f39b5e1 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -78,51 +78,49 @@ void KOEventViewer::printMe()
KOPrintPrefs pp ( this );
if (!pp.exec() )
return;
int scaleval = pp.printMode() ;
QPrinter printer;
if (!printer.setup() )
return;
QPainter p;
p.begin ( &printer );
QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
if ( dx < dy )
scale = dx;
else
scale = dy;
p.translate( m.width()/10,0 );
- qDebug("Scale: %f ", scale );
if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
- qDebug("SCALE ");
p.scale( scale, scale );
}
drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
p.end();
#endif
}
void KOEventViewer::setSource(const QString& n)
{
if ( n.left(3) == "uid" )
#ifdef DESKTOP_VERSION
{
KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
KABC::AddressBook::Iterator it;
for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
// LR I do not understand, why the uid string is different on zaurus and desktop
QString uid = "uid://"+(*it).uid();
//qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
if (n == uid ) {
//qDebug("found %s ",(*it).mobileHomePhone().latin1() );
QDialog dia( this,"dia123", true );
dia.setCaption( i18n("Details of attendee") );
@@ -146,53 +144,51 @@ void KOEventViewer::setSource(const QString& n)
if ( "uid:organizer" == n ) {
ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
return;
}
QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
if (attendees.count()) {
Attendee *a;
for(a=attendees.first();a;a=attendees.next()) {
if ( "uid:"+a->uid() == n ) {
bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
return;
}
}
}
return;
}
//requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
// the result should now arrive through method insertAttendees
//QString uid = "uid:"+(*it).uid();
#endif
if ( n.left(6) == "mailto" ) {
// qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
#ifndef DESKTOP_VERSION
if ( n.mid(7,3) == "ALL" ) {
- qDebug("all ");
mailToAttendees( true );
} else if ( n.mid(7,4) == "RSVP" ) {
mailToAttendees( false );
- qDebug("rsvp ");
} else {
QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
e << n.mid(7);
}
#endif
}
#ifndef KORG_NODCOP
kdDebug() << "KOEventViewer::setSource(): " << n << endl;
QString tmpStr;
if (n.startsWith("mailto:")) {
KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
//emit showIncidence(n);
return;
} else if (n.startsWith("uid:")) {
DCOPClient *client = KApplication::kApplication()->dcopClient();
const QByteArray noParamData;
const QByteArray paramData;
QByteArray replyData;
QCString replyTypeStr;
#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
bool foundAbbrowser = PING_ABBROWSER;