/** Constructor */ IdDialog::IdDialog(QWidget *parent) : MainPage(parent) { ui.setupUi(this); mEditDialog = NULL; //mPulseSelected = NULL; ui.radioButton_ListAll->setChecked(true); connect( ui.pushButton_NewId, SIGNAL(clicked()), this, SLOT(OpenOrShowAddDialog())); connect( ui.pushButton_EditId, SIGNAL(clicked()), this, SLOT(OpenOrShowEditDialog())); connect( ui.treeWidget_IdList, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelection())); connect( ui.radioButton_ListYourself, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) ); connect( ui.radioButton_ListFriends, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) ); connect( ui.radioButton_ListOthers, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) ); connect( ui.radioButton_ListPseudo, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) ); connect( ui.radioButton_ListAll, SIGNAL(toggled( bool ) ), this, SLOT(ListTypeToggled( bool ) ) ); QTimer *timer = new QTimer(this); timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate())); timer->start(1000); rsIdentity->generateDummyData(); mIdQueue = new TokenQueue(rsIdentity, this); }
/** Constructor */ WikiDialog::WikiDialog(QWidget *parent) : MainPage(parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); mAddPageDialog = NULL; mAddGroupDialog = NULL; mEditDialog = NULL; connect( ui.toolButton_NewGroup, SIGNAL(clicked()), this, SLOT(OpenOrShowAddGroupDialog())); connect( ui.toolButton_NewPage, SIGNAL(clicked()), this, SLOT(OpenOrShowAddPageDialog())); connect( ui.toolButton_Edit, SIGNAL(clicked()), this, SLOT(OpenOrShowEditDialog())); connect( ui.toolButton_Republish, SIGNAL(clicked()), this, SLOT(OpenOrShowRepublishDialog())); // Usurped until Refresh works normally connect( ui.toolButton_Delete, SIGNAL(clicked()), this, SLOT(insertWikiGroups())); connect( ui.pushButton, SIGNAL(clicked()), this, SLOT(todo())); connect( ui.treeWidget_Pages, SIGNAL(itemSelectionChanged()), this, SLOT(groupTreeChanged())); // GroupTreeWidget. connect(ui.groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupListCustomPopupMenu(QPoint))); connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString))); QTimer *timer = new QTimer(this); timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate())); timer->start(1000); /* setup TokenQueue */ mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this); /* Setup Group Tree */ mYourGroups = ui.groupTreeWidget->addCategoryItem(tr("My Groups"), QIcon(IMAGE_FOLDER), true); mSubscribedGroups = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Groups"), QIcon(IMAGE_FOLDERRED), true); mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(IMAGE_FOLDERGREEN), false); mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(IMAGE_FOLDERYELLOW), false); //Auto refresh seems not to work, temporary solution at start insertWikiGroups(); }
void WikiDialog::OpenOrShowRepublishDialog() { OpenOrShowEditDialog(); std::string groupId; std::string pageId; std::string origPageId; if (!getSelectedPage(groupId, pageId, origPageId)) { std::cerr << "WikiDialog::OpenOrShowAddRepublishDialog() No Group or PageId selected"; std::cerr << std::endl; if (mEditDialog) { mEditDialog->hide(); } return; } mEditDialog->setRepublishMode(origPageId); }