コード例 #1
0
ファイル: koviewmanager.cpp プロジェクト: serghei/kde3-kdepim
void KOViewManager::connectTodoView(KOTodoView *todoView)
{
    if(!todoView) return;

    // SIGNALS/SLOTS FOR TODO VIEW
    connect(todoView, SIGNAL(purgeCompletedSignal()),
            mMainView, SLOT(purgeCompleted()));
    connect(todoView, SIGNAL(unSubTodoSignal()),
            mMainView, SLOT(todo_unsub()));
    connect(todoView, SIGNAL(unAllSubTodoSignal()),
            mMainView, SLOT(makeSubTodosIndependents()));
}
コード例 #2
0
void KOViewManager::connectTodoView( KOTodoView *todoView )
{
    if ( !todoView ) {
        return;
    }

    // SIGNALS/SLOTS FOR TODO VIEW
    connect( todoView, SIGNAL(purgeCompletedSignal()),
             mMainView, SLOT(purgeCompleted()) );
    connect( todoView, SIGNAL(unSubTodoSignal()),
             mMainView, SLOT(todo_unsub()) );
    connect( todoView, SIGNAL(unAllSubTodoSignal()),
             mMainView, SLOT(makeSubTodosIndependents()) );
    connect( mMainView, SIGNAL(categoryConfigChanged()),
             todoView, SLOT(updateCategories()) );
}
コード例 #3
0
ファイル: todoview.cpp プロジェクト: kthxbyte/KDE1-Linaro
TodoView::TodoView(CalObject *cal, QWidget *parent, const char *name)
    : KTabListBox(parent, name, 5)
{
  calendar = cal;
  // set up filter for events
  lbox.installEventFilter(this);
  // set up the widget to have 4 columns (one hidden), and
  // only a vertical scrollbar
  clearTableFlags(Tbl_hScrollBar);
  clearTableFlags(Tbl_autoHScrollBar);
  // BL: autoscrollbar in not working...
  setTableFlags(Tbl_hScrollBar);
  setAutoUpdate(TRUE);
  adjustColumns();
  // insert pictures for use to show a checked/not checked todo
  dict().insert("CHECKED", new QPixmap(Icon("checkedbox.xpm")));
  dict().insert("EMPTY", new QPixmap(Icon("emptybox.xpm")));
  dict().insert("CHECKEDMASK", new QPixmap(Icon("checkedbox-mask.xpm")));
  dict().insert("EMPTYMASK", new QPixmap(Icon("emptybox-mask.xpm")));

  // this is the thing that lets you edit the todo text.
  editor = new QLineEdit(this);
  editor->hide();
  connect(editor, SIGNAL(returnPressed()),
	  this, SLOT(updateSummary()));
  connect(editor, SIGNAL(returnPressed()),
	  editor, SLOT(hide()));
  connect(editor, SIGNAL(textChanged(const char *)),
	  this, SLOT(changeSummary(const char *)));
  
  connect(this, SIGNAL(selected(int, int)),
    	  this, SLOT(updateItem(int, int)));
  connect(this, SIGNAL(highlighted(int, int)),
	  this, SLOT(hiliteAction(int, int)));

  priList = new QListBox(this);
  priList->hide();
  priList->insertItem("1");
  priList->insertItem("2");
  priList->insertItem("3");
  priList->insertItem("4");
  priList->insertItem("5");
  priList->setFixedHeight(priList->itemHeight()*5+5);
  priList->setFixedWidth(priList->maxItemWidth()+5);
  connect(priList, SIGNAL(highlighted(int)),
	  priList, SLOT(hide()));
  connect(priList, SIGNAL(highlighted(int)),
	  this, SLOT(changePriority(int)));

  QPixmap pixmap;
  rmbMenu1 = new QPopupMenu;
  pixmap = Icon("checkedbox.xpm");
  rmbMenu1->insertItem(pixmap, i18n("New Todo"), this,
		       SLOT(newTodo()));
  pixmap = Icon("delete.xpm");
  rmbMenu1->insertItem(pixmap, i18n("Purge Completed "), this,
		       SLOT(purgeCompleted()));

  rmbMenu2 = new QPopupMenu;
  pixmap = Icon("checkedbox.xpm");
  rmbMenu2->insertItem(pixmap, i18n("New Todo"), this,
		     SLOT (newTodo()));
  rmbMenu2->insertItem(i18n("Edit Todo"), this,
		     SLOT (editTodo()));
  pixmap = Icon("delete.xpm");
  rmbMenu2->insertItem(pixmap, i18n("Delete Todo"), this,
		     SLOT (deleteTodo()));
  rmbMenu2->insertItem(i18n("Purge Completed "), this,
		       SLOT(purgeCompleted()));


  editingFlag = FALSE;
  connect(this, SIGNAL(headerClicked(int)), this, SLOT(headerAction(int)));
  updateConfig();
  prevRow = updatingRow = -1;
}