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 "ui_NetworkDialog.h"
|
2009-11-17 07:45:06 -05:00
|
|
|
#include "RsAutoUpdatePage.h"
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2017-03-01 16:25:57 -05:00
|
|
|
class RSTreeWidgetItemCompareRole ;
|
|
|
|
|
|
|
|
class NetworkDialog : public RsAutoUpdatePage
|
2009-04-29 13:07:28 -04:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2012-11-19 11:01:21 -05:00
|
|
|
Q_PROPERTY(QColor backgroundColorSelf READ backgroundColorSelf WRITE setBackgroundColorSelf)
|
|
|
|
Q_PROPERTY(QColor backgroundColorOwnSign READ backgroundColorOwnSign WRITE setBackgroundColorOwnSign)
|
|
|
|
Q_PROPERTY(QColor backgroundColorAcceptConnection READ backgroundColorAcceptConnection WRITE setBackgroundColorAcceptConnection)
|
|
|
|
Q_PROPERTY(QColor backgroundColorHasSignedMe READ backgroundColorHasSignedMe WRITE setBackgroundColorHasSignedMe)
|
|
|
|
Q_PROPERTY(QColor backgroundColorDenied READ backgroundColorDenied WRITE setBackgroundColorDenied)
|
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
public:
|
|
|
|
/** Default Constructor */
|
|
|
|
NetworkDialog(QWidget *parent = 0);
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-05-13 12:53:20 -04:00
|
|
|
//void load();
|
2009-11-17 07:45:06 -05:00
|
|
|
virtual void updateDisplay() ; // overloaded from RsAutoUpdatePage
|
2009-05-03 20:30:24 -04:00
|
|
|
|
2012-11-19 11:01:21 -05:00
|
|
|
QColor backgroundColorSelf() const { return mBackgroundColorSelf; }
|
|
|
|
QColor backgroundColorOwnSign() const { return mBackgroundColorOwnSign; }
|
|
|
|
QColor backgroundColorAcceptConnection() const { return mBackgroundColorAcceptConnection; }
|
|
|
|
QColor backgroundColorHasSignedMe() const { return mBackgroundColorHasSignedMe; }
|
|
|
|
QColor backgroundColorDenied() const { return mBackgroundColorDenied; }
|
|
|
|
|
|
|
|
void setBackgroundColorSelf(QColor color) { mBackgroundColorSelf = color; }
|
|
|
|
void setBackgroundColorOwnSign(QColor color) { mBackgroundColorOwnSign = color; }
|
|
|
|
void setBackgroundColorAcceptConnection(QColor color) { mBackgroundColorAcceptConnection = color; }
|
|
|
|
void setBackgroundColorHasSignedMe(QColor color) { mBackgroundColorHasSignedMe = color; }
|
|
|
|
void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; }
|
|
|
|
|
2013-05-21 08:55:03 -04:00
|
|
|
private:
|
2009-02-22 12:36:39 -05:00
|
|
|
void insertConnect();
|
2010-12-02 19:54:40 -05:00
|
|
|
// std::string loadneighbour();
|
2007-11-14 22:18:48 -05:00
|
|
|
/* void loadneighbour(); */
|
2013-02-22 16:42:27 -05:00
|
|
|
//void updateNewDiscoveryInfo() ;
|
2008-03-21 19:31:00 -04:00
|
|
|
|
2012-11-19 11:01:21 -05:00
|
|
|
protected:
|
|
|
|
void changeEvent(QEvent *e);
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
private slots:
|
2009-04-29 13:07:28 -04:00
|
|
|
|
2013-05-29 17:32:02 -04:00
|
|
|
void removeUnusedKeys() ;
|
2009-03-21 16:29:23 -04:00
|
|
|
void makeFriend() ;
|
2009-04-07 17:01:45 -04:00
|
|
|
void denyFriend() ;
|
2013-09-07 10:06:08 -04:00
|
|
|
// void deleteCert() ;
|
2009-04-29 13:07:28 -04:00
|
|
|
void peerdetails();
|
2011-05-16 18:51:08 -04:00
|
|
|
void copyLink();
|
2014-03-29 10:18:05 -04:00
|
|
|
// void sendDistantMessage();
|
2009-04-29 13:07:28 -04:00
|
|
|
/** Create the context popup menu and it's submenus */
|
2013-07-04 16:09:46 -04:00
|
|
|
void connectTreeWidgetCostumPopupMenu( QPoint point );
|
|
|
|
//void unvalidGPGKeyWidgetCostumPopupMenu( QPoint point );
|
2010-01-13 16:32:56 -05:00
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
/** Called when user clicks "Load Cert" to choose location of a Cert file */
|
2010-12-02 19:54:40 -05:00
|
|
|
// void loadcert();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-12-02 19:54:40 -05:00
|
|
|
// void authneighbour();
|
|
|
|
// void addneighbour();
|
2009-07-16 10:36:03 -04:00
|
|
|
|
|
|
|
void on_actionAddFriend_activated();
|
|
|
|
//void on_actionCopyKey_activated();
|
|
|
|
void on_actionExportKey_activated();
|
2009-08-04 19:37:01 -04:00
|
|
|
|
|
|
|
void on_actionCreate_New_Profile_activated();
|
2010-12-23 03:58:57 -05:00
|
|
|
|
2013-02-22 16:42:27 -05:00
|
|
|
//void updateNetworkStatus();
|
2010-12-23 03:58:57 -05:00
|
|
|
|
2013-02-22 16:42:27 -05:00
|
|
|
// void loadtabsettings();
|
2009-07-10 20:45:17 -04:00
|
|
|
|
2013-02-22 16:42:27 -05:00
|
|
|
// void on_actionTabsright_activated();
|
|
|
|
// void on_actionTabsnorth_activated();
|
|
|
|
// void on_actionTabssouth_activated();
|
|
|
|
// void on_actionTabswest_activated();
|
|
|
|
//
|
|
|
|
// void on_actionTabsRounded_activated();
|
|
|
|
// void on_actionTabsTriangular_activated();
|
2010-06-09 06:29:34 -04:00
|
|
|
|
2012-10-29 06:59:26 -04:00
|
|
|
void filterColumnChanged(int);
|
2012-04-05 17:03:03 -04:00
|
|
|
void filterItems(const QString &text);
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
private:
|
2009-07-10 20:45:17 -04:00
|
|
|
QTreeWidgetItem *getCurrentNeighbour();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2013-02-22 16:42:27 -05:00
|
|
|
// class NetworkView *networkview;
|
2010-06-09 06:29:34 -04:00
|
|
|
|
2012-04-05 17:03:03 -04:00
|
|
|
bool filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
|
2009-04-29 13:07:28 -04:00
|
|
|
|
2012-11-19 11:01:21 -05:00
|
|
|
/* Color definitions (for standard see qss.default) */
|
|
|
|
QColor mBackgroundColorSelf;
|
|
|
|
QColor mBackgroundColorOwnSign;
|
|
|
|
QColor mBackgroundColorAcceptConnection;
|
|
|
|
QColor mBackgroundColorHasSignedMe;
|
|
|
|
QColor mBackgroundColorDenied;
|
|
|
|
|
2017-03-01 16:25:57 -05:00
|
|
|
RSTreeWidgetItemCompareRole *compareNetworkRole ;
|
|
|
|
|
2009-04-29 13:07:28 -04:00
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::NetworkDialog ui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|