37 #include <tdelocale.h>
57 kdDebug() <<
"konsolekalendarchange.cpp::changeEvent()" << endl;
62 Event *
event = m_variables->getCalendar()->event( m_variables->getUID() );
64 if ( m_variables->isDryRun() ) {
65 cout << i18n(
"Change Event <Dry Run>:" ).local8Bit().data()
69 cout << i18n(
"To Event <Dry Run>:" ).local8Bit().data()
73 kdDebug() <<
"konsolekalendarchange.cpp:changeEvent() : "
74 << m_variables->getUID().local8Bit()
77 if ( m_variables->isVerbose() ) {
78 cout << i18n(
"Change Event <Verbose>:" ).local8Bit().data()
82 cout << i18n(
"To Event <Dry Run>:" ).local8Bit().data()
87 if ( m_variables->isStartDateTime() ) {
88 event->setDtStart( m_variables->getStartDateTime() );
91 if ( m_variables->isEndDateTime() ) {
92 event->setDtEnd( m_variables->getEndDateTime() );
95 event->setFloats( m_variables->getFloating() );
97 if ( m_variables->isSummary() ) {
98 event->setSummary( m_variables->getSummary() );
101 if ( m_variables->isDescription() ) {
102 event->setDescription( m_variables->getDescription() );
105 if ( m_variables->isLocation() ) {
106 event->setLocation( m_variables->getLocation() );
109 if ( m_variables->getCalendar()->addEvent( event ) ) {
110 cout << i18n(
"Success: \"%1\" changed" )
111 .arg( event->summary() ).local8Bit().data()
114 m_variables->getCalendar()->save();
117 cout << i18n(
"Failure: \"%1\" not changed" )
118 .arg( event->summary() ).local8Bit().data()
124 kdDebug() <<
"konsolekalendarchange.cpp::changeEvent() | Done " << endl;
128 void KonsoleKalendarChange::printSpecs( Event *event )
130 cout << i18n(
" UID: %1" ).
131 arg( event->uid() ).local8Bit().data()
134 cout << i18n(
" What: %1" ).
135 arg( event->summary() ).local8Bit().data()
138 cout << i18n(
" Begin: %1" ).
139 arg( event->dtStart().toString( TQt::TextDate ) ).local8Bit().data()
142 cout << i18n(
" End: %1" ).
143 arg( event->dtEnd().toString( TQt::TextDate ) ).local8Bit().data()
146 cout << i18n(
" Desc: %1" ).
147 arg( event->description() ).local8Bit().data()
150 cout << i18n(
" Location: %1" ).
151 arg( event->location() ).local8Bit().data()
155 void KonsoleKalendarChange::printSpecs()
157 cout << i18n(
" UID: %1" ).
158 arg( m_variables->getUID() ).local8Bit().data()
161 cout << i18n(
" What: %1" ).
162 arg( m_variables->getSummary() ).local8Bit().data()
165 cout << i18n(
" Begin: %1" ).
166 arg( m_variables->getStartDateTime().toString( TQt::TextDate ) ).local8Bit().data()
169 cout << i18n(
" End: %1" ).
170 arg( m_variables->getEndDateTime().toString( TQt::TextDate ) ).local8Bit().data()
173 cout << i18n(
" Desc: %1" ).
174 arg( m_variables->getDescription() ).local8Bit().data()
177 cout << i18n(
" Location: %1" ).
178 arg( m_variables->getLocation() ).local8Bit().data()
~KonsoleKalendarChange()
Destructor.
KonsoleKalendarChange(KonsoleKalendarVariables *vars)
Constructs a KonsoleKalendarChange object from command line arguments.
bool changeEvent()
Modify the Event.
This class provides all the variables for the program.
Provides the KonsoleKalendarChange class definition.