-rw-r--r-- | kabc/addresseeview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 7c70ab1..2691d9a 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -80,49 +80,49 @@ void AddresseeView::printMe() | |||
80 | QPrinter printer; | 80 | QPrinter printer; |
81 | if (!printer.setup() ) | 81 | if (!printer.setup() ) |
82 | return; | 82 | return; |
83 | QPainter p; | 83 | QPainter p; |
84 | p.begin ( &printer ); | 84 | p.begin ( &printer ); |
85 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 85 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); |
86 | float dx, dy; | 86 | float dx, dy; |
87 | int wid = (m.width() * 9)/10; | 87 | int wid = (m.width() * 9)/10; |
88 | dx = (float) wid/(float)contentsWidth (); | 88 | dx = (float) wid/(float)contentsWidth (); |
89 | dy = (float)(m.height()) / (float)contentsHeight (); | 89 | dy = (float)(m.height()) / (float)contentsHeight (); |
90 | float scale; | 90 | float scale; |
91 | // scale to fit the width or height of the paper | 91 | // scale to fit the width or height of the paper |
92 | if ( dx < dy ) | 92 | if ( dx < dy ) |
93 | scale = dx; | 93 | scale = dx; |
94 | else | 94 | else |
95 | scale = dy; | 95 | scale = dy; |
96 | p.translate( m.width()/10,0 ); | 96 | p.translate( m.width()/10,0 ); |
97 | p.scale( scale, scale ); | 97 | p.scale( scale, scale ); |
98 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); | 98 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); |
99 | p.end(); | 99 | p.end(); |
100 | #endif | 100 | #endif |
101 | } | 101 | } |
102 | void AddresseeView::setSource(const QString& n) | 102 | void AddresseeView::setSource(const QString& n) |
103 | { | 103 | { |
104 | qDebug("********AddresseeView::setSource %s", n.latin1()); | 104 | //qDebug("********AddresseeView::setSource %s", n.latin1()); |
105 | 105 | ||
106 | if ( n == "allDetails" ) { | 106 | if ( n == "allDetails" ) { |
107 | sFullDetailsMode = true; | 107 | sFullDetailsMode = true; |
108 | setAddressee( mCurrentContact ); | 108 | setAddressee( mCurrentContact ); |
109 | } else if ( n == "notAllDetails" ) { | 109 | } else if ( n == "notAllDetails" ) { |
110 | sFullDetailsMode = false; | 110 | sFullDetailsMode = false; |
111 | setAddressee( mCurrentContact ); | 111 | setAddressee( mCurrentContact ); |
112 | } else if ( n.left( 6 ) == "mailto" ) | 112 | } else if ( n.left( 6 ) == "mailto" ) |
113 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); | 113 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); |
114 | else if ( n.left( 7 ) == "phoneto" ) | 114 | else if ( n.left( 7 ) == "phoneto" ) |
115 | ExternalAppHandler::instance()->callByPhone( n.mid(8) ); | 115 | ExternalAppHandler::instance()->callByPhone( n.mid(8) ); |
116 | else if ( n.left( 5 ) == "faxto" ) | 116 | else if ( n.left( 5 ) == "faxto" ) |
117 | ExternalAppHandler::instance()->callByFax( n.mid(6) ); | 117 | ExternalAppHandler::instance()->callByFax( n.mid(6) ); |
118 | else if ( n.left( 5 ) == "smsto" ) | 118 | else if ( n.left( 5 ) == "smsto" ) |
119 | ExternalAppHandler::instance()->callBySMS( n.mid(6) ); | 119 | ExternalAppHandler::instance()->callBySMS( n.mid(6) ); |
120 | else if ( n.left( 7 ) == "pagerto" ) | 120 | else if ( n.left( 7 ) == "pagerto" ) |
121 | ExternalAppHandler::instance()->callByPager( n.mid(8) ); | 121 | ExternalAppHandler::instance()->callByPager( n.mid(8) ); |
122 | else if ( n.left( 5 ) == "sipto" ) | 122 | else if ( n.left( 5 ) == "sipto" ) |
123 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); | 123 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); |
124 | 124 | ||
125 | } | 125 | } |
126 | void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) | 126 | void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) |
127 | { | 127 | { |
128 | bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable(); | 128 | bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable(); |