2008-03-04 16:31:11 -05:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare GUI is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Robert Fernie
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#ifndef _NETWORK_VIEW_H
|
|
|
|
#define _NETWORK_VIEW_H
|
|
|
|
|
|
|
|
#include <QGraphicsScene>
|
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
#include "RsAutoUpdatePage.h"
|
2008-03-04 16:31:11 -05:00
|
|
|
#include "ui_NetworkView.h"
|
|
|
|
|
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
class NetworkView : public RsAutoUpdatePage
|
2008-03-04 16:31:11 -05:00
|
|
|
{
|
2010-11-05 18:46:40 -04:00
|
|
|
Q_OBJECT
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
public:
|
|
|
|
NetworkView(QWidget *parent = 0);
|
2011-03-05 13:26:33 -05:00
|
|
|
virtual ~NetworkView();
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
virtual void updateDisplay() ; // derived from RsAutoUpdatePage
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
public slots:
|
|
|
|
void update() ;
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
private slots:
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
void setMaxFriendLevel(int) ;
|
|
|
|
void setEdgeLength(int) ;
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
void changedFoFCheckBox( );
|
2010-11-14 16:03:36 -05:00
|
|
|
void redraw();
|
2008-03-21 19:31:00 -04:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
private:
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-14 16:03:36 -05:00
|
|
|
void clear();
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
QGraphicsScene *mScene;
|
2008-03-04 16:31:11 -05:00
|
|
|
|
2010-11-05 18:46:40 -04:00
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::NetworkView ui;
|
|
|
|
int _max_friend_level ;
|
|
|
|
std::map<std::string,GraphWidget::NodeId> _node_ids ;
|
|
|
|
|
|
|
|
bool _should_update ;
|
2008-03-04 16:31:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|