-rw-r--r-- | core/pim/today/today.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index e6f8c93..76bd6de 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -67,49 +67,48 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) | |||
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | setOwnerField(); | 69 | setOwnerField(); |
70 | m_refreshTimer = new QTimer( this ); | 70 | m_refreshTimer = new QTimer( this ); |
71 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 71 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
72 | m_refreshTimer->start( 15000 ); | 72 | m_refreshTimer->start( 15000 ); |
73 | refresh(); | 73 | refresh(); |
74 | showMaximized(); | 74 | showMaximized(); |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Qcop receive method. | 78 | * Qcop receive method. |
79 | */ | 79 | */ |
80 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | 80 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { |
81 | QDataStream stream( data, IO_ReadOnly ); | 81 | QDataStream stream( data, IO_ReadOnly ); |
82 | if ( msg == "message(QString)" ) { | 82 | if ( msg == "message(QString)" ) { |
83 | QString message; | 83 | QString message; |
84 | stream >> message; | 84 | stream >> message; |
85 | setOwnerField( message ); | 85 | setOwnerField( message ); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | void Today::setRefreshTimer( int interval ) { | 89 | void Today::setRefreshTimer( int interval ) { |
90 | 90 | ||
91 | |||
92 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 91 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
93 | 92 | ||
94 | // 0 is "never" case | 93 | // 0 is "never" case |
95 | if ( !interval == 0 ) { | 94 | if ( !interval == 0 ) { |
96 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 95 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
97 | m_refreshTimer->changeInterval( interval ); | 96 | m_refreshTimer->changeInterval( interval ); |
98 | } | 97 | } |
99 | } | 98 | } |
100 | 99 | ||
101 | 100 | ||
102 | /** | 101 | /** |
103 | * Initialises the owner field with the default value, the username | 102 | * Initialises the owner field with the default value, the username |
104 | */ | 103 | */ |
105 | void Today::setOwnerField() { | 104 | void Today::setOwnerField() { |
106 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); | 105 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); |
107 | if ( QFile::exists( file ) ) { | 106 | if ( QFile::exists( file ) ) { |
108 | Contact cont = Contact::readVCard( file )[0]; | 107 | Contact cont = Contact::readVCard( file )[0]; |
109 | QString returnString = cont.fullName(); | 108 | QString returnString = cont.fullName(); |
110 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); | 109 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); |
111 | } else { | 110 | } else { |
112 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); | 111 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); |
113 | } | 112 | } |
114 | } | 113 | } |
115 | 114 | ||