2007-11-14 22:18:48 -05:00
|
|
|
/****************************************************************
|
|
|
|
* RShare is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006, crypton
|
|
|
|
*
|
|
|
|
* 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.
|
2009-04-29 13:07:28 -04:00
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _CONNECTIONSDIALOG_H
|
|
|
|
#define _CONNECTIONSDIALOG_H
|
|
|
|
|
|
|
|
#include <QFileDialog>
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
//#include <config/rsharesettings.h>
|
2009-04-29 13:07:28 -04:00
|
|
|
|
|
|
|
#include "mainpage.h"
|
|
|
|
#include "ui_NetworkDialog.h"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
#include "connect/ConnectDialog.h"
|
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
|
|
|
|
class NetworkDialog : public MainPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
/** Default Constructor */
|
|
|
|
NetworkDialog(QWidget *parent = 0);
|
|
|
|
/** Default Destructor */
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
void showpeerdetails(std::string id);
|
|
|
|
|
|
|
|
public slots:
|
2009-02-22 12:36:39 -05:00
|
|
|
void insertConnect();
|
2007-11-14 22:18:48 -05:00
|
|
|
std::string loadneighbour();
|
|
|
|
/* void loadneighbour(); */
|
2009-04-29 13:07:28 -04:00
|
|
|
void setLogInfo(QString info, QColor color=QApplication::palette().color(QPalette::WindowText));
|
2008-03-21 19:31:00 -04:00
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
private slots:
|
2009-04-29 13:07:28 -04:00
|
|
|
|
2009-03-21 16:29:23 -04:00
|
|
|
void makeFriend() ;
|
2009-04-07 17:01:45 -04:00
|
|
|
void denyFriend() ;
|
|
|
|
void deleteCert() ;
|
2009-04-29 13:07:28 -04:00
|
|
|
void peerdetails();
|
|
|
|
/** Create the context popup menu and it's submenus */
|
2007-11-14 22:18:48 -05:00
|
|
|
void connecttreeWidgetCostumPopupMenu( QPoint point );
|
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
/** Called when user clicks "Load Cert" to choose location of a Cert file */
|
|
|
|
void loadcert();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
void authneighbour();
|
|
|
|
void addneighbour();
|
2008-03-21 19:31:00 -04:00
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
void on_actionClearLog_triggered();
|
2008-03-21 19:31:00 -04:00
|
|
|
void displayInfoLogMenu(const QPoint& pos);
|
2009-04-29 13:07:28 -04:00
|
|
|
|
|
|
|
void on_actionTabsright_activated();
|
|
|
|
void on_actionTabsnorth_activated();
|
|
|
|
void on_actionTabssouth_activated();
|
|
|
|
void on_actionTabswest_activated();
|
|
|
|
|
2009-04-29 13:48:25 -04:00
|
|
|
void on_actionTabsRounded_activated();
|
|
|
|
void on_actionTabsTriangular_activated();
|
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
QTreeWidgetItem *getCurrentNeighbour();
|
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
/** Define the popup menus for the Context menu */
|
|
|
|
QMenu* contextMnu;
|
|
|
|
/** Defines the actions for the context menu */
|
|
|
|
QAction* peerdetailsAct;
|
|
|
|
QAction* denyFriendAct;
|
|
|
|
QAction* deleteCertAct;
|
|
|
|
QAction* makefriendAct;
|
2007-11-14 22:18:48 -05:00
|
|
|
QAction* authAct;
|
2009-04-29 13:07:28 -04:00
|
|
|
QAction* loadcertAct;
|
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
/* connection dialog */
|
|
|
|
ConnectDialog *connectdialog;
|
|
|
|
|
|
|
|
QTreeWidget *connecttreeWidget;
|
2008-03-17 09:14:17 -04:00
|
|
|
|
|
|
|
class NetworkView *networkview;
|
2009-04-29 13:07:28 -04:00
|
|
|
|
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::NetworkDialog ui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|