Пример #1
0
void Prueba::addToDo(CalendarToDo *todo)
{
    listToDos.append(todo);
    KCalCore::Todo::Ptr td(todo->get_object());
    _calendar->addTodo(td);
    emit todosChanged();
}
Пример #2
0
void MainWindow::timerEvent(QTimerEvent *event)
{
  if( event->timerId() == dateCheckTimer ){
    if( *curDate != QDate::currentDate() ){
      qDebug() << "dawn of a new day...";
      model->resetAllTodo( model->getAllTodo() );
      todosChanged();
      *curDate = QDate::currentDate();
    }
  }
}
Пример #3
0
MainWindow::MainWindow( SysTray* _systray, QWidget* parent )
  : KXmlGuiWindow(parent, Qt::Window ),
  systray(_systray)
{
  move( Settings::self()->getPosition() );
  resize( Settings::self()->getSize() );
  
  Settings::self();
  configDialog = 0;
  setupGui();
  if( !Settings::self()->getStartInTray() && !Settings::self()->getAlwaysStartInTray() ){
    show();
  }
  
  curDate = new QDate(QDate::currentDate());
  dateCheckTimer = startTimer(60*1000);
  
  model->resetAllTodo( Settings::self()->getTodoList() );
  view->expandAll();
  todosChanged();
  connect( model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(expandSections(QModelIndex,QModelIndex)) );
  connect( model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(todosChanged()) );
  connect( Settings::self(), SIGNAL(sigConfigChanged()), this, SLOT(configChanged()) );
}