mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
clean up source structure
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1154 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
72f7fd0be4
commit
130143192f
@ -187,8 +187,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
// createPageAction(QIcon(IMAGE_LINKS), tr("Transfers"), grp));
|
||||
|
||||
ui.stackPages->add(sharedfilesDialog = new SharedFilesDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_FILES), tr("Files"), grp));
|
||||
|
||||
createPageAction(QIcon(IMAGE_FILES), tr("Files"), grp));
|
||||
|
||||
//MsgFeed *msgFeed = NULL;
|
||||
//ui.stackPages->add(msgFeed = new MsgFeed(ui.stackPages),
|
||||
@ -223,8 +222,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||
|
||||
addAction(new QAction(QIcon(IMAGE_UNFINISHED), tr("Unfinished"), ui.toolBar), SLOT(showApplWindow()));
|
||||
|
||||
#endif
|
||||
NewsFeed *newsFeed = NULL;
|
||||
ui.stackPages->add(newsFeed = new NewsFeed(ui.stackPages),
|
||||
@ -233,17 +230,21 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
ui.stackPages->add(pluginsPage = new PluginsPage(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_PLUGINS), tr("Plugins"), grp));
|
||||
|
||||
|
||||
/* also an empty list of chat windows */
|
||||
messengerWindow->setChatDialog(peersDialog);
|
||||
|
||||
/* Create the toolbar */
|
||||
ui.toolBar->addActions(grp->actions());
|
||||
ui.toolBar->addSeparator();
|
||||
connect(grp, SIGNAL(triggered(QAction *)), ui.stackPages, SLOT(showPage(QAction *)));
|
||||
|
||||
#ifdef RS_RELEASE_VERSION
|
||||
#else
|
||||
addAction(new QAction(QIcon(IMAGE_UNFINISHED), tr("Unfinished"), ui.toolBar), SLOT(showApplWindow()));
|
||||
#endif
|
||||
|
||||
/* Select the first action */
|
||||
grp->actions()[0]->setChecked(true);
|
||||
|
||||
/* also an empty list of chat windows */
|
||||
messengerWindow->setChatDialog(peersDialog);
|
||||
|
||||
// Allow to play files from SharedFilesDialog.
|
||||
connect(sharedfilesDialog, SIGNAL(playFiles( QStringList )), this, SLOT(playFiles( QStringList )));
|
||||
@ -379,16 +380,6 @@ QAction* MainWindow::createPageAction(QIcon img, QString text, QActionGroup *gro
|
||||
return action;
|
||||
}
|
||||
|
||||
/** Creates a new action associated with a config page. */
|
||||
QAction* MainWindow::createPageActionservice(QIcon img, QString text, QActionGroup *groupservice)
|
||||
{
|
||||
QAction *actionservice = new QAction(img, text, groupservice);
|
||||
actionservice->setCheckable(true);
|
||||
actionservice->setFont(FONT);
|
||||
return actionservice;
|
||||
}
|
||||
|
||||
|
||||
/** Adds the given action to the toolbar and hooks its triggered() signal to
|
||||
* the specified slot (if given). */
|
||||
void MainWindow::addAction(QAction *action, const char *slot)
|
||||
|
@ -151,7 +151,6 @@ private slots:
|
||||
void showPreferencesWindow(PreferencesWindow::Page page = PreferencesWindow::General);
|
||||
void showMess(MainWindow::Page page = MainWindow::Messages);
|
||||
|
||||
|
||||
void showSettings();
|
||||
void setStyle();
|
||||
|
||||
@ -195,11 +194,7 @@ private:
|
||||
QAction* createPageAction(QIcon img, QString text, QActionGroup *group);
|
||||
/** Adds a new action to the toolbar. */
|
||||
void addAction(QAction *action, const char *slot = 0);
|
||||
|
||||
/** Creates a new action for a Service pages. */
|
||||
QAction* createPageActionservice(QIcon img, QString text, QActionGroup *groupservice);
|
||||
/** Adds a new action to the toolbar. */
|
||||
void addActionservice(QAction *actionservice, const char *slot = 0);
|
||||
|
||||
|
||||
void loadStyleSheet(const QString &sheetName);
|
||||
|
||||
|
@ -48,7 +48,7 @@ PeerStatus::PeerStatus(QWidget *parent)
|
||||
hbox->addWidget(iconLabel);
|
||||
|
||||
statusPeers = new QLabel( tr("Online: 0 | Friends: 0 | Network: 0 "), this );
|
||||
//statusPeers->setMinimumSize( statusPeers->frameSize().width() + 0, 0 );
|
||||
//statusPeers->setMinimumSize( statusPeers->frameSize().width() + 0, 0 );
|
||||
hbox->addWidget(statusPeers);
|
||||
|
||||
setLayout( hbox );
|
||||
@ -76,7 +76,7 @@ void PeerStatus::setPeerStatus()
|
||||
int others = 1 + ids.size();
|
||||
|
||||
std::ostringstream out2;
|
||||
out2 << "<span style=\"color:#008000\"><strong>Online: </strong></span>" << online << " | <span style=\"color:#0000FF\"><strong>Friends: </strong></span>" << friends << " | <span style=\"color:#FF0033\"><strong>Network: </strong></span>" << others << " ";
|
||||
out2 << "<span style=\"color:#008000\"><strong>Online: </strong></span>" << online << " | <span style=\"color:#0000FF\"><strong>Friends: </strong></span>" << friends << " | <strong>Network: </strong>" << others << " ";
|
||||
|
||||
|
||||
if (statusPeers)
|
||||
|
Loading…
Reference in New Issue
Block a user