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