PostedListWidget::~PostedListWidget() { // save settings processSettings(false); delete(ui); }
GxsForumsDialog::~GxsForumsDialog() { // save settings processSettings(false); delete(mForumQueue); }
AddFeedDialog::~AddFeedDialog() { /* save settings */ processSettings(false); delete ui; }
TurtleRouterDialog::TurtleRouterDialog(QWidget *parent) : RsAutoUpdatePage(2000,parent) { setupUi(this) ; m_bProcessSettings = false; // Init the basic setup. // QStringList stl ; int n=0 ; stl.clear() ; stl.push_back(tr("Search requests")) ; top_level_s_requests = new QTreeWidgetItem(_f2f_TW,stl) ; _f2f_TW->insertTopLevelItem(n++,top_level_s_requests) ; stl.clear() ; stl.push_back(tr("Tunnel requests")) ; top_level_t_requests = new QTreeWidgetItem(_f2f_TW,stl) ; _f2f_TW->insertTopLevelItem(n++,top_level_t_requests) ; top_level_hashes.clear() ; // load settings processSettings(true); }
TurtleRouterStatistics::TurtleRouterStatistics(QWidget *parent) : RsAutoUpdatePage(2000,parent) { setupUi(this) ; m_bProcessSettings = false; _tunnel_statistics_F->setWidget( _tst_CW = new TurtleRouterStatisticsWidget() ) ; _tunnel_statistics_F->setWidgetResizable(true); _tunnel_statistics_F->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); _tunnel_statistics_F->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); _tunnel_statistics_F->viewport()->setBackgroundRole(QPalette::NoRole); _tunnel_statistics_F->setFrameStyle(QFrame::NoFrame); _tunnel_statistics_F->setFocusPolicy(Qt::NoFocus); routertabWidget->addTab(new TurtleRouterDialog(),QString(tr("Tunnel Requests"))); float fontHeight = QFontMetricsF(font()).height(); float fact = fontHeight/14.0; frmGraph->setMinimumHeight(200*fact); // load settings processSettings(true); }
LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent) : SharedFilesDialog(new TreeStyle_RDM(false),new FlatStyle_RDM(false),parent) { // Hide columns after loading the settings ui.dirTreeView->setColumnHidden(COLUMN_DIR, false) ; ui.downloadButton->hide() ; // load settings processSettings(true); // Setup the current view model. // changeCurrentViewModel(ui.viewType_CB->currentIndex()) ; connect(ui.addShares_PB, SIGNAL(clicked()), this, SLOT(addShares())) ; connect(ui.checkButton, SIGNAL(clicked()), this, SLOT(forceCheck())) ; openfileAct = new QAction(QIcon(IMAGE_OPENFILE), tr("Open File"), this) ; connect(openfileAct, SIGNAL(triggered()), this, SLOT(openfile())) ; openfolderAct = new QAction(QIcon(IMAGE_OPENFOLDER), tr("Open Folder"), this) ; connect(openfolderAct, SIGNAL(triggered()), this, SLOT(openfolder())) ; editshareAct = new QAction(QIcon(IMAGE_EDITSHARE), tr("Edit Share Permissions"), this) ; connect(editshareAct, SIGNAL(triggered()), this, SLOT(editSharePermissions())) ; ui.titleBarPixmap->setPixmap(QPixmap(IMAGE_MYFILES)) ; }
/** Constructor */ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags flags) : QWidget(parent, flags), toolButtonReply(NULL) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); isControlled = controlled; isWindow = false; currMsgFlags = 0; connect(ui.msgList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(msgfilelistWidgetCostumPopupMenu(QPoint))); connect(ui.expandFilesButton, SIGNAL(clicked()), this, SLOT(togglefileview())); connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(getallrecommended())); connect(ui.msgText, SIGNAL(anchorClicked(QUrl)), this, SLOT(anchorClicked(QUrl))); connect(ui.sendInviteButton, SIGNAL(clicked()), this, SLOT(sendInvite())); connect(NotifyQt::getInstance(), SIGNAL(messagesTagsChanged()), this, SLOT(messagesTagsChanged())); connect(NotifyQt::getInstance(), SIGNAL(messagesChanged()), this, SLOT(messagesChanged())); ui.imageBlockWidget->addButtonAction(tr("Load images always for this message"), this, SLOT(loadImagesAlways()), true); ui.msgText->setImageBlockWidget(ui.imageBlockWidget); /* hide the Tree +/- */ ui.msgList->setRootIsDecorated( false ); ui.msgList->setSelectionMode( QAbstractItemView::ExtendedSelection ); /* Set header resize modes and initial section sizes */ QHeaderView * msglheader = ui.msgList->header () ; QHeaderView_setSectionResizeModeColumn(msglheader, COLUMN_FILE_NAME, QHeaderView::Interactive); QHeaderView_setSectionResizeModeColumn(msglheader, COLUMN_FILE_SIZE, QHeaderView::Interactive); QHeaderView_setSectionResizeModeColumn(msglheader, COLUMN_FILE_HASH, QHeaderView::Interactive); msglheader->resizeSection (COLUMN_FILE_NAME, 200); msglheader->resizeSection (COLUMN_FILE_SIZE, 100); msglheader->resizeSection (COLUMN_FILE_HASH, 200); QFont font = QFont("Arial", 10, QFont::Bold); ui.subjectText->setFont(font); ui.toText->setMaximumHeight(ui.toText->fontMetrics().lineSpacing()*1.5); ui.ccLabel->setVisible(false); ui.ccText->setVisible(false); ui.ccText->setMaximumHeight(ui.ccText->fontMetrics().lineSpacing()*1.5); ui.bccLabel->setVisible(false); ui.bccText->setVisible(false); ui.bccText->setMaximumHeight(ui.bccText->fontMetrics().lineSpacing()*1.5); ui.tagsLabel->setVisible(false); ui.msgText->activateLinkClick(false); if (isControlled == false) { processSettings("MessageWidget", true); } ui.dateText-> setText(""); ui.inviteFrame->hide(); }
IdDialog::~IdDialog() { // save settings processSettings(false); delete(ui); delete(mIdQueue); }
/** Constructor */ GxsChannelDialog::GxsChannelDialog(QWidget *parent) : RsGxsUpdateBroadcastPage(rsGxsChannels, parent), GxsServiceDialog(dynamic_cast<GxsCommentContainer *>(parent)) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); /* Setup UI helper */ mStateHelper = new UIStateHelper(this); mStateHelper->addWidget(TOKEN_TYPE_POSTS, ui.progressBar, UISTATE_LOADING_VISIBLE); mStateHelper->addWidget(TOKEN_TYPE_POSTS, ui.progressLabel, UISTATE_LOADING_VISIBLE); mStateHelper->addLoadPlaceholder(TOKEN_TYPE_GROUP_DATA, ui.nameLabel); mStateHelper->addWidget(TOKEN_TYPE_GROUP_DATA, ui.postButton); mStateHelper->addWidget(TOKEN_TYPE_GROUP_DATA, ui.logoLabel); mChannelQueue = new TokenQueue(rsGxsChannels->getTokenService(), this); connect(ui.postButton, SIGNAL(clicked()), this, SLOT(createMsg())); // connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int))); /*************** Setup Left Hand Side (List of Channels) ****************/ connect(ui.treeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(channelListCustomPopupMenu(QPoint))); connect(ui.treeWidget, SIGNAL(treeCurrentItemChanged(QString)), this, SLOT(selectChannel(QString))); connect(ui.todoPushButton, SIGNAL(clicked()), this, SLOT(todo())); mChannelId.clear(); /* Set initial size the splitter */ QList<int> sizes; sizes << 300 << width(); // Qt calculates the right sizes ui.splitter->setSizes(sizes); /* Initialize group tree */ QToolButton *newChannelButton = new QToolButton(this); newChannelButton->setIcon(QIcon(":/images/add_channel24.png")); newChannelButton->setToolTip(tr("Create Channel")); connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel())); ui.treeWidget->addToolButton(newChannelButton); ownChannels = ui.treeWidget->addCategoryItem(tr("My Channels"), QIcon(IMAGE_CHANNELBLUE), true); subcribedChannels = ui.treeWidget->addCategoryItem(tr("Subscribed Channels"), QIcon(IMAGE_CHANNELRED), true); popularChannels = ui.treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(IMAGE_CHANNELGREEN), false); otherChannels = ui.treeWidget->addCategoryItem(tr("Other Channels"), QIcon(IMAGE_CHANNELYELLOW), false); ui.progressLabel->hide(); ui.progressBar->hide(); ui.nameLabel->setMinimumWidth(20); /* load settings */ processSettings(true); /* Initialize empty GUI */ requestGroupData(mChannelId); }
GxsChannelPostsWidget::~GxsChannelPostsWidget() { // save settings processSettings(false); delete(mAutoDownloadAction); delete ui; }
FriendsDialog::~FriendsDialog () { // save settings processSettings(false); if (this == instance) { instance = NULL; } }
void lggHunSpell_Wrapper::newDictSelection(std::string selection) { currentBaseDic = selection; gSavedSettings.setString("SpellBase", selection); //better way to do this would be to check and see if there is a installed conflict //and then only remove that one.. messy gSavedSettings.setString("SpellInstalled", "en_sl"); processSettings(); }
void EvaAddingNoticeWindow::setMessage( const unsigned char type, const unsigned int fromID, const TQString & msg, const bool allowReverse) { m_Type = type; m_ID = fromID; m_Message = msg; m_AllowReverse = allowReverse; processSettings(); }
void ChatLobbyDialog::init() { ChatLobbyInfo linfo ; QString title; std::list<ChatLobbyInfo>::const_iterator lobbyIt; if(rsMsgs->getChatLobbyInfo(lobbyId,linfo)) { title = QString::fromUtf8(linfo.lobby_name.c_str()); QString msg = tr("Welcome to lobby %1").arg(RsHtml::plainText(linfo.lobby_name)); _lobby_name = QString::fromUtf8(linfo.lobby_name.c_str()) ; if (!linfo.lobby_topic.empty()) { msg += "\n" + tr("Topic: %1").arg(RsHtml::plainText(linfo.lobby_topic)); } ui.chatWidget->setWelcomeMessage(msg); } ChatDialog::init(ChatId(lobbyId), title); RsGxsId gxs_id; rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id); RsIdentityDetails details ; // This lets the backend some time to load our own identity in cache. // It will only loop for at most 1 second the first time. for(int i=0; i<3; ++i) if(rsIdentity->getIdDetails(gxs_id,details)) break ; else usleep(1000*300) ; ui.chatWidget->setName(QString::fromUtf8(details.mNickname.c_str())); //ui.chatWidget->addToolsAction(ui.actionChangeNickname); ui.chatWidget->setDefaultExtraFileFlags(RS_FILE_REQ_ANONYMOUS_ROUTING); lastUpdateListTime = 0; // add to window ChatLobbyWidget *chatLobbyPage = dynamic_cast<ChatLobbyWidget*>(MainWindow::getPage(MainWindow::ChatLobby)); if (chatLobbyPage) { chatLobbyPage->addChatPage(this) ; } /** List of muted Participants */ mutedParticipants.clear() ; // load settings processSettings(true); }
ChannelFeed::~ChannelFeed() { if (fillThread) { fillThread->stop(); delete(fillThread); fillThread = NULL; } // save settings processSettings(false); }
/** Constructor */ MessageWindow::MessageWindow(QWidget *parent, Qt::WindowFlags flags) : RWindow("MessageWindow", parent, flags) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); setAttribute ( Qt::WA_DeleteOnClose, true ); actionSaveAs = NULL; actionPrint = NULL; actionPrintPreview = NULL; setupFileActions(); connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(newmessage())); connect(ui.actionTextBesideIcon, SIGNAL(triggered()), this, SLOT(buttonStyle())); connect(ui.actionIconOnly, SIGNAL(triggered()), this, SLOT(buttonStyle())); connect(ui.actionTextUnderIcon, SIGNAL(triggered()), this, SLOT(buttonStyle())); ui.actionTextBesideIcon->setData(Qt::ToolButtonTextBesideIcon); ui.actionIconOnly->setData(Qt::ToolButtonIconOnly); ui.actionTextUnderIcon->setData(Qt::ToolButtonTextUnderIcon); msgWidget = NULL; // create tag menu TagsMenu *menu = new TagsMenu (tr("Tags"), this); connect(menu, SIGNAL(aboutToShow()), this, SLOT(tagAboutToShow())); connect(menu, SIGNAL(tagSet(int, bool)), this, SLOT(tagSet(int, bool))); connect(menu, SIGNAL(tagRemoveAll()), this, SLOT(tagRemoveAll())); ui.tagButton->setMenu(menu); // create print menu QMenu *printmenu = new QMenu(); printmenu->addAction(ui.actionPrint); printmenu->addAction(ui.actionPrint_Preview); ui.printbutton->setMenu(printmenu); // create view menu QMenu *viewmenu = new QMenu(); viewmenu->addAction(ui.actionTextBesideIcon); viewmenu->addAction(ui.actionIconOnly); //viewmenu->addAction(ui.actionTextUnderIcon); ui.viewtoolButton->setMenu(viewmenu); processSettings(true); /* Hide platform specific features */ #ifdef Q_WS_WIN #endif }
MessengerWindow::~MessengerWindow () { // save settings processSettings(false); MainWindow *pMainWindow = MainWindow::getInstance(); if (pMainWindow) { pMainWindow->removeStatusObject(ui.statusButton); } _instance = NULL; }
/** Constructor */ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WFlags flags) : QWidget(parent, flags) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); isControlled = controlled; isWindow = false; currMsgFlags = 0; connect(ui.msgList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(msgfilelistWidgetCostumPopupMenu(QPoint))); connect(ui.expandFilesButton, SIGNAL(clicked()), this, SLOT(togglefileview())); connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(getallrecommended())); connect(ui.msgText, SIGNAL(anchorClicked(QUrl)), this, SLOT(anchorClicked(QUrl))); connect(NotifyQt::getInstance(), SIGNAL(messagesTagsChanged()), this, SLOT(messagesTagsChanged())); connect(NotifyQt::getInstance(), SIGNAL(messagesChanged()), this, SLOT(messagesChanged())); /* hide the Tree +/- */ ui.msgList->setRootIsDecorated( false ); ui.msgList->setSelectionMode( QAbstractItemView::ExtendedSelection ); /* Set header resize modes and initial section sizes */ QHeaderView * msglheader = ui.msgList->header () ; msglheader->setResizeMode (COLUMN_FILE_NAME, QHeaderView::Interactive); msglheader->setResizeMode (COLUMN_FILE_SIZE, QHeaderView::Interactive); msglheader->setResizeMode (COLUMN_FILE_HASH, QHeaderView::Interactive); msglheader->resizeSection (COLUMN_FILE_NAME, 200); msglheader->resizeSection (COLUMN_FILE_SIZE, 100); msglheader->resizeSection (COLUMN_FILE_HASH, 200); QFont font = QFont("Arial", 10, QFont::Bold); ui.subjectText->setFont(font); ui.bcclabel->setVisible(false); ui.bccText->setVisible(false); ui.cclabel->setVisible(false); ui.ccText->setVisible(false); ui.tagsLabel->setVisible(false); if (isControlled == false) { processSettings("MessageWidget", true); } ui.dateText-> setText(""); /* Hide platform specific features */ #ifdef Q_WS_WIN #endif }
/** Destructor. */ ChatLobbyDialog::~ChatLobbyDialog() { // announce leaving of lobby // check that the lobby still exists. if (mChatId.isLobbyId()) { rsMsgs->unsubscribeChatLobby(mChatId.toLobbyId()); } // save settings processSettings(false); }
/** Destructor. */ ChatLobbyDialog::~ChatLobbyDialog() { // announce leaving of lobby // check that the lobby still exists. ChatLobbyId lid; if (rsMsgs->isLobbyId(getPeerId(), lid)) { rsMsgs->unsubscribeChatLobby(lobbyId); } // save settings processSettings(false); }
void lggHunSpell_Wrapper::removeButton(std::string selection) { if(selection=="")return; std::vector<std::string> newInstalledDics; std::vector<std::string> currentlyInstalled = getInstalledDicts(); for(int i =0;i<(int)currentlyInstalled.size();i++) { if(0!=LLStringUtil::compareInsensitive(selection,currentlyInstalled[i])) newInstalledDics.push_back(fullName2DictName(currentlyInstalled[i])); } gSavedSettings.setString("EmeraldSpellInstalled",VEC2CSV(newInstalledDics)); processSettings(); }
GlobalRouterStatistics::GlobalRouterStatistics(QWidget *parent) : RsAutoUpdatePage(2000,parent) { setupUi(this) ; m_bProcessSettings = false; _router_F->setWidget( _tst_CW = new GlobalRouterStatisticsWidget() ) ; /* Set header resize modes and initial section sizes Uploads TreeView*/ QHeaderView_setSectionResizeMode(treeWidget->header(), QHeaderView::ResizeToContents); // load settings processSettings(true); }
/** Constructor */ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent) : GxsMessageFramePostWidget(rsPosted, parent), ui(new Ui::PostedListWidget) { /* Invoke the Qt Designer generated object setup routine */ ui->setupUi(this); /* Setup UI helper */ mStateHelper->addWidget(mTokenTypeAllPosts, ui->hotSortButton); mStateHelper->addWidget(mTokenTypeAllPosts, ui->newSortButton); mStateHelper->addWidget(mTokenTypeAllPosts, ui->topSortButton); mStateHelper->addWidget(mTokenTypePosts, ui->hotSortButton); mStateHelper->addWidget(mTokenTypePosts, ui->newSortButton); mStateHelper->addWidget(mTokenTypePosts, ui->topSortButton); mStateHelper->addWidget(mTokenTypeGroupData, ui->submitPostButton); mStateHelper->addWidget(mTokenTypeGroupData, ui->subscribeToolButton); connect(ui->hotSortButton, SIGNAL(clicked()), this, SLOT(getRankings())); connect(ui->newSortButton, SIGNAL(clicked()), this, SLOT(getRankings())); connect(ui->topSortButton, SIGNAL(clicked()), this, SLOT(getRankings())); connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(showNext())); connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(showPrev())); connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool))); // default sort method. mSortMethod = RsPosted::HotRankType; mLastSortMethod = RsPosted::TopRankType; // to be different. mPostIndex = 0; mPostShow = POSTED_DEFAULT_LISTING_LENGTH; mTokenTypeVote = nextTokenType(); ui->hotSortButton->setChecked(true); /* fill in the available OwnIds for signing */ ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId()); connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(newPost())); /* load settings */ processSettings(true); /* Initialize GUI */ setGroupId(postedId); }
/** Constructor */ GxsForumsDialog::GxsForumsDialog(QWidget *parent) : RsGxsUpdateBroadcastPage(rsGxsForums, parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); /* Setup Queue */ mForumQueue = new TokenQueue(rsGxsForums->getTokenService(), this); mThreadWidget = NULL; /* Setup UI helper */ // mStateHelper = new UIStateHelper(this); // no widget to add yet connect(ui.forumTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(forumListCustomPopupMenu(QPoint))); connect(ui.forumTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(changedForum(QString))); connect(ui.forumTreeWidget->treeWidget(), SIGNAL(signalMouseMiddleButtonClicked(QTreeWidgetItem*)), this, SLOT(forumTreeMiddleButtonClicked(QTreeWidgetItem*))); connect(ui.threadTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(threadTabCloseRequested(int))); connect(ui.threadTabWidget, SIGNAL(currentChanged(int)), this, SLOT(threadTabChanged(int))); connect(NotifyQt::getInstance(), SIGNAL(forumMsgReadSatusChanged(QString,QString,int)), this, SLOT(forumMsgReadSatusChanged(QString,QString,int))); connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); connect(ui.todoPushButton, SIGNAL(clicked()), this, SLOT(todo())); /* Initialize group tree */ QToolButton *newForumButton = new QToolButton(this); newForumButton->setIcon(QIcon(":/images/new_forum16.png")); newForumButton->setToolTip(tr("Create Forum")); connect(newForumButton, SIGNAL(clicked()), this, SLOT(newforum())); ui.forumTreeWidget->addToolButton(newForumButton); /* Set initial size the splitter */ QList<int> sizes; sizes << 300 << width(); // Qt calculates the right sizes ui.splitter->setSizes(sizes); /* create forum tree */ yourForums = ui.forumTreeWidget->addCategoryItem(tr("My Forums"), QIcon(IMAGE_FOLDER), true); subscribedForums = ui.forumTreeWidget->addCategoryItem(tr("Subscribed Forums"), QIcon(IMAGE_FOLDERRED), true); popularForums = ui.forumTreeWidget->addCategoryItem(tr("Popular Forums"), QIcon(IMAGE_FOLDERGREEN), false); otherForums = ui.forumTreeWidget->addCategoryItem(tr("Other Forums"), QIcon(IMAGE_FOLDERYELLOW), false); // load settings processSettings(true); settingsChanged(); }
RttStatistics::RttStatistics(QWidget *parent) { setupUi(this) ; m_bProcessSettings = false; _tunnel_statistics_F->setWidget( _tst_CW = new RttStatisticsGraph(this) ) ; _tunnel_statistics_F->setWidgetResizable(true); _tunnel_statistics_F->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); _tunnel_statistics_F->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); _tunnel_statistics_F->viewport()->setBackgroundRole(QPalette::NoRole); _tunnel_statistics_F->setFrameStyle(QFrame::NoFrame); _tunnel_statistics_F->setFocusPolicy(Qt::NoFocus); // load settings processSettings(true); }
void ChatLobbyDialog::init(const std::string &peerId, const QString &title) { std::list<ChatLobbyInfo> lobbies; rsMsgs->getChatLobbyList(lobbies); std::list<ChatLobbyInfo>::const_iterator lobbyIt; for (lobbyIt = lobbies.begin(); lobbyIt != lobbies.end(); ++lobbyIt) { std::string vpid; if (rsMsgs->getVirtualPeerId(lobbyIt->lobby_id, vpid)) { if (vpid == peerId) { QString msg = tr("Welcome to lobby %1").arg(QString::fromUtf8(lobbyIt->lobby_name.c_str())); if (!lobbyIt->lobby_topic.empty()) { msg += "\n" + tr("Topic: %1").arg(QString::fromUtf8(lobbyIt->lobby_topic.c_str())); } ui.chatWidget->setWelcomeMessage(msg); break; } } } ChatDialog::init(peerId, title); std::string nickName; rsMsgs->getNickNameForChatLobby(lobbyId, nickName); ui.chatWidget->setName(QString::fromUtf8(nickName.c_str())); ui.chatWidget->addToolsAction(ui.actionChangeNickname); lastUpdateListTime = 0; /* Hide or show the participants frames */ showParticipantsFrame(PeerSettings->getShowParticipantsFrame(peerId)); // add to window ChatTabWidget *tabWidget = FriendsDialog::getTabWidget(); if (tabWidget) { tabWidget->addDialog(this); } /** List of muted Participants */ mutedParticipants = new QStringList; // load settings processSettings(true); }
void ChatLobbyDialog::init(const std::string &peerId, const QString &title) { std::list<ChatLobbyInfo> lobbies; rsMsgs->getChatLobbyList(lobbies); std::list<ChatLobbyInfo>::const_iterator lobbyIt; for (lobbyIt = lobbies.begin(); lobbyIt != lobbies.end(); ++lobbyIt) { std::string vpid; if (rsMsgs->getVirtualPeerId(lobbyIt->lobby_id, vpid)) { if (vpid == peerId) { QString msg = tr("Welcome to lobby %1").arg(RsHtml::plainText(lobbyIt->lobby_name)); _lobby_name = QString::fromUtf8(lobbyIt->lobby_name.c_str()) ; if (!lobbyIt->lobby_topic.empty()) { msg += "\n" + tr("Topic: %1").arg(RsHtml::plainText(lobbyIt->lobby_topic)); } ui.chatWidget->setWelcomeMessage(msg); break; } } } ChatDialog::init(peerId, title); std::string nickName; rsMsgs->getNickNameForChatLobby(lobbyId, nickName); ui.chatWidget->setName(QString::fromUtf8(nickName.c_str())); ui.chatWidget->addToolsAction(ui.actionChangeNickname); ui.chatWidget->setDefaultExtraFileFlags(RS_FILE_REQ_ANONYMOUS_ROUTING); lastUpdateListTime = 0; /* Hide or show the participants frames */ showParticipantsFrame(PeerSettings->getShowParticipantsFrame(peerId)); // add to window dynamic_cast<ChatLobbyWidget*>(MainWindow::getPage(MainWindow::ChatLobby))->addChatPage(this) ; /** List of muted Participants */ mutedParticipants = new QStringList; // load settings processSettings(true); }
/** Constructor */ ChannelFeed::ChannelFeed(QWidget *parent) : RsAutoUpdatePage(1000,parent) { /* Invoke the Qt Designer generated object setup routine */ setupUi(this); connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel())); connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg())); connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int))); /*************** Setup Left Hand Side (List of Channels) ****************/ connect(treeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT( channelListCustomPopupMenu( QPoint ) ) ); connect(treeWidget, SIGNAL(treeCurrentItemChanged(QString)), this, SLOT(selectChannel(QString))); mChannelId.clear(); /* Set initial size the splitter */ QList<int> sizes; sizes << 300 << width(); // Qt calculates the right sizes splitter->setSizes(sizes); /* Initialize group tree */ treeWidget->initDisplayMenu(displayButton); ownChannels = treeWidget->addCategoryItem(tr("My Channels"), QIcon(IMAGE_CHANNELBLUE), true); subcribedChannels = treeWidget->addCategoryItem(tr("Subscribed Channels"), QIcon(IMAGE_CHANNELRED), true); popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(IMAGE_CHANNELGREEN ), false); otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(IMAGE_CHANNELYELLOW), false); progressLabel->hide(); progressBar->hide(); fillThread = NULL; //added from ahead updateChannelList(); nameLabel->setMinimumWidth(20); /* load settings */ processSettings(true); updateChannelMsgs(); }
RemoteSharedFilesDialog::RemoteSharedFilesDialog(QWidget *parent) : SharedFilesDialog(new TreeStyle_RDM(true),new FlatStyle_RDM(true),parent) { ui.dirTreeView->setColumnHidden(COLUMN_FRIEND, false) ; ui.dirTreeView->setColumnHidden(COLUMN_DIR, true) ; ui.checkButton->hide() ; connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadRemoteSelected())); connect(ui.dirTreeView, SIGNAL( expanded(const QModelIndex & ) ), this, SLOT( expanded(const QModelIndex & ) ) ); // load settings processSettings(true); // Setup the current view model. // changeCurrentViewModel(ui.viewType_CB->currentIndex()) ; ui.addShares_PB->hide() ; }
GlobalRouterStatistics::GlobalRouterStatistics(QWidget *parent) : RsAutoUpdatePage(2000,parent) { setupUi(this) ; m_bProcessSettings = false; _router_F->setWidget( _tst_CW = new GlobalRouterStatisticsWidget() ) ; /* Set header resize modes and initial section sizes Uploads TreeView*/ QHeaderView_setSectionResizeMode(treeWidget->header(), QHeaderView::ResizeToContents); connect(treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CustomPopupMenu(QPoint))); // load settings processSettings(true); }