mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-06 21:34:22 -04:00
moved feed as a tab in main window
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ImprovedGUI@6103 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e6e7a1b52f
commit
8fe75acfaf
4 changed files with 37 additions and 30 deletions
|
@ -101,13 +101,13 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||||
ui.avatar->setOwnId();
|
ui.avatar->setOwnId();
|
||||||
|
|
||||||
ui.tabWidget->setTabPosition(QTabWidget::North);
|
ui.tabWidget->setTabPosition(QTabWidget::North);
|
||||||
ui.tabWidget->addTab(networkView = new NetworkView(),QIcon(IMAGE_PEERS), tr("Local network"));
|
ui.tabWidget->addTab(networkView = new NetworkView(),QIcon(IMAGE_NETWORK2), tr("Local network"));
|
||||||
ui.tabWidget->addTab(networkDialog = new NetworkDialog(),QIcon(IMAGE_NETWORK2), tr("Known people"));
|
ui.tabWidget->addTab(networkDialog = new NetworkDialog(),QIcon(IMAGE_PEERS), tr("Known people"));
|
||||||
//ui.tabWidget->addTab(new ChatLobbyWidget(), tr("Chat lobbies"));
|
//ui.tabWidget->addTab(new ChatLobbyWidget(), tr("Chat lobbies"));
|
||||||
//ui.tabWidget->addTab(new ProfileWidget(), tr("Profile"));
|
//ui.tabWidget->addTab(new ProfileWidget(), tr("Profile"));
|
||||||
newsFeed = new NewsFeed();
|
//newsFeed = new NewsFeed();
|
||||||
int newsFeedTabIndex = ui.tabWidget->insertTab(0, newsFeed, tr("News Feed"));
|
//int newsFeedTabIndex = ui.tabWidget->insertTab(0, newsFeed, tr("News Feed"));
|
||||||
ui.tabWidget->setCurrentIndex(newsFeedTabIndex);
|
//ui.tabWidget->setCurrentIndex(newsFeedTabIndex);
|
||||||
|
|
||||||
ui.tabWidget->hideCloseButton(0);
|
ui.tabWidget->hideCloseButton(0);
|
||||||
ui.tabWidget->hideCloseButton(1);
|
ui.tabWidget->hideCloseButton(1);
|
||||||
|
@ -115,10 +115,10 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||||
ui.tabWidget->hideCloseButton(3);
|
ui.tabWidget->hideCloseButton(3);
|
||||||
|
|
||||||
/* get the current text and text color of the tab bar */
|
/* get the current text and text color of the tab bar */
|
||||||
newsFeedTabColor = ui.tabWidget->tabBar()->tabTextColor(newsFeedTabIndex);
|
//newsFeedTabColor = ui.tabWidget->tabBar()->tabTextColor(newsFeedTabIndex);
|
||||||
newsFeedText = ui.tabWidget->tabBar()->tabText(newsFeedTabIndex);
|
//newsFeedText = ui.tabWidget->tabBar()->tabText(newsFeedTabIndex);
|
||||||
|
|
||||||
connect(newsFeed, SIGNAL(newsFeedChanged(int)), this, SLOT(newsFeedChanged(int)));
|
//connect(newsFeed, SIGNAL(newsFeedChanged(int)), this, SLOT(newsFeedChanged(int)));
|
||||||
|
|
||||||
connect(ui.Sendbtn, SIGNAL(clicked()), this, SLOT(sendMsg()));
|
connect(ui.Sendbtn, SIGNAL(clicked()), this, SLOT(sendMsg()));
|
||||||
connect(ui.emoticonBtn, SIGNAL(clicked()), this, SLOT(smileyWidgetgroupchat()));
|
connect(ui.emoticonBtn, SIGNAL(clicked()), this, SLOT(smileyWidgetgroupchat()));
|
||||||
|
@ -855,23 +855,23 @@ void FriendsDialog::on_actionAdd_Group_activated()
|
||||||
createGrpDialog.exec();
|
createGrpDialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FriendsDialog::newsFeedChanged(int count)
|
// void FriendsDialog::newsFeedChanged(int count)
|
||||||
{
|
// {
|
||||||
int newsFeedTabIndex = ui.tabWidget->indexOf(newsFeed);
|
// int newsFeedTabIndex = ui.tabWidget->indexOf(newsFeed);
|
||||||
if (newsFeedTabIndex < 0) {
|
// if (newsFeedTabIndex < 0) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (count) {
|
// if (count) {
|
||||||
ui.tabWidget->tabBar()->setTabText(newsFeedTabIndex, QString("%1 (%2)").arg(newsFeedText).arg(count));
|
// ui.tabWidget->tabBar()->setTabText(newsFeedTabIndex, QString("%1 (%2)").arg(newsFeedText).arg(count));
|
||||||
ui.tabWidget->tabBar()->setTabTextColor(newsFeedTabIndex, Qt::blue);
|
// ui.tabWidget->tabBar()->setTabTextColor(newsFeedTabIndex, Qt::blue);
|
||||||
ui.tabWidget->tabBar()->setTabIcon(newsFeedTabIndex, QIcon(IMAGE_NEWSFEED_NEW));
|
// ui.tabWidget->tabBar()->setTabIcon(newsFeedTabIndex, QIcon(IMAGE_NEWSFEED_NEW));
|
||||||
} else {
|
// } else {
|
||||||
ui.tabWidget->tabBar()->setTabText(newsFeedTabIndex, newsFeedText);
|
// ui.tabWidget->tabBar()->setTabText(newsFeedTabIndex, newsFeedText);
|
||||||
ui.tabWidget->tabBar()->setTabTextColor(newsFeedTabIndex, newsFeedTabColor);
|
// ui.tabWidget->tabBar()->setTabTextColor(newsFeedTabIndex, newsFeedTabColor);
|
||||||
ui.tabWidget->tabBar()->setTabIcon(newsFeedTabIndex, QIcon(IMAGE_NEWSFEED));
|
// ui.tabWidget->tabBar()->setTabIcon(newsFeedTabIndex, QIcon(IMAGE_NEWSFEED));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
void FriendsDialog::createChatLobby()
|
void FriendsDialog::createChatLobby()
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,7 +115,7 @@ private slots:
|
||||||
|
|
||||||
void setCurrentFileName(const QString &fileName);
|
void setCurrentFileName(const QString &fileName);
|
||||||
|
|
||||||
void newsFeedChanged(int count);
|
//void newsFeedChanged(int count);
|
||||||
|
|
||||||
void createChatLobby();
|
void createChatLobby();
|
||||||
void recommendFriends();
|
void recommendFriends();
|
||||||
|
@ -141,9 +141,9 @@ private:
|
||||||
|
|
||||||
QFont mCurrentFont; /* how the text will come out */
|
QFont mCurrentFont; /* how the text will come out */
|
||||||
|
|
||||||
QWidget *newsFeed;
|
//QWidget *newsFeed;
|
||||||
QColor newsFeedTabColor;
|
//QColor newsFeedTabColor;
|
||||||
QString newsFeedText;
|
//QString newsFeedText;
|
||||||
bool inChatCharFormatChanged;
|
bool inChatCharFormatChanged;
|
||||||
|
|
||||||
/** Qt Designer generated object */
|
/** Qt Designer generated object */
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "MessagesDialog.h"
|
#include "MessagesDialog.h"
|
||||||
#include "SharedFilesDialog.h"
|
#include "SharedFilesDialog.h"
|
||||||
#include "PluginsPage.h"
|
#include "PluginsPage.h"
|
||||||
|
#include "NewsFeed.h"
|
||||||
#include "ShareManager.h"
|
#include "ShareManager.h"
|
||||||
#include "NetworkView.h"
|
#include "NetworkView.h"
|
||||||
#include "ForumsDialog.h"
|
#include "ForumsDialog.h"
|
||||||
|
@ -237,6 +238,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||||
QActionGroup *grp = new QActionGroup(this);
|
QActionGroup *grp = new QActionGroup(this);
|
||||||
QAction *action;
|
QAction *action;
|
||||||
|
|
||||||
|
ui->stackPages->add(newsFeed = new NewsFeed(ui->stackPages),
|
||||||
|
createPageAction(QIcon(IMAGE_NEWSFEED), tr("News feed"), grp));
|
||||||
|
|
||||||
// ui->stackPages->add(networkDialog = new NetworkDialog(ui->stackPages),
|
// ui->stackPages->add(networkDialog = new NetworkDialog(ui->stackPages),
|
||||||
// createPageAction(QIcon(IMAGE_NETWORK2), tr("Network"), grp));
|
// createPageAction(QIcon(IMAGE_NETWORK2), tr("Network"), grp));
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ class PluginsPage;
|
||||||
class ChannelFeed;
|
class ChannelFeed;
|
||||||
class BandwidthGraph;
|
class BandwidthGraph;
|
||||||
class MainPage;
|
class MainPage;
|
||||||
|
class NewsFeed;
|
||||||
class UserNotify;
|
class UserNotify;
|
||||||
|
|
||||||
#ifdef RS_USE_LINKS
|
#ifdef RS_USE_LINKS
|
||||||
|
@ -118,8 +119,10 @@ public:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// NetworkDialog *networkDialog;
|
// NetworkDialog *networkDialog;
|
||||||
FriendsDialog *friendsDialog;
|
|
||||||
// SearchDialog *searchDialog;
|
// SearchDialog *searchDialog;
|
||||||
|
|
||||||
|
NewsFeed *newsFeed;
|
||||||
|
FriendsDialog *friendsDialog;
|
||||||
TransfersDialog *transfersDialog;
|
TransfersDialog *transfersDialog;
|
||||||
MessagesDialog *messagesDialog;
|
MessagesDialog *messagesDialog;
|
||||||
SharedFilesDialog *sharedfilesDialog;
|
SharedFilesDialog *sharedfilesDialog;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue