1 #include "calendatprofile.h"
3 #include <QtCore/QSettings>
4 #include <QtCore/QDebug> //Debug pro informace
5 #include <QtGui/QStandardItemModel>
6 #include <QtCore/QVector>
7 #include <QtCore/QVariant>
8 #include <QtGui/QPixmap>
9 #include <QtGui/QItemSelectionModel>
10 #include <QtCore/QDateTime>
11 #include <QtCore/QTimer>
12 #include <QtCore/QTime>
13 #include <QtDBus/QDBusConnection>
16 #include "calendarprofilesdialog.h"
18 static const char* CALENDAR_DBUS_LISTENER_SERVICE = "com.nokia.calendar";
19 static const char* CALENDAR_DBUS_OBJECT_PATH = "/com/nokia/calendar";
20 static const char* CALENDAR_DBUS_LISTENER_SIGNAL = "dbChange";
23 Setup ui, create multiCalendar, set QSettings pointer, create timer and model
25 CalendarProfile::CalendarProfile(QWidget *parent, QSettings *sett) :
28 multiCalendar = CMulticalendar::MCInstance();
30 timer = new QTimer(this);
31 timer->setSingleShot(true);//A single-shot timer fires only once
32 connect(timer,SIGNAL(timeout()),this,SLOT(TimerTimeout()));
33 QDBusConnection::sessionBus().connect( "", CALENDAR_DBUS_OBJECT_PATH, CALENDAR_DBUS_LISTENER_SERVICE,CALENDAR_DBUS_LISTENER_SIGNAL,this,SLOT(calendarTrack(QString)));
38 Slot for signal when db for calendar change
40 void CalendarProfile::calendarTrack(QString str)
42 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << str ;
43 qDeleteAll(vector_of_calendars);
44 vector_of_calendars.clear();
45 profile_Currently = QString("");
46 eventCurrently = QString("");
47 emit s_calendar_profile(profile_Currently);
48 loadCalendarsAndEvents();
53 dbus_message_new_signal ( const char * path,
54 const char * interface,
59 path the path to the object emitting the signal
60 interface the interface the signal is emitted from
61 name name of the signal
64 static const char* CALENDAR_DBUS_LISTENER_SERVICE = "com.nokia.calendar";
65 static const char* CALENDAR_DBUS_OBJECT_PATH = "/com/nokia/calendar";
66 static const char* CALENDAR_DBUS_LISTENER_SIGNAL = "dbChange";
68 dbusMessage = dbus_message_new_signal(CALENDAR_DBUS_OBJECT_PATH,
69 CALENDAR_DBUS_LISTENER_SERVICE,
70 CALENDAR_DBUS_LISTENER_SIGNAL);
73 bool QDBusConnection::connect ( const QString & service, const QString & path, const QString & interface,
74 const QString & name, QObject * receiver, const char * slot )
82 CalendarProfile::~CalendarProfile()
88 slot for timer timeout
90 void CalendarProfile::TimerTimeout()
92 loadCalendarsAndEvents();
98 void CalendarProfile::createModels()
100 model_of_profiles = new QStandardItemModel(this);
101 selModel_profiles = new QItemSelectionModel(model_of_profiles);
102 model_of_calendars = new QStandardItemModel(this);
103 selModel_calendars = new QItemSelectionModel(model_of_calendars);
107 Init start calendar profile class
108 This will download first data from calendar
110 void CalendarProfile::Init()
112 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ ;
113 // setProfiles(list_of_profiles_n); //profile model
114 loadCalendarsAndEvents();
117 /** loadCalendarsAndEvents
119 This will download data from calendar
121 void CalendarProfile::loadCalendarsAndEvents()
125 QDateTime startofday = QDateTime::currentDateTime();
126 startofday.setTime(QTime(0,0)); // time to 0,0
127 startofday = startofday.addDays(-1);
128 QDateTime endofday = QDateTime::currentDateTime();
129 endofday= endofday.addDays(1);
130 endofday.setTime(QTime(23,59)); // time to 23,59
131 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "zacatek" << startofday << "konec" << endofday;
132 vector< CComponent * > components;
133 QVector<CComponent *> vector_of_events;
134 vector < CCalendar * > vector_of_cal_std = multiCalendar->getListCalFromMc();
136 QVector<CCalendar *> qvector_of_cal = QVector< CCalendar *>::fromStdVector(vector_of_cal_std); //
138 if(!qvector_of_cal.empty())
140 foreach(CCalendar * ccal, qvector_of_cal ){
141 //if calendar exist return pointer else create new
142 if(( cal = findCalendar(ccal->getCalendarId())) == NULL)
144 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "judela se novy cal ";
145 cal = new Calendar(this);
146 cal->SetName(QString::fromStdString(ccal->getCalendarName()));
147 vector_of_calendars.append(cal);
148 connect(cal,SIGNAL(s_eventStart(Event*)),this,SLOT(event_start(Event*)));
149 connect(cal,SIGNAL(s_eventStop(Event*)),this,SLOT(event_stop(Event*)));
150 cal->SetIcon(createIcon(ccal->getCalendarColor()));
152 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "ziskaj se eventy kalendar" << QString::fromStdString(ccal->getCalendarName());
153 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "id cal " << ccal->getCalendarId();
154 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "start datum " << startofday;
155 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "end datum " << endofday;
156 components = multiCalendar->getComponents(ccal->getCalendarId(),
157 1, startofday.toTime_t(),
158 endofday.toTime_t(), errorCode);
159 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "err code " << errorCode;
160 vector_of_events = QVector<CComponent *>::fromStdVector(components);
161 if(!vector_of_events.empty()){
162 foreach(CComponent *ccompo, vector_of_events){
163 cal->AddEvent(QString::fromStdString(ccompo->getId()),QString::fromStdString(ccompo->getDescription()),QString::fromStdString(ccompo->getSummary()), QDateTime::fromTime_t(ccompo->getDateStart()),QDateTime::fromTime_t(ccompo->getDateEnd()));
164 qDebug()<< "getId" << QString::fromStdString(ccompo->getId());
165 qDebug()<< " get summary " << QString::fromStdString(ccompo->getSummary());
166 qDebug()<< "getDescription" << QString::fromStdString(ccompo->getDescription());
168 cal->DeleteOldEvents();//delete old events
170 qDebug()<< "Vektor s udalostma je prazdnej ?" ;
172 qDeleteAll( components);
176 multiCalendar->releaseListCalendars(vector_of_cal_std);
178 timer->start(QDateTime::currentDateTime().secsTo(startofday.addDays(2)) * 1000 + 1000);//timer set for next day + 1 sec
183 Create icon fro calendar
184 \param col color from maemo
185 \returns QIcon for calendar
187 QIcon CalendarProfile::createIcon(CalendarColour col)
189 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ ;
190 QPixmap pix_map = QPixmap(40,40);
191 if(col == COLOUR_DARKBLUE)
193 pix_map.fill(QColor("darkblue"));
194 return QIcon(pix_map);
195 }else if( col == COLOUR_DARKGREEN){
196 pix_map.fill(QColor("darkseagreen"));
197 return QIcon(pix_map);
198 }else if( col == COLOUR_DARKRED){
199 pix_map.fill(QColor("darkred"));
200 return QIcon(pix_map);
201 }else if( col == COLOUR_ORANGE){
202 pix_map.fill(QColor("orange"));
203 return QIcon(pix_map);
204 }else if( col == COLOUR_VIOLET){
205 pix_map.fill(QColor("violet"));
206 return QIcon(pix_map);
207 }else if( col == COLOUR_YELLOW){
208 pix_map.fill(QColor("yellow"));
209 return QIcon(pix_map);
210 }else if( col == COLOUR_WHITE){
211 pix_map.fill(QColor("white"));
212 return QIcon(pix_map);
213 }else if( col == COLOUR_BLUE){
214 pix_map.fill(QColor("blue"));
215 return QIcon(pix_map);
216 }else if( col == COLOUR_RED){
217 pix_map.fill(QColor("red"));
218 return QIcon(pix_map);
219 }else if( col == COLOUR_GREEN){
220 pix_map.fill(QColor("green"));
221 return QIcon(pix_map);
223 pix_map.fill(QColor("white"));
224 return QIcon(pix_map);
230 void CalendarProfile::setCalendarModel()
232 model_of_calendars->clear();
234 labels << tr("Name od calendars") ;
235 model_of_calendars->setHorizontalHeaderLabels(labels);
236 QList<QStandardItem *> items;
239 foreach(Calendar *cal, vector_of_calendars){
240 item = new QStandardItem(cal->GetIcon(),cal->GetName());
241 item->setCheckable(true);
243 settings->beginGroup("CalendarProfileClassCalendars");
244 if(settings->value(cal->GetName(), QVariant("0")).toString() == "2"){
246 item->setCheckState(Qt::Checked);
248 settings->endGroup();
250 model_of_calendars->appendRow(items);
257 \param Id Id of calendar
258 \returns poiter to calendar
260 Calendar * CalendarProfile::findCalendar(int Id)
262 qDebug()<< "search for calendar";
263 foreach(Calendar *cal, vector_of_calendars){
264 if(cal->GetId() == Id)
270 //===========================================================================================
272 Set model for profiles
273 \param list_of_profiles_n list of profiles
275 void CalendarProfile::setProfiles(QStringList list_of_profiles_n)
277 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "zavolat se a bude se nastavovat))))))))))))))))))))))))))))))))))))))))))))))))))))))" ;
278 model_of_profiles->clear();//smazu ho
279 QList<QStandardItem *> items;
281 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ ;
282 settings->beginGroup("CalendarProfileClass");
283 foreach(QString profile, list_of_profiles_n)
285 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "set profile" << profile ;
286 item = new QStandardItem(profile);
288 item = new QStandardItem(settings->value(QString("%1%2").arg(profile,"words"), QVariant("")).toString());
290 item = new QStandardItem(settings->value(QString("%1%2").arg(profile,"priority"), QVariant("0")).toString());
291 qDebug() << "novej model priorita" << settings->value(QString("%1%2").arg(profile,"priority"), QVariant("0"));
293 model_of_profiles->appendRow(items);
296 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << settings->value("Novy2priority", 0); ;
297 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << settings->value("Novy2words", "nic") ;
298 settings->endGroup();
301 labels << tr("Name of profile") << tr("Words") << tr("Priority");
302 model_of_profiles->setHorizontalHeaderLabels(labels);
304 profile_Currently = QString("");
305 eventCurrently = QString("");
310 Slot for events start
313 void CalendarProfile::event_start(Event * ev)
316 // i = getProfilePriority(evaluateEvent(ev)); //ziskam prioritu
317 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "profil co zacal je spocitana priorita";
318 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "profil cp ted je " << profile_Currently;
319 // if(i > getProfilePriority(profile_Currently)){
320 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "start event with bigger priority";
329 void CalendarProfile::event_stop(Event* ev)
331 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "event_stop";
332 if(eventCurrently == ev->GetId())
334 profile_Currently = QString("");
335 eventCurrently = QString("");
341 Set profile based on caledars, events and profiles words
343 void CalendarProfile::SetProfile()
345 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "SetProfile";
346 QVector<Event *> vector_ev;
347 QString prof = QString("");
349 settings->beginGroup("CalendarProfileClassCalendars");
350 foreach(Calendar* cal, vector_of_calendars)
352 if(settings->value(cal->GetName(), QVariant("0")).toString() == "2"){
353 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Pro kalendar" << cal->GetName() << "Search for profiles";
354 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Tak co tam ted je" << settings->value(QString("%1").arg(cal->GetId()), QVariant("0")).toString();
356 vector_ev += cal->FindEventsNow();
359 settings->endGroup();
360 profile_Currently = QString("");
361 eventCurrently = QString("");
362 if(vector_ev.empty()){
363 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Found nothing";
365 emit s_calendar_profile(profile_Currently);
370 QString str = evaluateEvent(vector_ev);
373 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Profole for now" << profile_Currently;
374 emit s_calendar_profile(profile_Currently);
378 Method for finding profile for event
381 QString CalendarProfile::evaluateEvent( QVector<Event *> vector_ev)
383 QString profile = QString("");
384 QStringList list_names;
385 int wordscount_old = 0;
386 int wordscount_new = 0;
387 int priority_old = 0;
388 int priority_new = 0;
390 foreach(Event * ev, vector_ev)//forech event
392 for(int i = 0; i < model_of_profiles->rowCount(); i++) //fing best profiel
394 list_names = model_of_profiles->item(i,1)->data(Qt::DisplayRole).toString().split(QRegExp("\\s+"),QString::SkipEmptyParts);
395 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "list of words" << list_names;
396 qDebug() << "pro profil " << model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString() << "jsem našel počet stjeenjch " << wordsCount(list_names,ev->GetSummary()) << "a ma proioritu " << model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
398 wordscount_new = wordsCount(list_names,ev->GetSummary());
399 if(wordscount_new == 0) continue;//pokud nenasel zadan slova pokracuje
400 priority_new = model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
402 if(priority_new > priority_old)
404 qDebug() << "priorita je větsi nez tam byl ";
405 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
406 wordscount_old = wordscount_new;
408 profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
409 profile_Currently = profile;
411 eventCurrently = ev->GetId();
413 priority_old = priority_new;
414 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
415 } else if((priority_new == priority_old) && (wordscount_new > wordscount_old))
417 qDebug() << "stejna prio ale vetsi pocet slov";
418 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
419 wordscount_old = wordscount_new;
421 profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
422 priority_old = priority_new;
423 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
424 profile_Currently = profile;
425 eventCurrently = ev->GetId();
429 qDebug() << "budu vracet profil co se na to hodi:" << profile;
435 void CalendarProfile::SetProfile()
437 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "SetProfile";
438 QVector<Event *> vector_ev;
439 QString prof = QString("");
441 settings->beginGroup("CalendarProfileClassCalendars");
442 foreach(Calendar* cal, vector_of_calendars)
444 if(settings->value(cal->GetName(), QVariant("0")).toString() == "2"){
445 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Pro kalendar" << cal->GetName() << "Search for profiles";
446 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Tak co tam ted je" << settings->value(QString("%1").arg(cal->GetId()), QVariant("0")).toString();
448 vector_ev += cal->FindEventsNow();
451 settings->endGroup();
453 if(vector_ev.empty()){
454 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Found nothing";
455 profile_Currently = QString("");
456 eventCurrently = QString("");
459 foreach(Event * ev, vector_ev)
461 qDebug() << "pro nejakej event evaluate";
462 prof = evaluateEvent(ev);
463 qDebug() << "konec evaluate";
464 if(!profile_Currently.isEmpty())
466 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Profil uz tam ted nastavenej je a to" << profile_Currently;
467 if(getProfilePriority(profile_Currently) < getProfilePriority(prof))
469 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "prof je ted" << prof;
470 profile_Currently = prof;
472 eventCurrently = ev->GetId();
475 profile_Currently = prof;
476 eventCurrently = ev->GetId();
480 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Text:" << "Profole for now" << profile_Currently;
481 emit s_calendar_profile(profile_Currently);
485 QString CalendarProfile::evaluateEvent(Event * ev)
487 QString profile = QString("");
488 QStringList list_names;
489 int wordscount_old = 0;
490 int wordscount_new = 0;
491 int priority_old = 0;
492 int priority_new = 0;
494 for(int i = 0; i < model_of_profiles->rowCount(); i++)
497 list_names = model_of_profiles->item(i,1)->data(Qt::DisplayRole).toString().split(QRegExp("\\s+"),QString::SkipEmptyParts);
498 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "list of words" << list_names;
499 qDebug() << "pro profil " << model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString() << "jsem našel počet stjeenjch " << wordsCount(list_names,ev->GetSummary()) << "a ma proioritu " << model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
501 wordscount_new = wordsCount(list_names,ev->GetSummary());
502 priority_new = model_of_profiles->item(i,2)->data(Qt::DisplayRole).toInt();
504 if(priority_new > priority_old)
506 qDebug() << "priorita je větsi nez tam byl ";
507 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
508 wordscount_old = wordscount_new;
510 profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
511 priority_old = priority_new;
512 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
513 } else if((priority_new == priority_old) && (wordscount_new > wordscount_old))
515 qDebug() << "stejna prio ale vetsi pocet slov";
516 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << wordscount_new;
517 wordscount_old = wordscount_new;
519 profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
520 priority_old = priority_new;
521 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
524 qDebug() << "budu vracet profil co se na to hodi:" << profile;
544 QString CalendarProfile::evaluateEvent(Event * ev)
546 QString profile = QString("");
547 QStringList list_names;
551 for(int i = 0; i < model_of_profiles->rowCount(); i++)
554 list_names = model_of_profiles->item(i,1)->data(Qt::DisplayRole).toString().split(QRegExp("\\s+"),QString::SkipEmptyParts);
555 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "list of words" << list_names;
559 if(((x = wordsCount(list_names,ev->GetSummary())) > ccount) && (model_of_profiles->item(i,2)->data().toInt() >= prio)){
560 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "count is " << x;
563 profile = model_of_profiles->item(i,0)->data(Qt::DisplayRole).toString();
564 prio = getProfilePriority(profile);
565 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "for profil" << profile;
573 /** getProfilePriority
575 \param name_of_profile name of event
577 int CalendarProfile::getProfilePriority(QString name_of_profile)
579 if(name_of_profile.isEmpty()) return 0;
581 ro = model_of_profiles->findItems(name_of_profile).at(0)->row(); // najdu na kterým je to řádku
582 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << " profil " << name_of_profile << "je na řádku" << ro;
583 qDebug() << "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << " profil " << name_of_profile << " jeho prio je " << model_of_profiles->item(ro,2)->data(Qt::DisplayRole).toInt();
584 return model_of_profiles->item(ro,2)->data(Qt::DisplayRole).toInt(); // vratim
588 Return number of words in event summary
589 \param words list of words in profile
590 \param text text in event
592 int CalendarProfile::wordsCount(QStringList words, QString text)
595 foreach(QString word, words)
597 if(text.contains(word,Qt::CaseInsensitive)) ++count;
599 qDebug()<< "In file:" << __FILE__ << ":" << "on line:" << __LINE__ << " in function:" << __FUNCTION__ << "Pocet slov:" << count << "v textu" << text << "slova co se maj najit" << words;
603 //===========================================================================
605 For dialog for modifi calendars and profiles
607 void CalendarProfile::ShowDialog()
609 CalendarProfilesDialog dialog(this);
610 dialog.SetViews(model_of_profiles,selModel_profiles,model_of_calendars,selModel_calendars);
611 dialog.SetSettings(settings);
612 connect(&dialog,SIGNAL(s_change_calendars()),this,SLOT(ChangeInCalendarsCheck()));
614 disconnect(&dialog,SIGNAL(s_change_calendars()),this,SLOT(ChangeInCalendarsCheck()));
617 /** ChangeInCalendarsCheck
618 Slot for chnages in calendars check
620 void CalendarProfile::ChangeInCalendarsCheck()