diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index 9f4b47cdc..143220f83 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -1,749 +1,750 @@ -CONFIG += qt gui uic qrc resources uitools idle bitdht # framecatcher# blogs -#CONFIG += use_links -QT += network xml script opengl - -TEMPLATE = app -TARGET = RetroShare - -#CONFIG += minimal - -DEFINES += RS_RELEASE_VERSION -RCC_DIR = temp/qrc -UI_DIR = temp/ui -MOC_DIR = temp/moc - -#CONFIG += debug -debug { - QMAKE_CFLAGS += -g -} - -minimal { - CONFIG -= blogs bitdht - - DEFINES += MINIMAL_RSGUI -} - -################################# Linux ########################################## -# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib -linux-* { - #CONFIG += version_detail_bash_script - QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 - - system(which gpgme-config >/dev/null 2>&1) { - INCLUDEPATH += $$system(gpgme-config --cflags | sed -e "s/-I//g") - } else { - message(Could not find gpgme-config on your system, assuming gpgme.h is in /usr/include) - } - - PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a - - LIBS += ../../libretroshare/src/lib/libretroshare.a - LIBS += -lssl -lgpgme -lupnp -lXss - DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions -} - -linux-g++ { - OBJECTS_DIR = temp/linux-g++/obj -} - -linux-g++-64 { - OBJECTS_DIR = temp/linux-g++-64/obj -} - -version_detail_bash_script { - DEFINES += ADD_LIBRETROSHARE_VERSION_INFO - QMAKE_EXTRA_TARGETS += write_version_detail - PRE_TARGETDEPS = write_version_detail - write_version_detail.commands = ./version_detail.sh -} - -install_rs { - INSTALLS += binary_rs - binary_rs.path = $$(PREFIX)/usr/bin - binary_rs.files = ./RetroShare -} - -#################### Cross compilation for windows under Linux ################### - -win32-x-g++ { - OBJECTS_DIR = temp/win32-x-g++/obj - - LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libminiupnpc.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libz.a - LIBS += -L${HOME}/.wine/drive_c/pthreads/lib -lpthreadGCE2 - LIBS += -lQtUiTools - LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32 -gdi32 - LIBS += -lole32 -lwinmm - - DEFINES *= WINDOWS_SYS WIN32 WIN32_CROSS_UBUNTU - - INCLUDEPATH += ../../../../gpgme-1.1.8/src/ - INCLUDEPATH += ../../../../libgpg-error-1.7/src/ - - RC_FILE = gui/images/retroshare_win.rc -} - -#################################### Windows ##################################### - -win32 { - - OBJECTS_DIR = temp/obj - #LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats" - #QTPLUGIN += qjpeg - - PRE_TARGETDEPS += ../../libretroshare/src/lib/libretroshare.a - - LIBS += ../../libretroshare/src/lib/libretroshare.a - LIBS += -L"../../../../lib" - LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz -# added after bitdht -# LIBS += -lws2_32 - LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32 - LIBS += -lole32 -lwinmm - RC_FILE = gui/images/retroshare_win.rc - - DEFINES += WINDOWS_SYS - - GPG_ERROR_DIR = ../../../../libgpg-error-1.7 - GPGME_DIR = ../../../../gpgme-1.1.8 - INCLUDEPATH += . $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src -} - -##################################### MacOS ###################################### - -macx { - # ENABLE THIS OPTION FOR Univeral Binary BUILD. - # CONFIG += ppc x86 - - CONFIG += version_detail_bash_script - LIBS += ../../libretroshare/src/lib/libretroshare.a - LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error - LIBS += ../../../miniupnpc-1.0/libminiupnpc.a - LIBS += -framework CoreFoundation - - INCLUDEPATH += . - #DEFINES* = MAC_IDLE # for idle feature - CONFIG -= uitools - - -} - -############################## Common stuff ###################################### - -# On Linux systems that alredy have libssl and libcrypto it is advisable -# to rename the patched version of SSL to something like libsslxpgp.a and libcryptoxpg.a - -# ########################################### - -bitdht { - LIBS += ../../libbitdht/src/lib/libbitdht.a - PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a -} - -win32 { -# must be added after bitdht - LIBS += -lws2_32 -} - -DEPENDPATH += . \ - rsiface \ - control \ - gui \ - lang \ - util \ - gui\bwgraph \ - gui\chat \ - gui\connect \ - gui\images \ - gui\common \ - gui\toaster \ - gui\help\browser \ - gui\elastic - -INCLUDEPATH += ../../libretroshare/src/ - -# Input -HEADERS += rshare.h \ - gui/notifyqt.h \ - control/bandwidthevent.h \ - control/eventtype.h \ - gui/QuickStartWizard.h \ - gui/DetailsDialog.h \ - gui/DLListDelegate.h \ - gui/ULListDelegate.h \ - gui/StartDialog.h \ - gui/NetworkDialog.h \ - gui/GenCertDialog.h \ - gui/TransfersDialog.h \ - gui/graphframe.h \ - gui/linetypes.h \ - gui/mainpage.h \ - gui/mainpagestack.h \ - gui/MainWindow.h \ - gui/RSHumanReadableDelegate.h \ - gui/TurtleRouterDialog.h \ - gui/AboutDialog.h \ - gui/ForumsDialog.h \ - gui/forums/ForumDetails.h \ - gui/forums/EditForumDetails.h \ - gui/forums/CreateForum.h \ - gui/forums/CreateForumMsg.h \ - gui/NetworkView.h \ - gui/TrustView.h \ - gui/MessengerWindow.h \ - gui/PeersDialog.h \ - gui/RemoteDirModel.h \ - gui/RetroShareLink.h \ - gui/SearchTreeWidget.h \ - gui/SearchDialog.h \ - gui/SharedFilesDialog.h \ - gui/ShareManager.h \ - gui/ShareDialog.h \ - gui/SFListDelegate.h \ - gui/SoundManager.h \ - gui/FileTransferInfoWidget.h \ - gui/RsAutoUpdatePage.h \ - gui/HelpDialog.h \ - gui/InfoDialog.h \ - gui/LogoBar.h \ - gui/xprogressbar.h \ - gui/plugins/PluginInterface.h \ - gui/im_history/ImHistoryBrowser.h \ - gui/im_history/IMHistoryKeeper.h \ - gui/im_history/IMHistoryReader.h \ - gui/im_history/IMHistoryItem.h \ - gui/im_history/IMHistoryItemDelegate.h \ - gui/im_history/IMHistoryItemPainter.h \ - gui/im_history/IMHistoryWriter.h \ - lang/languagesupport.h \ - util/stringutil.h \ - util/win32.h \ - util/RetroStyleLabel.h \ - util/dllexport.h \ - util/NonCopyable.h \ - util/rsutildll.h \ - util/dllexport.h \ - util/global.h \ - util/rsqtutildll.h \ - util/Interface.h \ - util/PixmapMerging.h \ - util/MouseEventFilter.h \ - util/EventFilter.h \ - util/Widget.h \ - util/rsversion.h \ - util/RsAction.h \ - util/printpreview.h \ - util/log.h \ - util/misc.h \ - gui/bwgraph/bwgraph.h \ - gui/profile/ProfileView.h \ - gui/profile/ProfileEdit.h \ - gui/profile/ProfileWidget.h \ - gui/profile/StatusMessage.h \ - gui/chat/PopupChatWindow.h \ - gui/chat/PopupChatDialog.h \ - gui/chat/HandleRichText.h \ - gui/chat/ChatStyle.h \ - gui/channels/CreateChannel.h \ - gui/channels/ChannelDetails.h \ - gui/channels/CreateChannelMsg.h \ - gui/channels/EditChanDetails.h \ - gui/channels/ShareKey.h \ - gui/connect/ConfCertDialog.h \ - gui/msgs/MessageComposer.h \ - gui/msgs/textformat.h \ - gui/images/retroshare_win.rc.h \ - gui/settings/rsharesettings.h \ - gui/settings/RsharePeerSettings.h \ - gui/settings/rsettings.h \ - gui/settings/rsettingswin.h \ - gui/settings/GeneralPage.h \ - gui/settings/DirectoriesPage.h \ - gui/settings/ServerPage.h \ - gui/settings/NetworkPage.h \ - gui/settings/NotifyPage.h \ - gui/settings/CryptoPage.h \ - gui/settings/MessagePage.h \ - gui/settings/NewTag.h \ - gui/settings/ForumPage.h \ - gui/settings/AppearancePage.h \ - gui/settings/FileAssociationsPage.h \ - gui/settings/SoundPage.h \ - gui/settings/TransferPage.h \ - gui/settings/ChatPage.h \ - gui/settings/AddFileAssociationDialog.h \ - gui/toaster/MessageToaster.h \ - gui/toaster/OnlineToaster.h \ - gui/toaster/DownloadToaster.h \ - gui/common/vmessagebox.h \ - gui/common/rwindow.h \ - gui/common/html.h \ - gui/common/StatusDefs.h \ - gui/common/TagDefs.h \ - gui/common/GroupDefs.h \ - gui/common/Emoticons.h \ - gui/common/RSTreeWidgetItem.h \ - gui/common/RSTabWidget.h \ - gui/common/RSItemDelegate.h \ - gui/common/PeerDefs.h \ - gui/common/PopularityDefs.h \ - gui/MessagesDialog.h \ - gui/help/browser/helpbrowser.h \ - gui/help/browser/helptextbrowser.h \ - gui/statusbar/peerstatus.h \ - gui/statusbar/natstatus.h \ - gui/statusbar/dhtstatus.h \ - gui/statusbar/ratesstatus.h \ - gui/statusbar/hashingstatus.h \ - gui/advsearch/advancedsearchdialog.h \ - gui/advsearch/expressionwidget.h \ - gui/advsearch/guiexprelement.h \ - gui/elastic/graphwidget.h \ - gui/elastic/edge.h \ - gui/elastic/arrow.h \ - gui/elastic/node.h \ - gui/NewsFeed.h \ - gui/ChannelFeed.h \ - gui/ChanGroupDelegate.h \ - gui/feeds/FeedHolder.h \ - gui/feeds/ForumNewItem.h \ - gui/feeds/ForumMsgItem.h \ - gui/feeds/PeerItem.h \ - gui/feeds/MsgItem.h \ - gui/feeds/ChatMsgItem.h \ - gui/feeds/ChanNewItem.h \ - gui/feeds/ChanMsgItem.h \ - gui/feeds/SubFileItem.h \ - gui/feeds/SubDestItem.h \ - gui/feeds/AttachFileItem.h \ - gui/connect/ConnectFriendWizard.h \ - gui/groups/CreateGroup.h - - -FORMS += gui/StartDialog.ui \ - gui/GenCertDialog.ui \ - gui/AboutDialog.ui \ - gui/QuickStartWizard.ui \ - gui/NetworkDialog.ui \ - gui/TransfersDialog.ui \ - gui/ForumsDialog.ui \ - gui/MainWindow.ui \ - gui/TurtleRouterDialog.ui \ - gui/forums/CreateForum.ui \ - gui/forums/CreateForumMsg.ui \ - gui/forums/ForumDetails.ui \ - gui/forums/EditForumDetails.ui \ - gui/NetworkView.ui \ - gui/TrustView.ui \ - gui/MessengerWindow.ui \ - gui/PeersDialog.ui \ - gui/SearchDialog.ui \ - gui/SharedFilesDialog.ui \ - gui/ShareManager.ui \ - gui/ShareDialog.ui \ - gui/MessagesDialog.ui \ - gui/help/browser/helpbrowser.ui \ - gui/HelpDialog.ui \ - gui/InfoDialog.ui \ - gui/DetailsDialog.ui \ - gui/bwgraph/bwgraph.ui \ - gui/profile/ProfileView.ui \ - gui/profile/ProfileEdit.ui \ - gui/profile/ProfileWidget.ui \ - gui/profile/StatusMessage.ui \ - gui/channels/CreateChannel.ui \ - gui/channels/CreateChannelMsg.ui \ - gui/channels/ChannelDetails.ui \ - gui/channels/EditChanDetails.ui \ - gui/channels/ShareKey.ui \ - gui/chat/PopupChatWindow.ui \ - gui/chat/PopupChatDialog.ui \ - gui/connect/ConfCertDialog.ui \ - gui/msgs/MessageComposer.ui \ - gui/settings/settings.ui \ - gui/settings/GeneralPage.ui \ - gui/settings/DirectoriesPage.ui \ - gui/settings/ServerPage.ui \ - gui/settings/NetworkPage.ui \ - gui/settings/NotifyPage.ui \ - gui/settings/CryptoPage.ui \ - gui/settings/MessagePage.ui \ - gui/settings/NewTag.ui \ - gui/settings/ForumPage.ui \ - gui/settings/AppearancePage.ui \ - gui/settings/TransferPage.ui \ - gui/settings/SoundPage.ui \ - gui/settings/ChatPage.ui \ - gui/toaster/MessageToaster.ui \ - gui/toaster/OnlineToaster.ui \ - gui/toaster/DownloadToaster.ui \ - gui/advsearch/AdvancedSearchDialog.ui \ - gui/advsearch/expressionwidget.ui \ - gui/NewsFeed.ui \ - gui/ChannelFeed.ui \ - gui/feeds/ForumNewItem.ui \ - gui/feeds/ForumMsgItem.ui \ - gui/feeds/PeerItem.ui \ - gui/feeds/MsgItem.ui \ - gui/feeds/ChatMsgItem.ui \ - gui/feeds/ChanNewItem.ui \ - gui/feeds/ChanMsgItem.ui \ - gui/feeds/SubFileItem.ui \ - gui/feeds/SubDestItem.ui \ - gui/feeds/AttachFileItem.ui \ - gui/im_history/ImHistoryBrowser.ui \ - gui/groups/CreateGroup.ui - -SOURCES += main.cpp \ - rshare.cpp \ - gui/notifyqt.cpp \ - gui/AboutDialog.cpp \ - gui/QuickStartWizard.cpp \ - gui/DetailsDialog.cpp \ - gui/DLListDelegate.cpp \ - gui/ULListDelegate.cpp \ - gui/StartDialog.cpp \ - gui/GenCertDialog.cpp \ - gui/NetworkDialog.cpp \ - gui/TransfersDialog.cpp \ - gui/graphframe.cpp \ - gui/mainpagestack.cpp \ - gui/TurtleRouterDialog.cpp \ - gui/MainWindow.cpp \ - gui/ForumsDialog.cpp \ - gui/forums/ForumDetails.cpp \ - gui/forums/EditForumDetails.cpp \ - gui/forums/CreateForum.cpp \ - gui/forums/CreateForumMsg.cpp \ - gui/NetworkView.cpp \ - gui/TrustView.cpp \ - gui/MessengerWindow.cpp \ - gui/PeersDialog.cpp \ - gui/RemoteDirModel.cpp \ - gui/RsAutoUpdatePage.cpp \ - gui/RetroShareLink.cpp \ - gui/SearchTreeWidget.cpp \ - gui/SearchDialog.cpp \ - gui/SharedFilesDialog.cpp \ - gui/ShareManager.cpp \ - gui/ShareDialog.cpp \ - gui/SFListDelegate.cpp \ - gui/SoundManager.cpp \ - gui/MessagesDialog.cpp \ - gui/FileTransferInfoWidget.cpp \ - gui/im_history/ImHistoryBrowser.cpp \ - gui/im_history/IMHistoryKeeper.cpp \ - gui/im_history/IMHistoryReader.cpp \ - gui/im_history/IMHistoryItem.cpp \ - gui/im_history/IMHistoryItemDelegate.cpp \ - gui/im_history/IMHistoryItemPainter.cpp \ - gui/im_history/IMHistoryWriter.cpp \ - gui/help/browser/helpbrowser.cpp \ - gui/help/browser/helptextbrowser.cpp \ - gui/HelpDialog.cpp \ - gui/InfoDialog.cpp \ - gui/LogoBar.cpp \ - gui/xprogressbar.cpp \ - lang/languagesupport.cpp \ - util/stringutil.cpp \ - util/win32.cpp \ - util/RetroStyleLabel.cpp \ - util/WidgetBackgroundImage.cpp \ - util/NonCopyable.cpp \ - util/PixmapMerging.cpp \ - util/MouseEventFilter.cpp \ - util/EventFilter.cpp \ - util/Widget.cpp \ - util/RsAction.cpp \ - util/rsversion.cpp \ - util/printpreview.cpp \ - util/log.cpp \ - util/misc.cpp \ - gui/bwgraph/bwgraph.cpp \ - gui/profile/ProfileView.cpp \ - gui/profile/ProfileEdit.cpp \ - gui/profile/ProfileWidget.cpp \ - gui/profile/StatusMessage.cpp \ - gui/channels/CreateChannel.cpp \ - gui/channels/CreateChannelMsg.cpp \ - gui/channels/ChannelDetails.cpp \ - gui/channels/EditChanDetails.cpp \ - gui/channels/ShareKey.cpp \ - gui/chat/PopupChatWindow.cpp \ - gui/chat/PopupChatDialog.cpp \ - gui/chat/HandleRichText.cpp \ - gui/chat/ChatStyle.cpp \ - gui/connect/ConfCertDialog.cpp \ - gui/msgs/MessageComposer.cpp \ - gui/common/vmessagebox.cpp \ - gui/common/rwindow.cpp \ - gui/common/html.cpp \ - gui/common/StatusDefs.cpp \ - gui/common/TagDefs.cpp \ - gui/common/GroupDefs.cpp \ - gui/common/Emoticons.cpp \ - gui/common/RSTreeWidgetItem.cpp \ - gui/common/RSTabWidget.cpp \ - gui/common/RSItemDelegate.cpp \ - gui/common/PeerDefs.cpp \ - gui/common/PopularityDefs.cpp \ - gui/settings/rsharesettings.cpp \ - gui/settings/RsharePeerSettings.cpp \ - gui/settings/rsettings.cpp \ - gui/settings/rsettingswin.cpp \ - gui/settings/GeneralPage.cpp \ - gui/settings/DirectoriesPage.cpp \ - gui/settings/ServerPage.cpp \ - gui/settings/NetworkPage.cpp \ - gui/settings/NotifyPage.cpp \ - gui/settings/CryptoPage.cpp \ - gui/settings/MessagePage.cpp \ - gui/settings/NewTag.cpp \ - gui/settings/ForumPage.cpp \ - gui/settings/AppearancePage.cpp \ - gui/settings/FileAssociationsPage.cpp \ - gui/settings/SoundPage.cpp \ - gui/settings/TransferPage.cpp \ - gui/settings/ChatPage.cpp \ - gui/settings/AddFileAssociationDialog.cpp \ - gui/statusbar/peerstatus.cpp \ - gui/statusbar/natstatus.cpp \ - gui/statusbar/dhtstatus.cpp \ - gui/statusbar/ratesstatus.cpp \ - gui/statusbar/hashingstatus.cpp \ - gui/toaster/MessageToaster.cpp \ - gui/toaster/DownloadToaster.cpp \ - gui/toaster/OnlineToaster.cpp \ - gui/advsearch/advancedsearchdialog.cpp \ - gui/advsearch/expressionwidget.cpp \ - gui/advsearch/guiexprelement.cpp \ - gui/elastic/graphwidget.cpp \ - gui/elastic/edge.cpp \ - gui/elastic/arrow.cpp \ - gui/elastic/node.cpp \ - gui/NewsFeed.cpp \ - gui/ChannelFeed.cpp \ - gui/ChanGroupDelegate.cpp \ - gui/feeds/ForumNewItem.cpp \ - gui/feeds/ForumMsgItem.cpp \ - gui/feeds/PeerItem.cpp \ - gui/feeds/MsgItem.cpp \ - gui/feeds/ChatMsgItem.cpp \ - gui/feeds/ChanNewItem.cpp \ - gui/feeds/ChanMsgItem.cpp \ - gui/feeds/SubFileItem.cpp \ - gui/feeds/SubDestItem.cpp \ - gui/feeds/AttachFileItem.cpp \ - gui/connect/ConnectFriendWizard.cpp \ - gui/groups/CreateGroup.cpp - -RESOURCES += gui/images.qrc lang/lang.qrc gui/help/content/content.qrc - -TRANSLATIONS += \ - lang/retroshare_en.ts \ - lang/retroshare_da.ts \ - lang/retroshare_de.ts \ - lang/retroshare_fi.ts \ - lang/retroshare_fr.ts \ - lang/retroshare_ja_JP.ts \ - lang/retroshare_ko.ts \ - lang/retroshare_ru.ts \ - lang/retroshare_tr.ts \ - lang/retroshare_sv.ts \ - lang/retroshare_zh_CN.ts - -unfinishedtranslations { - - TRANSLATIONS += \ - lang/retroshare_bg.ts \ - lang/retroshare_es.ts \ - lang/retroshare_af.ts \ - lang/retroshare_gr.ts \ - lang/retroshare_it.ts \ - lang/retroshare_nl.ts \ - lang/retroshare_pl.ts \ - lang/retroshare_pt.ts \ - lang/retroshare_sl.ts \ - lang/retroshare_sr.ts \ - lang/retroshare_zh_TW.ts - -} - -# Shifted Qt4.4 dependancies to here. -# qmake CONFIG=pluginmgr - -pluginmgr { - - SOURCES += gui/PluginsPage.cpp \ - gui/PluginManagerWidget.cpp \ - gui/PluginManager.cpp - - HEADERS += gui/PluginsPage.h \ - gui/PluginManagerWidget.h \ - gui/PluginManager.h - - DEFINES *= PLUGINMGR - -} - -blogs { - -DEPENDPATH += gui/unfinished \ - -HEADERS += gui/unfinished/blogs/BlogsDialog.h \ - gui/unfinished/blogs/CreateBlog.h \ - gui/unfinished/blogs/CreateBlogMsg.h \ - gui/unfinished/blogs/BlogsMsgItem.h \ - gui/unfinished/blogs/BlogDetails.h \ - gui/feeds/BlogNewItem.h \ - gui/feeds/BlogMsgItem.h \ - -FORMS += gui/unfinished/blogs/BlogsDialog.ui \ - gui/unfinished/blogs/CreateBlog.ui \ - gui/unfinished/blogs/CreateBlogMsg.ui \ - gui/unfinished/blogs/BlogsMsgItem.ui \ - gui/unfinished/blogs/BlogDetails.ui \ - gui/feeds/BlogNewItem.ui \ - gui/feeds/BlogMsgItem.ui \ - -SOURCES += gui/unfinished/blogs/BlogsDialog.cpp \ - gui/unfinished/blogs/CreateBlog.cpp \ - gui/unfinished/blogs/CreateBlogMsg.cpp \ - gui/unfinished/blogs/BlogsMsgItem.cpp \ - gui/unfinished/blogs/BlogDetails.cpp \ - gui/feeds/BlogNewItem.cpp \ - gui/feeds/BlogMsgItem.cpp \ - -DEFINES += BLOGS -} - -use_links { -HEADERS += gui/AddLinksDialog.h \ - gui/LinksDialog.h - -FORMS += gui/AddLinksDialog.ui \ - gui/LinksDialog.ui - -SOURCES += gui/AddLinksDialog.cpp \ - gui/LinksDialog.cpp - -DEFINES += RS_USE_LINKS -} - -unfinished { - -DEPENDPATH += gui/unfinished \ - -HEADERS += gui/unfinished/ApplicationWindow.h \ - gui/unfinished/CalDialog.h \ - gui/unfinished/ExampleDialog.h \ - gui/unfinished/GamesDialog.h \ - gui/unfinished/PhotoDialog.h \ - gui/unfinished/PhotoShow.h \ - gui/unfinished/StatisticDialog.h - - -FORMS += gui/unfinished/ApplicationWindow.ui \ - gui/unfinished/CalDialog.ui \ - gui/unfinished/ExampleDialog.ui \ - gui/unfinished/GamesDialog.ui \ - gui/unfinished/PhotoDialog.ui \ - gui/unfinished/PhotoShow.ui \ - gui/unfinished/StatisticDialog.ui - -SOURCES += gui/unfinished/ApplicationWindow.cpp \ - gui/unfinished/CalDialog.cpp \ - gui/unfinished/ExampleDialog.cpp \ - gui/unfinished/GamesDialog.cpp \ - gui/unfinished/PhotoDialog.cpp \ - gui/unfinished/PhotoShow.cpp \ - gui/unfinished/StatisticDialog.cpp - - DEFINES *= UNFINISHED -} - -idle { - -HEADERS += idle/idle.h - -SOURCES += idle/idle.cpp \ - idle/idle_platform.cpp -} - -framecatcher { - -HEADERS += util/framecatcher.h - -SOURCES += util/framecatcher.cpp - -LIBS += -lxine - -DEFINES *= CHANNELS_FRAME_CATCHER - -} - - - -minimal { - SOURCES = main.cpp \ - rshare.cpp \ - gui/notifyqt.cpp \ - gui/MessengerWindow.cpp \ - gui/StartDialog.cpp \ - gui/GenCertDialog.cpp \ - gui/connect/ConfCertDialog.cpp \ - gui/InfoDialog.cpp \ - gui/help/browser/helpbrowser.cpp \ - gui/help/browser/helptextbrowser.cpp \ - gui/settings/rsettings.cpp \ - gui/settings/RsharePeerSettings.cpp \ - gui/settings/rsharesettings.cpp \ - gui/common/rwindow.cpp \ - gui/common/StatusDefs.cpp \ - gui/LogoBar.cpp \ - gui/RsAutoUpdatePage.cpp \ - gui/common/vmessagebox.cpp \ - gui/common/html.cpp \ - util/RetroStyleLabel.cpp \ - util/log.cpp \ - util/win32.cpp \ - util/Widget.cpp \ - util/stringutil.cpp \ - lang/languagesupport.cpp - - FORMS = gui/MessengerWindow.ui \ - gui/StartDialog.ui \ - gui/GenCertDialog.ui \ - gui/connect/ConfCertDialog.ui \ - gui/InfoDialog.ui \ - gui/help/browser/helpbrowser.ui - - HEADERS = rshare.h \ - gui/notifyqt.h \ - gui/MessengerWindow.h \ - gui/StartDialog.h \ - gui/GenCertDialog.h \ - gui/connect/ConfCertDialog.h \ - gui/InfoDialog.h \ - gui/help/browser/helpbrowser.h \ - gui/help/browser/helptextbrowser.h \ - gui/settings/rsettings.h \ - gui/settings/rsharesettings.h \ - gui/settings/RsharePeerSettings.h \ - gui/common/rwindow.h \ - gui/common/StatusDefs.h \ - gui/LogoBar.h \ - gui/RsAutoUpdatePage.h \ - gui/common/vmessagebox.h \ - gui/common/html.h \ - util/RetroStyleLabel.h \ - util/log.h \ - util/win32.h \ - util/Widget.h \ - util/stringutil.h \ - lang/languagesupport.h -} +CONFIG += qt gui uic qrc resources uitools idle bitdht # framecatcher# blogs +#CONFIG += use_links +QT += network xml script opengl + +TEMPLATE = app +TARGET = RetroShare + +#CONFIG += minimal + +DEFINES += RS_RELEASE_VERSION +RCC_DIR = temp/qrc +UI_DIR = temp/ui +MOC_DIR = temp/moc + +#CONFIG += debug +debug { + QMAKE_CFLAGS += -g +} + +minimal { + CONFIG -= blogs bitdht + + DEFINES += MINIMAL_RSGUI +} + +################################# Linux ########################################## +# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib +linux-* { + #CONFIG += version_detail_bash_script + QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 + + system(which gpgme-config >/dev/null 2>&1) { + INCLUDEPATH += $$system(gpgme-config --cflags | sed -e "s/-I//g") + } else { + message(Could not find gpgme-config on your system, assuming gpgme.h is in /usr/include) + } + + PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a + + LIBS += ../../libretroshare/src/lib/libretroshare.a + LIBS += -lssl -lgpgme -lupnp -lXss + DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions +} + +linux-g++ { + OBJECTS_DIR = temp/linux-g++/obj +} + +linux-g++-64 { + OBJECTS_DIR = temp/linux-g++-64/obj +} + +version_detail_bash_script { + DEFINES += ADD_LIBRETROSHARE_VERSION_INFO + QMAKE_EXTRA_TARGETS += write_version_detail + PRE_TARGETDEPS = write_version_detail + write_version_detail.commands = ./version_detail.sh +} + +install_rs { + INSTALLS += binary_rs + binary_rs.path = $$(PREFIX)/usr/bin + binary_rs.files = ./RetroShare +} + +#################### Cross compilation for windows under Linux ################### + +win32-x-g++ { + OBJECTS_DIR = temp/win32-x-g++/obj + + LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libminiupnpc.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libz.a + LIBS += -L${HOME}/.wine/drive_c/pthreads/lib -lpthreadGCE2 + LIBS += -lQtUiTools + LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32 -gdi32 + LIBS += -lole32 -lwinmm + + DEFINES *= WINDOWS_SYS WIN32 WIN32_CROSS_UBUNTU + + INCLUDEPATH += ../../../../gpgme-1.1.8/src/ + INCLUDEPATH += ../../../../libgpg-error-1.7/src/ + + RC_FILE = gui/images/retroshare_win.rc +} + +#################################### Windows ##################################### + +win32 { + + OBJECTS_DIR = temp/obj + #LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats" + #QTPLUGIN += qjpeg + + PRE_TARGETDEPS += ../../libretroshare/src/lib/libretroshare.a + + LIBS += ../../libretroshare/src/lib/libretroshare.a + LIBS += -L"../../../../lib" + LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz +# added after bitdht +# LIBS += -lws2_32 + LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32 + LIBS += -lole32 -lwinmm + RC_FILE = gui/images/retroshare_win.rc + + DEFINES += WINDOWS_SYS + + GPG_ERROR_DIR = ../../../../libgpg-error-1.7 + GPGME_DIR = ../../../../gpgme-1.1.8 + INCLUDEPATH += . $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src +} + +##################################### MacOS ###################################### + +macx { + # ENABLE THIS OPTION FOR Univeral Binary BUILD. + # CONFIG += ppc x86 + + CONFIG += version_detail_bash_script + LIBS += ../../libretroshare/src/lib/libretroshare.a + LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error + LIBS += ../../../miniupnpc-1.0/libminiupnpc.a + LIBS += -framework CoreFoundation + + INCLUDEPATH += . + #DEFINES* = MAC_IDLE # for idle feature + CONFIG -= uitools + + +} + +############################## Common stuff ###################################### + +# On Linux systems that alredy have libssl and libcrypto it is advisable +# to rename the patched version of SSL to something like libsslxpgp.a and libcryptoxpg.a + +# ########################################### + +bitdht { + LIBS += ../../libbitdht/src/lib/libbitdht.a + PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a +} + +win32 { +# must be added after bitdht + LIBS += -lws2_32 +} + +DEPENDPATH += . \ + rsiface \ + control \ + gui \ + lang \ + util \ + gui\bwgraph \ + gui\chat \ + gui\connect \ + gui\images \ + gui\common \ + gui\toaster \ + gui\help\browser \ + gui\elastic + +INCLUDEPATH += ../../libretroshare/src/ + +# Input +HEADERS += rshare.h \ + gui/notifyqt.h \ + control/bandwidthevent.h \ + control/eventtype.h \ + gui/QuickStartWizard.h \ + gui/DetailsDialog.h \ + gui/DLListDelegate.h \ + gui/ULListDelegate.h \ + gui/StartDialog.h \ + gui/NetworkDialog.h \ + gui/GenCertDialog.h \ + gui/TransfersDialog.h \ + gui/graphframe.h \ + gui/linetypes.h \ + gui/mainpage.h \ + gui/mainpagestack.h \ + gui/MainWindow.h \ + gui/RSHumanReadableDelegate.h \ + gui/TurtleRouterDialog.h \ + gui/AboutDialog.h \ + gui/ForumsDialog.h \ + gui/forums/ForumDetails.h \ + gui/forums/EditForumDetails.h \ + gui/forums/CreateForum.h \ + gui/forums/CreateForumMsg.h \ + gui/NetworkView.h \ + gui/TrustView.h \ + gui/MessengerWindow.h \ + gui/PeersDialog.h \ + gui/RemoteDirModel.h \ + gui/RetroShareLink.h \ + gui/SearchTreeWidget.h \ + gui/SearchDialog.h \ + gui/SharedFilesDialog.h \ + gui/ShareManager.h \ + gui/ShareDialog.h \ + gui/SFListDelegate.h \ + gui/SoundManager.h \ + gui/FileTransferInfoWidget.h \ + gui/RsAutoUpdatePage.h \ + gui/HelpDialog.h \ + gui/InfoDialog.h \ + gui/LogoBar.h \ + gui/xprogressbar.h \ + gui/plugins/PluginInterface.h \ + gui/im_history/ImHistoryBrowser.h \ + gui/im_history/IMHistoryKeeper.h \ + gui/im_history/IMHistoryReader.h \ + gui/im_history/IMHistoryItem.h \ + gui/im_history/IMHistoryItemDelegate.h \ + gui/im_history/IMHistoryItemPainter.h \ + gui/im_history/IMHistoryWriter.h \ + lang/languagesupport.h \ + util/stringutil.h \ + util/win32.h \ + util/RetroStyleLabel.h \ + util/dllexport.h \ + util/NonCopyable.h \ + util/rsutildll.h \ + util/dllexport.h \ + util/global.h \ + util/rsqtutildll.h \ + util/Interface.h \ + util/PixmapMerging.h \ + util/MouseEventFilter.h \ + util/EventFilter.h \ + util/Widget.h \ + util/rsversion.h \ + util/RsAction.h \ + util/printpreview.h \ + util/log.h \ + util/misc.h \ + gui/bwgraph/bwgraph.h \ + gui/profile/ProfileView.h \ + gui/profile/ProfileEdit.h \ + gui/profile/ProfileWidget.h \ + gui/profile/StatusMessage.h \ + gui/chat/PopupChatWindow.h \ + gui/chat/PopupChatDialog.h \ + gui/chat/HandleRichText.h \ + gui/chat/ChatStyle.h \ + gui/channels/CreateChannel.h \ + gui/channels/ChannelDetails.h \ + gui/channels/CreateChannelMsg.h \ + gui/channels/EditChanDetails.h \ + gui/channels/ShareKey.h \ + gui/connect/ConfCertDialog.h \ + gui/msgs/MessageComposer.h \ + gui/msgs/textformat.h \ + gui/images/retroshare_win.rc.h \ + gui/settings/rsharesettings.h \ + gui/settings/RsharePeerSettings.h \ + gui/settings/rsettings.h \ + gui/settings/rsettingswin.h \ + gui/settings/GeneralPage.h \ + gui/settings/DirectoriesPage.h \ + gui/settings/ServerPage.h \ + gui/settings/NetworkPage.h \ + gui/settings/NotifyPage.h \ + gui/settings/CryptoPage.h \ + gui/settings/MessagePage.h \ + gui/settings/NewTag.h \ + gui/settings/ForumPage.h \ + gui/settings/AppearancePage.h \ + gui/settings/FileAssociationsPage.h \ + gui/settings/SoundPage.h \ + gui/settings/TransferPage.h \ + gui/settings/ChatPage.h \ + gui/settings/AddFileAssociationDialog.h \ + gui/toaster/MessageToaster.h \ + gui/toaster/OnlineToaster.h \ + gui/toaster/DownloadToaster.h \ + gui/common/vmessagebox.h \ + gui/common/rwindow.h \ + gui/common/html.h \ + gui/common/StatusDefs.h \ + gui/common/TagDefs.h \ + gui/common/GroupDefs.h \ + gui/common/Emoticons.h \ + gui/common/RSTreeWidgetItem.h \ + gui/common/RSTabWidget.h \ + gui/common/RSItemDelegate.h \ + gui/common/PeerDefs.h \ + gui/common/PopularityDefs.h \ + gui/common/GroupTreeWidget.h \ + gui/MessagesDialog.h \ + gui/help/browser/helpbrowser.h \ + gui/help/browser/helptextbrowser.h \ + gui/statusbar/peerstatus.h \ + gui/statusbar/natstatus.h \ + gui/statusbar/dhtstatus.h \ + gui/statusbar/ratesstatus.h \ + gui/statusbar/hashingstatus.h \ + gui/advsearch/advancedsearchdialog.h \ + gui/advsearch/expressionwidget.h \ + gui/advsearch/guiexprelement.h \ + gui/elastic/graphwidget.h \ + gui/elastic/edge.h \ + gui/elastic/arrow.h \ + gui/elastic/node.h \ + gui/NewsFeed.h \ + gui/ChannelFeed.h \ + gui/feeds/FeedHolder.h \ + gui/feeds/ForumNewItem.h \ + gui/feeds/ForumMsgItem.h \ + gui/feeds/PeerItem.h \ + gui/feeds/MsgItem.h \ + gui/feeds/ChatMsgItem.h \ + gui/feeds/ChanNewItem.h \ + gui/feeds/ChanMsgItem.h \ + gui/feeds/SubFileItem.h \ + gui/feeds/SubDestItem.h \ + gui/feeds/AttachFileItem.h \ + gui/connect/ConnectFriendWizard.h \ + gui/groups/CreateGroup.h + + +FORMS += gui/StartDialog.ui \ + gui/GenCertDialog.ui \ + gui/AboutDialog.ui \ + gui/QuickStartWizard.ui \ + gui/NetworkDialog.ui \ + gui/TransfersDialog.ui \ + gui/ForumsDialog.ui \ + gui/MainWindow.ui \ + gui/TurtleRouterDialog.ui \ + gui/forums/CreateForum.ui \ + gui/forums/CreateForumMsg.ui \ + gui/forums/ForumDetails.ui \ + gui/forums/EditForumDetails.ui \ + gui/NetworkView.ui \ + gui/TrustView.ui \ + gui/MessengerWindow.ui \ + gui/PeersDialog.ui \ + gui/SearchDialog.ui \ + gui/SharedFilesDialog.ui \ + gui/ShareManager.ui \ + gui/ShareDialog.ui \ + gui/MessagesDialog.ui \ + gui/help/browser/helpbrowser.ui \ + gui/HelpDialog.ui \ + gui/InfoDialog.ui \ + gui/DetailsDialog.ui \ + gui/bwgraph/bwgraph.ui \ + gui/profile/ProfileView.ui \ + gui/profile/ProfileEdit.ui \ + gui/profile/ProfileWidget.ui \ + gui/profile/StatusMessage.ui \ + gui/channels/CreateChannel.ui \ + gui/channels/CreateChannelMsg.ui \ + gui/channels/ChannelDetails.ui \ + gui/channels/EditChanDetails.ui \ + gui/channels/ShareKey.ui \ + gui/chat/PopupChatWindow.ui \ + gui/chat/PopupChatDialog.ui \ + gui/connect/ConfCertDialog.ui \ + gui/msgs/MessageComposer.ui \ + gui/settings/settings.ui \ + gui/settings/GeneralPage.ui \ + gui/settings/DirectoriesPage.ui \ + gui/settings/ServerPage.ui \ + gui/settings/NetworkPage.ui \ + gui/settings/NotifyPage.ui \ + gui/settings/CryptoPage.ui \ + gui/settings/MessagePage.ui \ + gui/settings/NewTag.ui \ + gui/settings/ForumPage.ui \ + gui/settings/AppearancePage.ui \ + gui/settings/TransferPage.ui \ + gui/settings/SoundPage.ui \ + gui/settings/ChatPage.ui \ + gui/toaster/MessageToaster.ui \ + gui/toaster/OnlineToaster.ui \ + gui/toaster/DownloadToaster.ui \ + gui/advsearch/AdvancedSearchDialog.ui \ + gui/advsearch/expressionwidget.ui \ + gui/NewsFeed.ui \ + gui/ChannelFeed.ui \ + gui/feeds/ForumNewItem.ui \ + gui/feeds/ForumMsgItem.ui \ + gui/feeds/PeerItem.ui \ + gui/feeds/MsgItem.ui \ + gui/feeds/ChatMsgItem.ui \ + gui/feeds/ChanNewItem.ui \ + gui/feeds/ChanMsgItem.ui \ + gui/feeds/SubFileItem.ui \ + gui/feeds/SubDestItem.ui \ + gui/feeds/AttachFileItem.ui \ + gui/im_history/ImHistoryBrowser.ui \ + gui/groups/CreateGroup.ui \ + gui/common/GroupTreeWidget.ui + +SOURCES += main.cpp \ + rshare.cpp \ + gui/notifyqt.cpp \ + gui/AboutDialog.cpp \ + gui/QuickStartWizard.cpp \ + gui/DetailsDialog.cpp \ + gui/DLListDelegate.cpp \ + gui/ULListDelegate.cpp \ + gui/StartDialog.cpp \ + gui/GenCertDialog.cpp \ + gui/NetworkDialog.cpp \ + gui/TransfersDialog.cpp \ + gui/graphframe.cpp \ + gui/mainpagestack.cpp \ + gui/TurtleRouterDialog.cpp \ + gui/MainWindow.cpp \ + gui/ForumsDialog.cpp \ + gui/forums/ForumDetails.cpp \ + gui/forums/EditForumDetails.cpp \ + gui/forums/CreateForum.cpp \ + gui/forums/CreateForumMsg.cpp \ + gui/NetworkView.cpp \ + gui/TrustView.cpp \ + gui/MessengerWindow.cpp \ + gui/PeersDialog.cpp \ + gui/RemoteDirModel.cpp \ + gui/RsAutoUpdatePage.cpp \ + gui/RetroShareLink.cpp \ + gui/SearchTreeWidget.cpp \ + gui/SearchDialog.cpp \ + gui/SharedFilesDialog.cpp \ + gui/ShareManager.cpp \ + gui/ShareDialog.cpp \ + gui/SFListDelegate.cpp \ + gui/SoundManager.cpp \ + gui/MessagesDialog.cpp \ + gui/FileTransferInfoWidget.cpp \ + gui/im_history/ImHistoryBrowser.cpp \ + gui/im_history/IMHistoryKeeper.cpp \ + gui/im_history/IMHistoryReader.cpp \ + gui/im_history/IMHistoryItem.cpp \ + gui/im_history/IMHistoryItemDelegate.cpp \ + gui/im_history/IMHistoryItemPainter.cpp \ + gui/im_history/IMHistoryWriter.cpp \ + gui/help/browser/helpbrowser.cpp \ + gui/help/browser/helptextbrowser.cpp \ + gui/HelpDialog.cpp \ + gui/InfoDialog.cpp \ + gui/LogoBar.cpp \ + gui/xprogressbar.cpp \ + lang/languagesupport.cpp \ + util/stringutil.cpp \ + util/win32.cpp \ + util/RetroStyleLabel.cpp \ + util/WidgetBackgroundImage.cpp \ + util/NonCopyable.cpp \ + util/PixmapMerging.cpp \ + util/MouseEventFilter.cpp \ + util/EventFilter.cpp \ + util/Widget.cpp \ + util/RsAction.cpp \ + util/rsversion.cpp \ + util/printpreview.cpp \ + util/log.cpp \ + util/misc.cpp \ + gui/bwgraph/bwgraph.cpp \ + gui/profile/ProfileView.cpp \ + gui/profile/ProfileEdit.cpp \ + gui/profile/ProfileWidget.cpp \ + gui/profile/StatusMessage.cpp \ + gui/channels/CreateChannel.cpp \ + gui/channels/CreateChannelMsg.cpp \ + gui/channels/ChannelDetails.cpp \ + gui/channels/EditChanDetails.cpp \ + gui/channels/ShareKey.cpp \ + gui/chat/PopupChatWindow.cpp \ + gui/chat/PopupChatDialog.cpp \ + gui/chat/HandleRichText.cpp \ + gui/chat/ChatStyle.cpp \ + gui/connect/ConfCertDialog.cpp \ + gui/msgs/MessageComposer.cpp \ + gui/common/vmessagebox.cpp \ + gui/common/rwindow.cpp \ + gui/common/html.cpp \ + gui/common/StatusDefs.cpp \ + gui/common/TagDefs.cpp \ + gui/common/GroupDefs.cpp \ + gui/common/Emoticons.cpp \ + gui/common/RSTreeWidgetItem.cpp \ + gui/common/RSTabWidget.cpp \ + gui/common/RSItemDelegate.cpp \ + gui/common/PeerDefs.cpp \ + gui/common/PopularityDefs.cpp \ + gui/common/GroupTreeWidget.cpp \ + gui/settings/rsharesettings.cpp \ + gui/settings/RsharePeerSettings.cpp \ + gui/settings/rsettings.cpp \ + gui/settings/rsettingswin.cpp \ + gui/settings/GeneralPage.cpp \ + gui/settings/DirectoriesPage.cpp \ + gui/settings/ServerPage.cpp \ + gui/settings/NetworkPage.cpp \ + gui/settings/NotifyPage.cpp \ + gui/settings/CryptoPage.cpp \ + gui/settings/MessagePage.cpp \ + gui/settings/NewTag.cpp \ + gui/settings/ForumPage.cpp \ + gui/settings/AppearancePage.cpp \ + gui/settings/FileAssociationsPage.cpp \ + gui/settings/SoundPage.cpp \ + gui/settings/TransferPage.cpp \ + gui/settings/ChatPage.cpp \ + gui/settings/AddFileAssociationDialog.cpp \ + gui/statusbar/peerstatus.cpp \ + gui/statusbar/natstatus.cpp \ + gui/statusbar/dhtstatus.cpp \ + gui/statusbar/ratesstatus.cpp \ + gui/statusbar/hashingstatus.cpp \ + gui/toaster/MessageToaster.cpp \ + gui/toaster/DownloadToaster.cpp \ + gui/toaster/OnlineToaster.cpp \ + gui/advsearch/advancedsearchdialog.cpp \ + gui/advsearch/expressionwidget.cpp \ + gui/advsearch/guiexprelement.cpp \ + gui/elastic/graphwidget.cpp \ + gui/elastic/edge.cpp \ + gui/elastic/arrow.cpp \ + gui/elastic/node.cpp \ + gui/NewsFeed.cpp \ + gui/ChannelFeed.cpp \ + gui/feeds/ForumNewItem.cpp \ + gui/feeds/ForumMsgItem.cpp \ + gui/feeds/PeerItem.cpp \ + gui/feeds/MsgItem.cpp \ + gui/feeds/ChatMsgItem.cpp \ + gui/feeds/ChanNewItem.cpp \ + gui/feeds/ChanMsgItem.cpp \ + gui/feeds/SubFileItem.cpp \ + gui/feeds/SubDestItem.cpp \ + gui/feeds/AttachFileItem.cpp \ + gui/connect/ConnectFriendWizard.cpp \ + gui/groups/CreateGroup.cpp + +RESOURCES += gui/images.qrc lang/lang.qrc gui/help/content/content.qrc + +TRANSLATIONS += \ + lang/retroshare_en.ts \ + lang/retroshare_da.ts \ + lang/retroshare_de.ts \ + lang/retroshare_fi.ts \ + lang/retroshare_fr.ts \ + lang/retroshare_ja_JP.ts \ + lang/retroshare_ko.ts \ + lang/retroshare_ru.ts \ + lang/retroshare_tr.ts \ + lang/retroshare_sv.ts \ + lang/retroshare_zh_CN.ts + +unfinishedtranslations { + + TRANSLATIONS += \ + lang/retroshare_bg.ts \ + lang/retroshare_es.ts \ + lang/retroshare_af.ts \ + lang/retroshare_gr.ts \ + lang/retroshare_it.ts \ + lang/retroshare_nl.ts \ + lang/retroshare_pl.ts \ + lang/retroshare_pt.ts \ + lang/retroshare_sl.ts \ + lang/retroshare_sr.ts \ + lang/retroshare_zh_TW.ts + +} + +# Shifted Qt4.4 dependancies to here. +# qmake CONFIG=pluginmgr + +pluginmgr { + + SOURCES += gui/PluginsPage.cpp \ + gui/PluginManagerWidget.cpp \ + gui/PluginManager.cpp + + HEADERS += gui/PluginsPage.h \ + gui/PluginManagerWidget.h \ + gui/PluginManager.h + + DEFINES *= PLUGINMGR + +} + +blogs { + +DEPENDPATH += gui/unfinished \ + +HEADERS += gui/unfinished/blogs/BlogsDialog.h \ + gui/unfinished/blogs/CreateBlog.h \ + gui/unfinished/blogs/CreateBlogMsg.h \ + gui/unfinished/blogs/BlogsMsgItem.h \ + gui/unfinished/blogs/BlogDetails.h \ + gui/feeds/BlogNewItem.h \ + gui/feeds/BlogMsgItem.h \ + +FORMS += gui/unfinished/blogs/BlogsDialog.ui \ + gui/unfinished/blogs/CreateBlog.ui \ + gui/unfinished/blogs/CreateBlogMsg.ui \ + gui/unfinished/blogs/BlogsMsgItem.ui \ + gui/unfinished/blogs/BlogDetails.ui \ + gui/feeds/BlogNewItem.ui \ + gui/feeds/BlogMsgItem.ui \ + +SOURCES += gui/unfinished/blogs/BlogsDialog.cpp \ + gui/unfinished/blogs/CreateBlog.cpp \ + gui/unfinished/blogs/CreateBlogMsg.cpp \ + gui/unfinished/blogs/BlogsMsgItem.cpp \ + gui/unfinished/blogs/BlogDetails.cpp \ + gui/feeds/BlogNewItem.cpp \ + gui/feeds/BlogMsgItem.cpp \ + +DEFINES += BLOGS +} + +use_links { +HEADERS += gui/AddLinksDialog.h \ + gui/LinksDialog.h + +FORMS += gui/AddLinksDialog.ui \ + gui/LinksDialog.ui + +SOURCES += gui/AddLinksDialog.cpp \ + gui/LinksDialog.cpp + +DEFINES += RS_USE_LINKS +} + +unfinished { + +DEPENDPATH += gui/unfinished \ + +HEADERS += gui/unfinished/ApplicationWindow.h \ + gui/unfinished/CalDialog.h \ + gui/unfinished/ExampleDialog.h \ + gui/unfinished/GamesDialog.h \ + gui/unfinished/PhotoDialog.h \ + gui/unfinished/PhotoShow.h \ + gui/unfinished/StatisticDialog.h + + +FORMS += gui/unfinished/ApplicationWindow.ui \ + gui/unfinished/CalDialog.ui \ + gui/unfinished/ExampleDialog.ui \ + gui/unfinished/GamesDialog.ui \ + gui/unfinished/PhotoDialog.ui \ + gui/unfinished/PhotoShow.ui \ + gui/unfinished/StatisticDialog.ui + +SOURCES += gui/unfinished/ApplicationWindow.cpp \ + gui/unfinished/CalDialog.cpp \ + gui/unfinished/ExampleDialog.cpp \ + gui/unfinished/GamesDialog.cpp \ + gui/unfinished/PhotoDialog.cpp \ + gui/unfinished/PhotoShow.cpp \ + gui/unfinished/StatisticDialog.cpp + + DEFINES *= UNFINISHED +} + +idle { + +HEADERS += idle/idle.h + +SOURCES += idle/idle.cpp \ + idle/idle_platform.cpp +} + +framecatcher { + +HEADERS += util/framecatcher.h + +SOURCES += util/framecatcher.cpp + +LIBS += -lxine + +DEFINES *= CHANNELS_FRAME_CATCHER + +} + + + +minimal { + SOURCES = main.cpp \ + rshare.cpp \ + gui/notifyqt.cpp \ + gui/MessengerWindow.cpp \ + gui/StartDialog.cpp \ + gui/GenCertDialog.cpp \ + gui/connect/ConfCertDialog.cpp \ + gui/InfoDialog.cpp \ + gui/help/browser/helpbrowser.cpp \ + gui/help/browser/helptextbrowser.cpp \ + gui/settings/rsettings.cpp \ + gui/settings/RsharePeerSettings.cpp \ + gui/settings/rsharesettings.cpp \ + gui/common/rwindow.cpp \ + gui/common/StatusDefs.cpp \ + gui/LogoBar.cpp \ + gui/RsAutoUpdatePage.cpp \ + gui/common/vmessagebox.cpp \ + gui/common/html.cpp \ + util/RetroStyleLabel.cpp \ + util/log.cpp \ + util/win32.cpp \ + util/Widget.cpp \ + util/stringutil.cpp \ + lang/languagesupport.cpp + + FORMS = gui/MessengerWindow.ui \ + gui/StartDialog.ui \ + gui/GenCertDialog.ui \ + gui/connect/ConfCertDialog.ui \ + gui/InfoDialog.ui \ + gui/help/browser/helpbrowser.ui + + HEADERS = rshare.h \ + gui/notifyqt.h \ + gui/MessengerWindow.h \ + gui/StartDialog.h \ + gui/GenCertDialog.h \ + gui/connect/ConfCertDialog.h \ + gui/InfoDialog.h \ + gui/help/browser/helpbrowser.h \ + gui/help/browser/helptextbrowser.h \ + gui/settings/rsettings.h \ + gui/settings/rsharesettings.h \ + gui/settings/RsharePeerSettings.h \ + gui/common/rwindow.h \ + gui/common/StatusDefs.h \ + gui/LogoBar.h \ + gui/RsAutoUpdatePage.h \ + gui/common/vmessagebox.h \ + gui/common/html.h \ + util/RetroStyleLabel.h \ + util/log.h \ + util/win32.h \ + util/Widget.h \ + util/stringutil.h \ + lang/languagesupport.h +} diff --git a/retroshare-gui/src/gui/ChanGroupDelegate.cpp b/retroshare-gui/src/gui/ChanGroupDelegate.cpp deleted file mode 100644 index ea0d9b18d..000000000 --- a/retroshare-gui/src/gui/ChanGroupDelegate.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * ChanGroupDelegate.cpp - * - * Created on: Sep 7, 2009 - * Author: alex - */ - -#include "ChanGroupDelegate.h" -#include -#include -#include - -ChanGroupDelegate::ChanGroupDelegate(QObject *parent) : RSItemDelegate(parent) -{ -} - -void ChanGroupDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const -{ - if (index.child(0, 0).isValid()) { - painter->setPen(Qt::blue); - QStyleOptionButton opt; - opt.rect = option.rect; - QApplication::style()->drawControl(QStyle::CE_PushButtonBevel, &opt, painter); - } - - RSItemDelegate::paint(painter, option, index); -} diff --git a/retroshare-gui/src/gui/ChanGroupDelegate.h b/retroshare-gui/src/gui/ChanGroupDelegate.h deleted file mode 100644 index 90e2c8292..000000000 --- a/retroshare-gui/src/gui/ChanGroupDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ChanGroupDelegate.h - * - * Created on: Sep 7, 2009 - * Author: alex - */ - -#ifndef CHANGROUPDELEGATE_H_ -#define CHANGROUPDELEGATE_H_ - -#include "common/RSItemDelegate.h" - -class ChanGroupDelegate : public RSItemDelegate -{ -public: - ChanGroupDelegate(QObject *parent = 0); - - virtual void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const; -}; - -#endif /* CHANGROUPDELEGATE_H_ */ diff --git a/retroshare-gui/src/gui/ChannelFeed.cpp b/retroshare-gui/src/gui/ChannelFeed.cpp index 60dab6f22..910542de4 100644 --- a/retroshare-gui/src/gui/ChannelFeed.cpp +++ b/retroshare-gui/src/gui/ChannelFeed.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -41,24 +40,8 @@ #include "channels/ShareKey.h" #include "notifyqt.h" -#include "ChanGroupDelegate.h" - #define CHAN_DEFAULT_IMAGE ":/images/channels.png" -#define COLUMN_NAME 0 -#define COLUMN_POPULARITY 1 -#define COLUMN_COUNT 2 -#define COLUMN_DATA COLUMN_NAME - -#define ROLE_ID Qt::UserRole -#define ROLE_CHANNEL_TITLE Qt::UserRole + 1 -#define ROLE_CHANNEL_SEARCH_SCORE Qt::UserRole + 2 -#define ROLE_CHANNEL_TS Qt::UserRole + 3 - - -#define COMBO_TITLE_INDEX 0 -#define COMBO_DESC_INDEX 1 - #define WARNING_LIMIT 3600*24*2 /**** @@ -77,69 +60,25 @@ ChannelFeed::ChannelFeed(QWidget *parent) connect(subscribeButton, SIGNAL( clicked( void ) ), this, SLOT( subscribeChannel ( void ) ) ); connect(unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeChannel ( void ) ) ); connect(setAllAsReadButton, SIGNAL(clicked()), this, SLOT(setAllAsReadClicked())); - connect(resetButton, SIGNAL(clicked()), this, SLOT(finishSearching( void ))); - connect( searchLine, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged())); connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int))); /*************** Setup Left Hand Side (List of Channels) ****************/ - connect(treeView, SIGNAL(customContextMenuRequested( QPoint ) ), this, SLOT( channelListCustomPopupMenu( QPoint ) ) ); + connect(treeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT( channelListCustomPopupMenu( QPoint ) ) ); + connect(treeWidget, SIGNAL(treeCurrentItemChanged(QString)), this, SLOT(selectChannel(QString))); mChannelId.clear(); - model = new QStandardItemModel(0, COLUMN_COUNT, this); - model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"), Qt::DisplayRole); - model->setHeaderData(COLUMN_POPULARITY, Qt::Horizontal, tr("Popularity"), Qt::DisplayRole); - - treeView->setModel(model); - - RSItemDelegate *itemDelegate = new ChanGroupDelegate(this); - itemDelegate->removeFocusRect(COLUMN_POPULARITY); - itemDelegate->setSpacing(QSize(0, 2)); - treeView->setItemDelegate(itemDelegate); - - connect(treeView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(selectChannel(QModelIndex))); - - /* Set header resize modes and initial section sizes TreeView*/ - QHeaderView * _header = treeView->header () ; - _header->setResizeMode ( COLUMN_NAME, QHeaderView::Stretch); - _header->setResizeMode ( COLUMN_POPULARITY, QHeaderView::Fixed); - _header->resizeSection ( COLUMN_POPULARITY, 25 ); - - // set ChannelList Font - itemFont = QFont("ARIAL", 10); - itemFont.setBold(true); - - QStandardItem *ownChannels = new QStandardItem(tr("Own Channels")); - ownChannels->setFont(itemFont); - ownChannels->setForeground(QBrush(QColor(79, 79, 79))); - - QStandardItem *subcribedChannels = new QStandardItem(tr("Subscribed Channels")); - subcribedChannels->setFont(itemFont); - subcribedChannels->setForeground(QBrush(QColor(79, 79, 79))); - - QStandardItem *popularChannels = new QStandardItem(tr("Popular Channels")); - popularChannels->setFont(itemFont); - popularChannels->setForeground(QBrush(QColor(79, 79, 79))); - - QStandardItem *otherChannels = new QStandardItem(tr("Other Channels")); - otherChannels->setFont(itemFont); - otherChannels->setForeground(QBrush(QColor(79, 79, 79))); - - model->appendRow(ownChannels); - model->appendRow(subcribedChannels); - model->appendRow(popularChannels); - model->appendRow(otherChannels); - - treeView->expand(ownChannels->index()); - treeView->expand(subcribedChannels->index()); + ownChannels = treeWidget->addCategoryItem(tr("Own Channels"), QIcon(), true); + subcribedChannels = treeWidget->addCategoryItem(tr("Subscribed Channels"), QIcon(), true); + popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(), false); + otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(), false); //added from ahead updateChannelList(); - mChannelFont = QFont("MS SANS SERIF", 22); - nameLabel->setFont(mChannelFont); + nameLabel->setFont(QFont("MS SANS SERIF", 22)); nameLabel->setMinimumWidth(20); // Setup Channel Menu: @@ -147,7 +86,6 @@ ChannelFeed::ChannelFeed(QWidget *parent) channelmenu->addAction(actionCreate_Channel); channelmenu->addSeparator(); channelpushButton->setMenu(channelmenu); - resetButton->setVisible(false); updateChannelMsgs(); } @@ -215,16 +153,6 @@ void ChannelFeed::createChannel() cf.exec(); } -void ChannelFeed::channelSelection() -{ - /* which item was selected? */ - - - /* update mChannelId */ - - updateChannelMsgs(); -} - /*************************************************************************************/ /*************************************************************************************/ /*************************************************************************************/ @@ -266,22 +194,9 @@ void ChannelFeed::restoreChannelKeys() rsChannels->channelRestoreKeys(mChannelId); } -void ChannelFeed::selectChannel(QModelIndex index) +void ChannelFeed::selectChannel(const QString &id) { - QStandardItem *itemData = NULL; - - if (index.isValid()) { - QStandardItem *item = model->itemFromIndex(index); - if (item && item->parent() != NULL) { - itemData = item->parent()->child(item->row(), COLUMN_DATA); - } - } - - if (itemData) { - mChannelId = itemData->data(ROLE_ID).toString().toStdString(); - } else { - mChannelId.clear(); - } + mChannelId = id.toStdString(); updateChannelMsgs(); } @@ -306,269 +221,99 @@ void ChannelFeed::updateDisplay() } } -void ChannelFeed::filterRegExpChanged(){ +static void channelInfoToGroupItemInfo(const ChannelInfo &channelInfo, GroupItemInfo &groupItemInfo) +{ + groupItemInfo.id = QString::fromStdString(channelInfo.channelId); + groupItemInfo.name = QString::fromStdWString(channelInfo.channelName); + groupItemInfo.description = QString::fromStdWString(channelInfo.channelDesc); + groupItemInfo.popularity = channelInfo.pop; + groupItemInfo.lastpost = QDateTime::fromTime_t(channelInfo.lastPost); - - if(searchLine->text().isEmpty()){ - finishSearching(); - return; + QPixmap chanImage; + if (channelInfo.pngImageLen) { + chanImage.loadFromData(channelInfo.pngChanImage, channelInfo.pngImageLen, "PNG"); + } else { + chanImage = QPixmap(CHAN_DEFAULT_IMAGE); } - resetButton->setEnabled(true); - resetButton->setVisible(true); - - // force display to be updated - updateChannelList(); - - return; + groupItemInfo.icon = QIcon(chanImage); } -void ChannelFeed::finishSearching(){ - - - searchLine->clear(); - resetButton->setVisible(false); - resetButton->setEnabled(false); - mChanSearchScore.clear(); - updateChannelList(); - - return; -} - - void ChannelFeed::updateChannelList() { - if (!rsChannels) { - return; - } + if (!rsChannels) { + return; + } - std::list channelList; - std::list::iterator it; + std::list channelList; + std::list::iterator it; + rsChannels->getChannelList(channelList); - rsChannels->getChannelList(channelList); + std::list keysAvailable; + std::list::iterator keyIt; + rsChannels->getPubKeysAvailableGrpIds(keysAvailable); - /* get the ids for our lists */ - std::list adminList; - std::list subList; - std::list popList; - std::list otherList; - std::multimap popMap; + /* get the ids for our lists */ + QList adminList; + QList subList; + QList popList; + QList otherList; + std::multimap popMap; - for(it = channelList.begin(); it != channelList.end(); it++) { - /* sort it into Publish (Own), Subscribed, Popular and Other */ - uint32_t flags = it->channelFlags; + for(it = channelList.begin(); it != channelList.end(); it++) { + /* sort it into Publish (Own), Subscribed, Popular and Other */ + uint32_t flags = it->channelFlags; - if ((flags & RS_DISTRIB_ADMIN) && (flags & RS_DISTRIB_PUBLISH) && (flags & RS_DISTRIB_SUBSCRIBED)) { - adminList.push_back(*it); - } else if ((flags & RS_DISTRIB_SUBSCRIBED) || ((flags & RS_DISTRIB_SUBSCRIBED) && (flags &RS_DISTRIB_PUBLISH)) ) { - subList.push_back(*it); - } else { - /* rate the others by popularity */ - popMap.insert(std::make_pair(it->pop, *it)); - } - } + GroupItemInfo groupItemInfo; + channelInfoToGroupItemInfo(*it, groupItemInfo); - /* iterate backwards through popMap - take the top 5 or 10% of list */ - uint32_t popCount = 5; - if (popCount < popMap.size() / 10) { - popCount = popMap.size() / 10; - } + if ((flags & RS_DISTRIB_ADMIN) && (flags & RS_DISTRIB_PUBLISH) && (flags & RS_DISTRIB_SUBSCRIBED)) { + adminList.push_back(groupItemInfo); + } else { + for (keyIt = keysAvailable.begin(); keyIt != keysAvailable.end(); keyIt++) { + if (it->channelId == *keyIt) { + /* Found Key, set title text to bold and colored blue */ + groupItemInfo.privatekey = true; + break; + } + } - uint32_t i = 0; - std::multimap::reverse_iterator rit; - for (rit = popMap.rbegin(); rit != popMap.rend(); rit++) { - if (i < popCount) { - popList.push_back(rit->second); - i++; - } else { - otherList.push_back(rit->second); - } - } - - // check if search filter is being used - if(! searchLine->text().isEmpty()){ - - filterChannelList(adminList); - filterChannelList(subList); - filterChannelList(popList); - filterChannelList(otherList); - } - - /* now we have our lists ---> update entries */ - - fillChannelList(OWN, adminList); - fillChannelList(SUBSCRIBED, subList); - fillChannelList(POPULAR, popList); - fillChannelList(OTHER, otherList); - - // place notices for channel with private keys available - highlightPrivateKeys(SUBSCRIBED); - highlightPrivateKeys(POPULAR); - highlightPrivateKeys(OTHER); - - updateMessageSummaryList(""); -} - - -void ChannelFeed::filterChannelList(std::list &ci){ - - uint32_t score = 0; - QString scoreString; - mChanSearchScore.clear(); - std::list::iterator it = ci.begin(); - - // first find out which has given word in it - for(;it != ci.end(); it++){ - - if(sectionCombo->currentIndex() == COMBO_DESC_INDEX){ - scoreString = QString::fromStdWString(it->channelDesc); - score = scoreString.count(searchLine->text(), Qt::CaseInsensitive); - mChanSearchScore.insert(std::pair(it->channelId, score)); - } - else { - scoreString = QString::fromStdWString(it->channelName); - score = scoreString.count(searchLine->text(), Qt::CaseInsensitive); - mChanSearchScore.insert(std::pair(it->channelId, score)); - } - - if(score == 0){ - it = ci.erase(it); - it--; + if ((flags & RS_DISTRIB_SUBSCRIBED) || ((flags & RS_DISTRIB_SUBSCRIBED) && (flags & RS_DISTRIB_PUBLISH)) ) { + subList.push_back(groupItemInfo); + } else { + /* rate the others by popularity */ + popMap.insert(std::make_pair(it->pop, groupItemInfo)); + } } } + /* iterate backwards through popMap - take the top 5 or 10% of list */ + uint32_t popCount = 5; + if (popCount < popMap.size() / 10) { + popCount = popMap.size() / 10; + } + uint32_t i = 0; + std::multimap::reverse_iterator rit; + for (rit = popMap.rbegin(); rit != popMap.rend(); rit++) { + if (i < popCount) { + popList.push_back(rit->second); + i++; + } else { + otherList.push_back(rit->second); + } + } + + /* now we have our lists ---> update entries */ + + treeWidget->fillGroupItems(ownChannels, adminList); + treeWidget->fillGroupItems(subcribedChannels, subList); + treeWidget->fillGroupItems(popularChannels, popList); + treeWidget->fillGroupItems(otherChannels, otherList); + + updateMessageSummaryList(""); } -void ChannelFeed::highlightPrivateKeys(int group){ - - QStandardItem *groupItem = model->item(group); - QStandardItem *item = NULL; - std::list keysAvailable; - std::list::iterator it; - int rowCount = 0; - QBrush brush; - - brush.setColor(Qt::blue); - - if((groupItem == NULL) || (rsChannels == NULL)) - return; - - rowCount = groupItem->rowCount(); - rsChannels->getPubKeysAvailableGrpIds(keysAvailable); - - - for(it= keysAvailable.begin(); it != keysAvailable.end(); it++) - - for (int row = 0; row < rowCount; row++) { - if (groupItem->child(row, COLUMN_DATA)->data(ROLE_ID).toString() == QString::fromStdString(*it)) { - /* found channel */ - item = groupItem->child(row, COLUMN_NAME); - - /* set title text to bold and colored blue */ - QFont chanFont = item->font(); - chanFont.setBold(true); - item->setFont(chanFont); - item->setForeground(brush); - item->setToolTip(item->toolTip() + QString("\nPrivate Key Available")); - - } - } - -} - -void ChannelFeed::fillChannelList(int channelItem, std::list &channelInfos){ - std::list::iterator iit; - - /* remove rows with groups before adding new ones */ - QStandardItem *groupItem = model->item(channelItem); - if (groupItem == NULL) { - return; - } - - /* iterate all channels */ - for (iit = channelInfos.begin(); iit != channelInfos.end(); iit++) { -#ifdef CHAN_DEBUG - std::cerr << "ChannelFeed::fillChannelList(): " << channelItem << " - " << iit->channelId << std::endl; -#endif - - ChannelInfo &ci = *iit; - QString channelId = QString::fromStdString(ci.channelId); - - /* search exisiting channel item */ - int row; - int rowCount = groupItem->rowCount(); - for (row = 0; row < rowCount; row++) { - if (groupItem->child(row, COLUMN_DATA)->data(ROLE_ID).toString() == channelId) { - /* found channel */ - break; - } - } - - QStandardItem *chNameItem = NULL; - QStandardItem *chPopItem = NULL; - if (row < rowCount) { - chNameItem = groupItem->child(row, COLUMN_NAME); - chPopItem = groupItem->child(row, COLUMN_POPULARITY); - } else { - QList channel; - chNameItem = new QChannelItem(); - chPopItem = new QStandardItem(); - - channel.append(chNameItem); - channel.append(chPopItem); - groupItem->appendRow(channel); - - groupItem->child(chNameItem->index().row(), COLUMN_DATA)->setData(channelId, ROLE_ID); - } - - chNameItem->setText(QString::fromStdWString(ci.channelName)); - groupItem->child(chNameItem->index().row(), COLUMN_DATA)->setData(QString::fromStdWString(ci.channelName), ROLE_CHANNEL_TITLE); - - // important for arrangement of channels - groupItem->child(chNameItem->index().row(), COLUMN_DATA)->setData(((mChanSearchScore.find(channelId.toStdString()))->second), - ROLE_CHANNEL_SEARCH_SCORE); - groupItem->child(chNameItem->index().row(), COLUMN_DATA)->setData(QDateTime::fromTime_t(ci.lastPost), ROLE_CHANNEL_TS); - - - chNameItem->setToolTip(PopularityDefs::tooltip(ci.pop)); - chPopItem->setToolTip(PopularityDefs::tooltip(ci.pop)); - - QPixmap chanImage; - if (ci.pngImageLen != 0) { - chanImage.loadFromData(ci.pngChanImage, ci.pngImageLen, "PNG"); - } else { - chanImage = QPixmap(CHAN_DEFAULT_IMAGE); - } - chNameItem->setIcon(QIcon(chanImage)); - - /* set Popularity icon */ - chPopItem->setIcon(PopularityDefs::icon(ci.pop)); - } - - /* remove all items not in list */ - int row = 0; - int rowCount = groupItem->rowCount(); - while (row < rowCount) { - std::string channelId = groupItem->child(row, COLUMN_DATA)->data(ROLE_ID).toString().toStdString(); - - for (iit = channelInfos.begin(); iit != channelInfos.end(); iit++) { - if (iit->channelId == channelId) { - break; - } - } - - if (iit == channelInfos.end()) { - groupItem->removeRow(row); - rowCount = groupItem->rowCount(); - } else { - row++; - } - } - - model->item(channelItem)->sortChildren(COLUMN_NAME, Qt::DescendingOrder); - -} void ChannelFeed::channelMsgReadSatusChanged(const QString& channelId, const QString& msgId, int status) { @@ -577,52 +322,33 @@ void ChannelFeed::channelMsgReadSatusChanged(const QString& channelId, const QSt void ChannelFeed::updateMessageSummaryList(const std::string &channelId) { - int channelItems[2] = { OWN, SUBSCRIBED }; + QTreeWidgetItem *items[2] = { ownChannels, subcribedChannels }; + for (int item = 0; item < 2; item++) { + int child; + int childCount = items[item]->childCount(); + for (child = 0; child < childCount; child++) { + QTreeWidgetItem *childItem = items[item]->child(child); + std::string childId = treeWidget->itemId(childItem).toStdString(); + if (childId.empty()) { + continue; + } + if (channelId.empty() || childId == channelId) { + /* Calculate unread messages */ + unsigned int newMessageCount = 0; + unsigned int unreadMessageCount = 0; + rsChannels->getMessageCount(childId, newMessageCount, unreadMessageCount); - for (int channelItem = 0; channelItem < 2; channelItem++) { - QStandardItem *groupItem = model->item(channelItems[channelItem]); - if (groupItem == NULL) { - continue; - } + treeWidget->setUnreadCount(childItem, unreadMessageCount); - int row; - int rowCount = groupItem->rowCount(); - for (row = 0; row < rowCount; row++) { - std::string rowChannelId = groupItem->child(row, COLUMN_DATA)->data(ROLE_ID).toString().toStdString(); - if (rowChannelId.empty()) { - continue; - } - - if (channelId.empty() || rowChannelId == channelId) { - /* calculate unread messages */ - unsigned int newMessageCount = 0; - unsigned int unreadMessageCount = 0; - rsChannels->getMessageCount(rowChannelId, newMessageCount, unreadMessageCount); - - QStandardItem *item = groupItem->child(row, COLUMN_NAME); - - QString title = item->data(ROLE_CHANNEL_TITLE).toString(); - QFont font = item->font(); - - if (unreadMessageCount) { - title += " (" + QString::number(unreadMessageCount) + ")"; - font.setBold(true); - } else { - font.setBold(false); - } - - item->setText(title); - item->setFont(font); - - if (channelId.empty() == false) { - /* calculate only this channel */ - break; - } - } - } - } + if (channelId.empty() == false) { + /* Calculate only this channel */ + break; + } + } + } + } } static bool sortChannelMsgSummary(const ChannelMsgSummary &msg1, const ChannelMsgSummary &msg2) @@ -779,39 +505,3 @@ void ChannelFeed::setAllAsReadClicked() } } } - -QChannelItem::QChannelItem() - : QStandardItem(){ -} - - - QChannelItem::~QChannelItem(){ - -} - -bool QChannelItem::operator<(const QStandardItem& other) const { - - uint32_t otherCount = 0, thisCount = 0; - uint otherChanTs = other.data(ROLE_CHANNEL_TS).toDateTime().toTime_t(); - uint thisChanTs = this->data(ROLE_CHANNEL_TS).toDateTime().toTime_t(); - - - otherCount = other.data(ROLE_CHANNEL_SEARCH_SCORE).toUInt(); - thisCount = this->data(ROLE_CHANNEL_SEARCH_SCORE).toUInt(); - - // if counts are equal then determine by who has the most recent post - if(otherCount == thisCount){ - if(thisChanTs < otherChanTs) - return true; - } - - // choose the item where the string occurs the most - if(thisCount < otherCount) - return true; - - if(thisChanTs < otherChanTs) - return true; - - return false; -} - diff --git a/retroshare-gui/src/gui/ChannelFeed.h b/retroshare-gui/src/gui/ChannelFeed.h index e7fa3c6f7..a47a41fdf 100644 --- a/retroshare-gui/src/gui/ChannelFeed.h +++ b/retroshare-gui/src/gui/ChannelFeed.h @@ -33,16 +33,8 @@ #include "gui/feeds/FeedHolder.h" - - -#define OWN 0 -#define SUBSCRIBED 1 -#define POPULAR 2 -#define OTHER 3 - class ChanMsgItem; -class QStandardItemModel; -class QStandardItem; +class QTreeWidgetItem; class ChannelFeed : public RsAutoUpdatePage, public FeedHolder, private Ui::ChannelFeed { @@ -53,23 +45,18 @@ public: ChannelFeed(QWidget *parent = 0); /** Default Destructor */ - virtual void deleteFeedItem(QWidget *item, uint32_t type); virtual void openChat(std::string peerId); /* overloaded from RsAuthUpdatePage */ virtual void updateDisplay(); -public slots: - void selectChannel(QModelIndex index); - private slots: void channelListCustomPopupMenu( QPoint point ); + void selectChannel(const QString &id); void createChannel(); - void channelSelection(); - void subscribeChannel(); void unsubscribeChannel(); void setAllAsReadClicked(); @@ -82,19 +69,12 @@ private slots: void shareKey(); void channelMsgReadSatusChanged(const QString& channelId, const QString& msgId, int status); - void filterRegExpChanged(); - void finishSearching(); private: - void highlightPrivateKeys(int group); void updateChannelList(); - void fillChannelList(int channelItem, std::list &channelInfos); - void filterChannelList(std::list&); void updateChannelMsgs(); void updateMessageSummaryList(const std::string &channelId); - QStandardItemModel *model; - std::string mChannelId; /* current Channel */ /* Layout Pointers */ @@ -103,26 +83,11 @@ private: std::list mChanMsgItems; std::map mChanSearchScore; //chanId, score - QFont mChannelFont; - QFont itemFont; + QTreeWidgetItem *ownChannels; + QTreeWidgetItem *subcribedChannels; + QTreeWidgetItem *popularChannels; + QTreeWidgetItem *otherChannels; }; -class QChannelItem : public QStandardItem -{ - -public: - - QChannelItem(); - virtual ~QChannelItem(); - - /** - * reimplementing comparison operator so QChannelItems can be ordered in terms - * of occurences of property searchText in its data columns - */ - bool operator<(const QStandardItem& other) const; - -}; - - #endif diff --git a/retroshare-gui/src/gui/ChannelFeed.ui b/retroshare-gui/src/gui/ChannelFeed.ui index 729d0554a..878dcef76 100644 --- a/retroshare-gui/src/gui/ChannelFeed.ui +++ b/retroshare-gui/src/gui/ChannelFeed.ui @@ -1,787 +1,615 @@ - - - ChannelFeed - - - - 0 - 0 - 681 - 476 - - - - - 0 - 0 - - - - - 0 - 0 - - - - QComboBox QAbstractItemView { -background-color:white; -} - -QComboBox::down-arrow { -image: url(:/images/combobox_arrow.png); -} - -QComboBox:drop-down -{ -subcontrol-origin: padding; -subcontrol-position: top right; -border-left-style: none; -border-top-right-radius: 1px; -border-bottom-right-radius: 1px; -} - -QComboBox { -border-image: url(:/images/btn_26.png) 4; -border-width: 4; -padding: 0px 6px; -font-size: 12px; -} - -QComboBox:hover { -border-image: url(:/images/btn_26_hover.png) 4; -} - -QComboBox::disabled { -color:gray; -} - - - - - - Qt::Horizontal - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 240 - 16777215 - - - - - 0 - 0 - - - - - 221 - 0 - - - - QFrame#chanFrame{border: none;} - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - 0 - - - - - 0 - - - - - - 0 - 22 - - - - - 16777215 - 22 - - - - QFrame#searchlineframe{ -background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #FEFEFE, stop:1 #E8E8E8); - -border: 1px solid #CCCCCC;} - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 1 - - - 0 - - - - - - 3 - 0 - - - - - 0 - 16 - - - - - 1677777 - 16777215 - - - - Enter a Keyword here - - - QLineEdit#searchLine{ -border: none;} - - - - - - - - - Title - - - - - Description - - - - - - - - - 16 - 16 - - - - - 16 - 16 - - - - Reset - - - QPushButton -{ - border-image: url(:/images/closenormal.png) -} - -QPushButton:hover -{ -border-image: url(:/images/closehover.png) -} - -QPushButton:pressed { -border-image: url(:/images/closepressed.png) -} - - - - - - - - - - - - - - - - 220 - 0 - - - - - 240 - 38 - - - - - 220 - 0 - - - - QFrame#chheaderframe{ -background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #FEFEFE, stop:1 #E8E8E8); - -border: 1px solid #CCCCCC;} - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 2 - - - - - 0 - - - - - - 24 - 24 - - - - - - - :/images/channels32.png - - - true - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:10pt; font-weight:600;">Channels</span></p></body></html> - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - true - - - Add - - - QPushButton::menu-indicator { - subcontrol-origin: padding; - subcontrol-position: bottom right; - } - - QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open { - position: relative; - top: 2px; left: 2px; /* shift the arrow by 2 px */ - } - - QPushButton:hover { - border: 1px solid #CCCCCC; - } - - - - - - - :/images/edit_add24.png:/images/edit_add24.png - - - - 16 - 16 - - - - false - - - true - - - - - - - - 0 - 0 - - - - - 0 - 25 - - - - - 16777215 - 26 - - - - Post to Channel - - - - - - - - - - :/images/mail_send.png:/images/mail_send.png - - - true - - - - - - - - - - Qt::CustomContextMenu - - - QAbstractItemView::NoEditTriggers - - - - 19 - 19 - - - - false - - - false - - - false - - - false - - - - - - - - - - - QFrame#frame{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, - stop:0 #F2F2F2, stop:1 #E6E6E6); -border: 1px solid #CCCCCC;} - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - - - 16 - - - 9 - - - - - - 64 - 64 - - - - - 64 - 64 - - - - QLabel{ -border: 2px solid white; -border-radius: 10px; -} - - - - - - :/images/channels.png - - - - - - - - 75 - true - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:600; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt;">Channel Name</span></p></body></html> - - - true - - - - - - - - - Qt::Horizontal - - - - - - - 9 - - - 9 - - - - - - 0 - 0 - - - - - 26 - 26 - - - - Unsubcribe To Channel - - - QToolButton, QPushButton, QComboBox { -border-image: url(:/images/btn_26.png) 4; -border-width: 4; -padding: 0px 6px; -font-size: 12px; -} - -QToolButton:hover, QPushButton:hover, QComboBox:hover { -border-image: url(:/images/btn_26_hover.png) 4; -} - -QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { -color:gray; -} - -QToolButton:pressed, QPushButton:pressed{ -border-image: url(:/images/btn_26_pressed.png) 4; -} - - - Unsubscribe - - - - - - - - 0 - 0 - - - - - 26 - 26 - - - - - 16777215 - 26 - - - - Subscribe To Channel - - - QToolButton, QPushButton, QComboBox { -border-image: url(:/images/btn_26.png) 4; -border-width: 4; -padding: 0px 6px; -font-size: 12px; -} - -QToolButton:hover, QPushButton:hover, QComboBox:hover { -border-image: url(:/images/btn_26_hover.png) 4; -} - -QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { -color:gray; -} - -QToolButton:pressed, QPushButton:pressed{ -border-image: url(:/images/btn_26_pressed.png) 4; -} - - - Subscribe - - - - :/images/konqsidebar_news16.png:/images/konqsidebar_news16.png - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 26 - 26 - - - - QToolButton, QPushButton, QComboBox { -border-image: url(:/images/btn_26.png) 4; -border-width: 4; -padding: 0px 6px; -font-size: 12px; -} - -QToolButton:hover, QPushButton:hover, QComboBox:hover { -border-image: url(:/images/btn_26_hover.png) 4; -} - -QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { -color:gray; -} - -QToolButton:pressed, QPushButton:pressed{ -border-image: url(:/images/btn_26_pressed.png) 4; -} - - - Set all to read - - - - - - - - - - - - - 1 - 0 - - - - - 0 - 0 - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - - - true - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - 0 - 0 - 412 - 331 - - - - QWidget#scrollAreaWidgetContents{border: none;} - - - - 0 - - - 0 - - - - - - - - Qt::Vertical - - - - 391 - 266 - - - - - - - - - - - - - - - - - - - - :/images/add_channel24.png:/images/add_channel24.png - - - Create Channel - - - - - - - - + + + ChannelFeed + + + + 0 + 0 + 681 + 476 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + Qt::Horizontal + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 240 + 16777215 + + + + + 0 + 0 + + + + + 221 + 0 + + + + QFrame#chanFrame{border: none;} + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + 0 + + + + + + + + + + + 220 + 0 + + + + + 240 + 38 + + + + + 220 + 0 + + + + QFrame#chheaderframe{ +background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 #FEFEFE, stop:1 #E8E8E8); + +border: 1px solid #CCCCCC;} + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + + + 0 + + + + + + 24 + 24 + + + + + + + :/images/channels32.png + + + true + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:10pt; font-weight:600;">Channels</span></p></body></html> + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + Add + + + QPushButton::menu-indicator { + subcontrol-origin: padding; + subcontrol-position: bottom right; + } + + QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open { + position: relative; + top: 2px; left: 2px; /* shift the arrow by 2 px */ + } + + QPushButton:hover { + border: 1px solid #CCCCCC; + } + + + + + + + :/images/edit_add24.png:/images/edit_add24.png + + + + 16 + 16 + + + + false + + + true + + + + + + + + 0 + 0 + + + + + 0 + 25 + + + + + 16777215 + 26 + + + + Post to Channel + + + + + + + + + + :/images/mail_send.png:/images/mail_send.png + + + true + + + + + + + + + + + + + + QFrame#frame{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 #F2F2F2, stop:1 #E6E6E6); +border: 1px solid #CCCCCC;} + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + + + 16 + + + 9 + + + + + + 64 + 64 + + + + + 64 + 64 + + + + QLabel{ +border: 2px solid white; +border-radius: 10px; +} + + + + + + :/images/channels.png + + + + + + + + 75 + true + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt;">Channel Name</span></p></body></html> + + + true + + + + + + + + + Qt::Horizontal + + + + + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 26 + 26 + + + + Unsubcribe To Channel + + + QToolButton, QPushButton, QComboBox { +border-image: url(:/images/btn_26.png) 4; +border-width: 4; +padding: 0px 6px; +font-size: 12px; +} + +QToolButton:hover, QPushButton:hover, QComboBox:hover { +border-image: url(:/images/btn_26_hover.png) 4; +} + +QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { +color:gray; +} + +QToolButton:pressed, QPushButton:pressed{ +border-image: url(:/images/btn_26_pressed.png) 4; +} + + + Unsubscribe + + + + + + + + 0 + 0 + + + + + 26 + 26 + + + + + 16777215 + 26 + + + + Subscribe To Channel + + + QToolButton, QPushButton, QComboBox { +border-image: url(:/images/btn_26.png) 4; +border-width: 4; +padding: 0px 6px; +font-size: 12px; +} + +QToolButton:hover, QPushButton:hover, QComboBox:hover { +border-image: url(:/images/btn_26_hover.png) 4; +} + +QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { +color:gray; +} + +QToolButton:pressed, QPushButton:pressed{ +border-image: url(:/images/btn_26_pressed.png) 4; +} + + + Subscribe + + + + :/images/konqsidebar_news16.png:/images/konqsidebar_news16.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 26 + 26 + + + + QToolButton, QPushButton, QComboBox { +border-image: url(:/images/btn_26.png) 4; +border-width: 4; +padding: 0px 6px; +font-size: 12px; +} + +QToolButton:hover, QPushButton:hover, QComboBox:hover { +border-image: url(:/images/btn_26_hover.png) 4; +} + +QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { +color:gray; +} + +QToolButton:pressed, QPushButton:pressed{ +border-image: url(:/images/btn_26_pressed.png) 4; +} + + + Set all to read + + + + + + + + + + + + + 1 + 0 + + + + + 0 + 0 + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + + + true + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + 0 + 0 + 417 + 331 + + + + QWidget#scrollAreaWidgetContents{border: none;} + + + + 0 + + + 0 + + + + + + + + Qt::Vertical + + + + 391 + 266 + + + + + + + + + + + + + + + + + + + + :/images/add_channel24.png:/images/add_channel24.png + + + Create Channel + + + + + + GroupTreeWidget + QWidget +
gui/common/GroupTreeWidget.h
+ 1 +
+
+ + + + +
diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index 4d652171e..c8ff3806d 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -65,18 +65,6 @@ #define VIEW_THREADED 1 #define VIEW_FLAT 2 -/* Forum constants */ -#define COLUMN_FORUM_COUNT 2 -#define COLUMN_FORUM_TITLE 0 -#define COLUMN_FORUM_POPULARITY 1 - -#define COLUMN_FORUM_DATA 0 - -#define ROLE_FORUM_ID Qt::UserRole -#define ROLE_FORUM_TITLE Qt::UserRole + 1 - -#define ROLE_FORUM_COUNT 2 - /* Thread constants */ #define COLUMN_THREAD_COUNT 6 #define COLUMN_THREAD_TITLE 0 @@ -141,14 +129,14 @@ ForumsDialog::ForumsDialog(QWidget *parent) m_bIsForumSubscribed = false; m_bIsForumAdmin = false; - connect( ui.forumTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( forumListCustomPopupMenu( QPoint ) ) ); + connect( ui.forumTreeWidget, SIGNAL( treeCustomContextMenuRequested( QPoint ) ), this, SLOT( forumListCustomPopupMenu( QPoint ) ) ); connect( ui.threadTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( threadListCustomPopupMenu( QPoint ) ) ); connect(ui.actionCreate_Forum, SIGNAL(triggered()), this, SLOT(newforum())); connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(createmessage())); connect(ui.newthreadButton, SIGNAL(clicked()), this, SLOT(createthread())); - connect( ui.forumTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem *) ), this, SLOT( changedForum( QTreeWidgetItem *, QTreeWidgetItem * ) ) ); + connect( ui.forumTreeWidget, SIGNAL( treeCurrentItemChanged(QString) ), this, SLOT( changedForum(QString) ) ); connect( ui.threadTreeWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( changedThread () ) ); connect( ui.threadTreeWidget, SIGNAL( itemClicked(QTreeWidgetItem*,int)), this, SLOT( clickedThread (QTreeWidgetItem*,int) ) ); @@ -168,19 +156,6 @@ ForumsDialog::ForumsDialog(QWidget *parent) itemDelegate->setSpacing(QSize(0, 2)); ui.threadTreeWidget->setItemDelegate(itemDelegate); - itemDelegate = new RSItemDelegate(this); - itemDelegate->removeFocusRect(COLUMN_FORUM_POPULARITY); - itemDelegate->setSpacing(QSize(0, 2)); - ui.forumTreeWidget->setItemDelegate(itemDelegate); - - /* Set header resize modes and initial section sizes */ - ui.forumTreeWidget->setColumnCount(COLUMN_FORUM_COUNT); - QHeaderView * ftheader = ui.forumTreeWidget->header (); - ftheader->setResizeMode (COLUMN_FORUM_TITLE, QHeaderView::Stretch); - ftheader->resizeSection (COLUMN_FORUM_TITLE, 170); - ftheader->setResizeMode (COLUMN_FORUM_POPULARITY, QHeaderView::Fixed); - ftheader->resizeSection (COLUMN_FORUM_POPULARITY, 25); - /* Set header resize modes and initial section sizes */ QHeaderView * ttheader = ui.threadTreeWidget->header () ; ttheader->setResizeMode (COLUMN_THREAD_TITLE, QHeaderView::Interactive); @@ -203,47 +178,10 @@ ForumsDialog::ForumsDialog(QWidget *parent) ui.forumpushButton->setMenu(forummenu); /* create forum tree */ - m_ItemFont = QFont("ARIAL", 10); - m_ItemFont.setBold(true); - - QList TopList; - - YourForums = new QTreeWidgetItem(); - YourForums->setText(COLUMN_FORUM_TITLE, tr("Your Forums")); - YourForums->setFont(COLUMN_FORUM_TITLE, m_ItemFont); - YourForums->setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FOLDER))); - YourForums->setSizeHint(COLUMN_FORUM_TITLE, QSize( 18,18 ) ); - YourForums->setForeground(COLUMN_FORUM_TITLE, QBrush(QColor(79, 79, 79))); - TopList.append(YourForums); - - SubscribedForums = new QTreeWidgetItem((QTreeWidget*)0); - SubscribedForums->setText(COLUMN_FORUM_TITLE, tr("Subscribed Forums")); - SubscribedForums->setFont(COLUMN_FORUM_TITLE, m_ItemFont); - SubscribedForums->setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FOLDERRED))); - SubscribedForums->setSizeHint(COLUMN_FORUM_TITLE, QSize( 18,18 ) ); - SubscribedForums->setForeground(COLUMN_FORUM_TITLE, QBrush(QColor(79, 79, 79))); - TopList.append(SubscribedForums); - - PopularForums = new QTreeWidgetItem(); - PopularForums->setText(COLUMN_FORUM_TITLE, tr("Popular Forums")); - PopularForums->setFont(COLUMN_FORUM_TITLE, m_ItemFont); - PopularForums->setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FOLDERGREEN))); - PopularForums->setSizeHint(COLUMN_FORUM_TITLE, QSize( 18,18 ) ); - PopularForums->setForeground(COLUMN_FORUM_TITLE, QBrush(QColor(79, 79, 79))); - TopList.append(PopularForums); - - OtherForums = new QTreeWidgetItem(); - OtherForums->setText(COLUMN_FORUM_TITLE, tr("Other Forums")); - OtherForums->setFont(COLUMN_FORUM_TITLE, m_ItemFont); - OtherForums->setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FOLDERYELLOW))); - OtherForums->setSizeHint(COLUMN_FORUM_TITLE, QSize( 18,18 ) ); - OtherForums->setForeground(COLUMN_FORUM_TITLE, QBrush(QColor(79, 79, 79))); - TopList.append(OtherForums); - - ui.forumTreeWidget->addTopLevelItems(TopList); - - YourForums->setExpanded(true); - SubscribedForums->setExpanded(true); + yourForums = ui.forumTreeWidget->addCategoryItem(tr("Your Forums"), QIcon(IMAGE_FOLDER), true); + subscribedForums = ui.forumTreeWidget->addCategoryItem(tr("Subscribed Forums"), QIcon(IMAGE_FOLDERRED), true); + popularForums = ui.forumTreeWidget->addCategoryItem(tr("Popular Forums"), QIcon(IMAGE_FOLDERGREEN), false); + otherForums = ui.forumTreeWidget->addCategoryItem(tr("Other Forums"), QIcon(IMAGE_FOLDERYELLOW), false); m_LastViewType = -1; @@ -489,6 +427,22 @@ static void CleanupItems (QList &Items) } } +void ForumsDialog::forumInfoToGroupItemInfo(const ForumInfo &forumInfo, GroupItemInfo &groupItemInfo) +{ + groupItemInfo.id = QString::fromStdString(forumInfo.forumId); + groupItemInfo.name = QString::fromStdWString(forumInfo.forumName); + groupItemInfo.description = QString::fromStdWString(forumInfo.forumDesc); + groupItemInfo.popularity = forumInfo.pop; + groupItemInfo.lastpost = QDateTime::fromTime_t(forumInfo.lastPost); + + if (forumInfo.forumFlags & RS_DISTRIB_AUTHEN_REQ) { + groupItemInfo.name += " (" + tr("AUTHD") + ")"; + groupItemInfo.icon = QIcon(IMAGE_FORUMAUTHD); + } else { + groupItemInfo.icon = QIcon(IMAGE_FORUM); + } +} + void ForumsDialog::insertForums() { std::list forumList; @@ -500,93 +454,27 @@ void ForumsDialog::insertForums() rsForums->getForumList(forumList); - QList AdminList; - QList SubList; - QList PopList; - QList OtherList; - std::multimap popMap; + QList adminList; + QList subList; + QList popList; + QList otherList; + std::multimap popMap; - for(it = forumList.begin(); it != forumList.end(); it++) - { + for (it = forumList.begin(); it != forumList.end(); it++) { /* sort it into Publish (Own), Subscribed, Popular and Other */ uint32_t flags = it->subscribeFlags; - if (flags & RS_DISTRIB_ADMIN) - { - /* own */ + GroupItemInfo groupItemInfo; + forumInfoToGroupItemInfo(*it, groupItemInfo); - /* Name, - * Type, - * Rank, - * LastPost - * ForumId, - */ - - QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0); - - QString name = QString::fromStdWString(it->forumName); - if (it->forumFlags & RS_DISTRIB_AUTHEN_REQ) - { - name += " (AUTHD)"; - item -> setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FORUMAUTHD))); - } - else - { - item -> setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FORUM))); - } - - item -> setText(COLUMN_FORUM_TITLE, name); - item -> setData(COLUMN_FORUM_DATA, ROLE_FORUM_TITLE, name); - - /* (1) Popularity */ - item -> setIcon(COLUMN_FORUM_POPULARITY, PopularityDefs::icon(it->pop)); - item -> setToolTip(COLUMN_FORUM_TITLE, PopularityDefs::tooltip(it->pop)); - item -> setToolTip(COLUMN_FORUM_POPULARITY, PopularityDefs::tooltip(it->pop)); - - // Id. - item -> setData(COLUMN_FORUM_DATA, ROLE_FORUM_ID, QString::fromStdString(it->forumId)); - AdminList.append(item); - } - else if (flags & RS_DISTRIB_SUBSCRIBED) - { + if (flags & RS_DISTRIB_ADMIN) { + adminList.push_back(groupItemInfo); + } else if (flags & RS_DISTRIB_SUBSCRIBED) { /* subscribed forum */ - - /* Name, - * Type, - * Rank, - * LastPost - * ForumId, - */ - - QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0); - - QString name = QString::fromStdWString(it->forumName); - if (it->forumFlags & RS_DISTRIB_AUTHEN_REQ) - { - name += " (AUTHD)"; - item -> setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FORUMAUTHD))); - } - else - { - item -> setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FORUM))); - } - - item -> setText(COLUMN_FORUM_TITLE, name); - item -> setData(COLUMN_FORUM_DATA, ROLE_FORUM_TITLE, name); - - /* (1) Popularity */ - item -> setIcon(COLUMN_FORUM_POPULARITY, PopularityDefs::icon(it->pop)); - item -> setToolTip(COLUMN_FORUM_TITLE, PopularityDefs::tooltip(it->pop)); - item -> setToolTip(COLUMN_FORUM_POPULARITY, PopularityDefs::tooltip(it->pop)); - - // Id. - item -> setData(COLUMN_FORUM_DATA, ROLE_FORUM_ID, QString::fromStdString(it->forumId)); - SubList.append(item); - } - else - { + subList.push_back(groupItemInfo); + } else { /* rate the others by popularity */ - popMap.insert(std::make_pair(it->pop, it->forumId)); + popMap.insert(std::make_pair(it->pop, groupItemInfo)); } } @@ -599,151 +487,34 @@ void ForumsDialog::insertForums() uint32_t i = 0; uint32_t popLimit = 0; - std::multimap::reverse_iterator rit; + std::multimap::reverse_iterator rit; for(rit = popMap.rbegin(); ((rit != popMap.rend()) && (i < popCount)); rit++, i++); - if (rit != popMap.rend()) - { - popLimit = rit->first; - } + if (rit != popMap.rend()) { + popLimit = rit->first; + } - for(it = forumList.begin(); it != forumList.end(); it++) - { - /* ignore the ones we've done already */ - uint32_t flags = it->subscribeFlags; - - if (flags & RS_DISTRIB_ADMIN) - { - continue; - } - else if (flags & RS_DISTRIB_SUBSCRIBED) - { - continue; - } - else - { - /* popular forum */ - - /* Name, - * Type, - * Rank, - * LastPost - * ForumId, - */ - - QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0); - - QString name = QString::fromStdWString(it->forumName); - if (it->forumFlags & RS_DISTRIB_AUTHEN_REQ) - { - name += " (AUTHD)"; - item -> setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FORUMAUTHD))); - } - else - { - item -> setIcon(COLUMN_FORUM_TITLE,(QIcon(IMAGE_FORUM))); - } - - item -> setText(COLUMN_FORUM_TITLE, name); - item -> setData(COLUMN_FORUM_DATA, ROLE_FORUM_TITLE, name); - - - /* (1) Popularity */ - item -> setIcon(COLUMN_FORUM_POPULARITY, PopularityDefs::icon(it->pop)); - item -> setToolTip(COLUMN_FORUM_TITLE, PopularityDefs::tooltip(it->pop)); - item -> setToolTip(COLUMN_FORUM_POPULARITY, PopularityDefs::tooltip(it->pop)); - - // Id. - item -> setData(COLUMN_FORUM_DATA, ROLE_FORUM_ID, QString::fromStdString(it->forumId)); - - if (it->pop < popLimit) - { - OtherList.append(item); - } - else - { - PopList.append(item); - } - } + for (rit = popMap.rbegin(); rit != popMap.rend(); rit++) { + if (rit->second.popularity < (int) popLimit) { + otherList.append(rit->second); + } else { + popList.append(rit->second); + } } /* now we can add them in as a tree! */ - FillForums (YourForums, AdminList); - FillForums (SubscribedForums, SubList); - FillForums (PopularForums, PopList); - FillForums (OtherForums, OtherList); - - // cleanup - CleanupItems (AdminList); - CleanupItems (SubList); - CleanupItems (PopList); - CleanupItems (OtherList); + ui.forumTreeWidget->fillGroupItems(yourForums, adminList); + ui.forumTreeWidget->fillGroupItems(subscribedForums, subList); + ui.forumTreeWidget->fillGroupItems(popularForums, popList); + ui.forumTreeWidget->fillGroupItems(otherForums, otherList); updateMessageSummaryList(""); } -void ForumsDialog::FillForums(QTreeWidgetItem *Forum, QList &ChildList) +void ForumsDialog::changedForum(const QString &id) { - int ChildIndex; - int ChildIndexCur = 0; + mCurrForumId = id.toStdString(); - QTreeWidgetItem *Child; - - // iterate all new children - QList::iterator NewChild; - for (NewChild = ChildList.begin (); NewChild != ChildList.end (); NewChild++) { - // search existing child - int ChildIndexFound = -1; - int ChildCount = Forum->childCount (); - for (ChildIndex = ChildIndexCur; ChildIndex < ChildCount; ChildIndex++) { - Child = Forum->child (ChildIndex); - if (Child->data (COLUMN_FORUM_DATA, ROLE_FORUM_ID) == (*NewChild)->data (COLUMN_FORUM_DATA, ROLE_FORUM_ID)) { - // found it - ChildIndexFound = ChildIndex; - break; - } - } - if (ChildIndexFound >= 0) { - // delete all children between - while (ChildIndexCur < ChildIndexFound) { - Child = Forum->takeChild (ChildIndexCur); - delete (Child); - ChildIndexFound--; - } - - // set child data - Child = Forum->child (ChildIndexFound); - Child->setIcon (COLUMN_FORUM_TITLE, (*NewChild)->icon (COLUMN_FORUM_TITLE)); - Child->setToolTip (COLUMN_FORUM_TITLE, (*NewChild)->toolTip (COLUMN_FORUM_TITLE)); - - int i; - for (i = 0; i < COLUMN_FORUM_COUNT; i++) { - Child->setText (i, (*NewChild)->text (i)); - } - for (i = 0; i < ROLE_FORUM_COUNT; i++) { - Child->setData (COLUMN_FORUM_DATA, Qt::UserRole + i, (*NewChild)->data (COLUMN_FORUM_DATA, Qt::UserRole + i)); - } - } else { - // insert new child - if (ChildIndexCur < ChildCount) { - Forum->insertChild (ChildIndexCur, *NewChild); - } else { - Forum->addChild (*NewChild); - } - *NewChild = NULL; - } - ChildIndexCur++; - } - - // delete rest - while (ChildIndexCur < Forum->childCount ()) { - Child = Forum->takeChild (ChildIndexCur); - delete (Child); - } -} - -void ForumsDialog::changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev ) -{ - insertThreads(); + insertThreads(); } void ForumsDialog::changedThread () @@ -861,8 +632,7 @@ void ForumsDialog::insertThreads() m_bIsForumSubscribed = false; m_bIsForumAdmin = false; - QTreeWidgetItem *forumItem = ui.forumTreeWidget->currentItem(); - if ((!forumItem) || (forumItem->parent() == NULL)) + if (mCurrForumId.empty()) { /* not an actual forum - clear */ ui.threadTreeWidget->clear(); @@ -881,13 +651,8 @@ void ForumsDialog::insertThreads() return; } - /* store forumId */ - mCurrForumId = forumItem->data(COLUMN_FORUM_DATA, ROLE_FORUM_ID).toString().toStdString(); - ui.forumName->setText(forumItem->text(COLUMN_FORUM_TITLE)); - std::string fId = mCurrForumId; - ForumInfo fi; - if (rsForums->getForumInfo (fId, fi)) { + if (rsForums->getForumInfo (mCurrForumId, fi)) { if (fi.subscribeFlags & RS_DISTRIB_ADMIN) { m_bIsForumAdmin = true; } @@ -898,6 +663,8 @@ void ForumsDialog::insertThreads() return; } + ui.forumName->setText(QString::fromStdWString(fi.forumName)); + ui.newmessageButton->setEnabled (m_bIsForumSubscribed); ui.newthreadButton->setEnabled (m_bIsForumSubscribed); @@ -917,6 +684,12 @@ void ForumsDialog::insertThreads() break; } + if (flatView) { + ui.threadTreeWidget->setRootIsDecorated( true ); + } else { + ui.threadTreeWidget->setRootIsDecorated( true ); + } + bool bExpandNewMessages = Settings->getExpandNewMessages(); std::list itemToExpand; @@ -939,7 +712,7 @@ void ForumsDialog::insertThreads() std::cerr << tit->msgId << std::endl; ForumMsgInfo msginfo; - if (rsForums->getForumMessage(fId,tit->msgId,msginfo) == false) { + if (rsForums->getForumMessage(mCurrForumId, tit->msgId, msginfo) == false) { std::cerr << "ForumsDialog::insertThreads() Failed to Get Msg"; std::cerr << std::endl; continue; @@ -1028,7 +801,7 @@ void ForumsDialog::insertThreads() std::cerr << "ForumsDialog::insertThreads() Getting Children of : " << pId; std::cerr << std::endl; - if (rsForums->getForumThreadMsgList(fId, pId, msgs)) + if (rsForums->getForumThreadMsgList(mCurrForumId, pId, msgs)) { std::cerr << "ForumsDialog::insertThreads() #Children " << msgs.size(); std::cerr << std::endl; @@ -1040,7 +813,7 @@ void ForumsDialog::insertThreads() std::cerr << std::endl; ForumMsgInfo msginfo; - if (rsForums->getForumMessage(fId,mit->msgId,msginfo) == false) { + if (rsForums->getForumMessage(mCurrForumId, mit->msgId, msginfo) == false) { std::cerr << "ForumsDialog::insertThreads() Failed to Get Msg"; std::cerr << std::endl; continue; @@ -1050,12 +823,10 @@ void ForumsDialog::insertThreads() if (flatView) { child = new QTreeWidgetItem(); - ui.threadTreeWidget->setRootIsDecorated( true ); } else { child = new QTreeWidgetItem(parent); - ui.threadTreeWidget->setRootIsDecorated( true ); } { @@ -1624,22 +1395,16 @@ void ForumsDialog::unsubscribeToForum() void ForumsDialog::forumSubscribe(bool subscribe) { - QTreeWidgetItem *forumItem = ui.forumTreeWidget->currentItem(); - if ((!forumItem) || (forumItem->parent() == NULL)) - { - return; + if (mCurrForumId.empty()) { + return; } - /* store forumId */ - std::string fId = forumItem->data(COLUMN_FORUM_DATA, ROLE_FORUM_ID).toString().toStdString(); - - rsForums->forumSubscribe(fId, subscribe); + rsForums->forumSubscribe(mCurrForumId, subscribe); } void ForumsDialog::showForumDetails() { - if (mCurrForumId == "") - { + if (mCurrForumId.empty()) { return; } @@ -1651,8 +1416,7 @@ void ForumsDialog::showForumDetails() void ForumsDialog::editForumDetails() { - if (mCurrForumId == "") - { + if (mCurrForumId.empty()) { return; } @@ -1786,38 +1550,28 @@ bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFi void ForumsDialog::updateMessageSummaryList(std::string forumId) { - QTreeWidgetItem *apToplevelItem[2] = { YourForums, SubscribedForums }; - int nToplevelItem; + QTreeWidgetItem *items[2] = { yourForums, subscribedForums }; - for (nToplevelItem = 0; nToplevelItem < 2; nToplevelItem++) { - QTreeWidgetItem *pToplevelItem = apToplevelItem[nToplevelItem]; + for (int item = 0; item < 2; item++) { + int child; + int childCount = items[item]->childCount(); + for (child = 0; child < childCount; child++) { + QTreeWidgetItem *childItem = items[item]->child(child); + std::string childId = ui.forumTreeWidget->itemId(childItem).toStdString(); + if (childId.empty()) { + continue; + } - int nItem; - int nItemCount = pToplevelItem->childCount(); - - for (nItem = 0; nItem < nItemCount; nItem++) { - QTreeWidgetItem *pItem = pToplevelItem->child(nItem); - std::string fId = pItem->data(COLUMN_FORUM_DATA, ROLE_FORUM_ID).toString().toStdString(); - if (forumId.empty() || fId == forumId) { - /* calculating the new messages */ + if (forumId.empty() || childId == forumId) { + /* calculate unread messages */ unsigned int newMessageCount = 0; unsigned int unreadMessageCount = 0; - rsForums->getMessageCount(fId, newMessageCount, unreadMessageCount); + rsForums->getMessageCount(childId, newMessageCount, unreadMessageCount); - QString sTitle = pItem->data(COLUMN_FORUM_DATA, ROLE_FORUM_TITLE).toString(); - QFont qf = pItem->font(COLUMN_FORUM_TITLE); - if (unreadMessageCount) { - sTitle += " (" + QString::number(unreadMessageCount) + ")"; - qf.setBold(true); - } else { - qf.setBold(false); - } - - pItem->setText(COLUMN_FORUM_TITLE, sTitle); - pItem->setFont(COLUMN_FORUM_TITLE, qf); + ui.forumTreeWidget->setUnreadCount(childItem, unreadMessageCount); if (forumId.empty() == false) { - /* calculate only this forum */ + /* Calculate only this forum */ break; } } diff --git a/retroshare-gui/src/gui/ForumsDialog.h b/retroshare-gui/src/gui/ForumsDialog.h index cb827ee8b..ef5584fd9 100644 --- a/retroshare-gui/src/gui/ForumsDialog.h +++ b/retroshare-gui/src/gui/ForumsDialog.h @@ -26,6 +26,8 @@ #include "RsAutoUpdatePage.h" #include "ui_ForumsDialog.h" +class ForumInfo; + class ForumsDialog : public RsAutoUpdatePage { Q_OBJECT @@ -44,7 +46,7 @@ private slots: void newforum(); - void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev ); + void changedForum(const QString &id); void changedThread(); void clickedThread (QTreeWidgetItem *item, int column); @@ -86,9 +88,9 @@ private: void insertThreads(); void insertPost(); void updateMessageSummaryList(std::string forumId); + void forumInfoToGroupItemInfo(const ForumInfo &forumInfo, GroupItemInfo &groupItemInfo); void forumSubscribe(bool subscribe); - void FillForums(QTreeWidgetItem *Forum, QList &ChildList); void FillThreads(QList &ThreadList, bool bExpandNewMessages, std::list &itemToExpand); void FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewParent, bool bExpandNewMessages, std::list &itemToExpand); @@ -106,10 +108,10 @@ private: bool m_bProcessSettings; - QTreeWidgetItem *YourForums; - QTreeWidgetItem *SubscribedForums; - QTreeWidgetItem *PopularForums; - QTreeWidgetItem *OtherForums; + QTreeWidgetItem *yourForums; + QTreeWidgetItem *subscribedForums; + QTreeWidgetItem *popularForums; + QTreeWidgetItem *otherForums; std::string mCurrForumId; std::string mCurrThreadId; @@ -117,7 +119,6 @@ private: bool m_bIsForumAdmin; QFont m_ForumNameFont; - QFont m_ItemFont; int m_LastViewType; std::string m_LastForumID; diff --git a/retroshare-gui/src/gui/ForumsDialog.ui b/retroshare-gui/src/gui/ForumsDialog.ui index 986614b4d..6b44690ea 100644 --- a/retroshare-gui/src/gui/ForumsDialog.ui +++ b/retroshare-gui/src/gui/ForumsDialog.ui @@ -709,28 +709,13 @@ p, li { white-space: pre-wrap; } - - - true - + 0 0 - - - 0 - 0 - - - - - 0 - 0 - - 300 @@ -742,42 +727,12 @@ p, li { white-space: pre-wrap; } 9 - - Qt::CustomContextMenu - - - QAbstractItemView::NoEditTriggers - - + - 19 - 19 + -1 + -1 - - false - - - false - - - false - - - false - - - - RetroShare Forums - - - - 9 - 75 - true - - - @@ -1282,6 +1237,14 @@ border-image: url(:/images/closepressed.png) + + + GroupTreeWidget + QWidget +
gui/common/GroupTreeWidget.h
+ 1 +
+
diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.cpp b/retroshare-gui/src/gui/common/GroupTreeWidget.cpp new file mode 100644 index 000000000..7786945a0 --- /dev/null +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.cpp @@ -0,0 +1,356 @@ +/**************************************************************** + * This file is distributed under the following license: + * + * Copyright (c) 2010, RetroShare Team + * + * 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. + ****************************************************************/ + +#include "GroupTreeWidget.h" +#include "ui_GroupTreeWidget.h" + +#include "RSItemDelegate.h" +#include "PopularityDefs.h" + +#define COLUMN_NAME 0 +#define COLUMN_POPULARITY 1 +#define COLUMN_COUNT 2 +#define COLUMN_DATA COLUMN_NAME + +#define ROLE_ID Qt::UserRole +#define ROLE_NAME Qt::UserRole + 1 +#define ROLE_DESCRIPTION Qt::UserRole + 2 +#define ROLE_LASTPOST Qt::UserRole + 3 +#define ROLE_SEARCH_SCORE Qt::UserRole + 4 + +#define COMBO_NAME_INDEX 0 +#define COMBO_DESC_INDEX 1 + +GroupTreeWidget::GroupTreeWidget(QWidget *parent) : + QWidget(parent), ui(new Ui::GroupTreeWidget) +{ + ui->setupUi(this); + + /* Connect signals */ + connect(ui->clearFilter, SIGNAL(clicked()), this, SLOT(clearFilter())); + connect(ui->filterText, SIGNAL(textChanged(const QString &)), this, SLOT(filterChanged())); + connect(ui->filterCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(filterChanged())); + + connect(ui->treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint))); + connect(ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*))); + + /* Add own item delegate */ + RSItemDelegate *itemDelegate = new RSItemDelegate(this); + itemDelegate->removeFocusRect(COLUMN_POPULARITY); + itemDelegate->setSpacing(QSize(0, 2)); + ui->treeWidget->setItemDelegate(itemDelegate); + + /* Initialize tree widget */ + ui->treeWidget->setColumnCount(COLUMN_COUNT); + + /* Set header resize modes and initial section sizes */ + QHeaderView *header = ui->treeWidget->header (); + header->setResizeMode(COLUMN_NAME, QHeaderView::Stretch); + header->resizeSection(COLUMN_NAME, 170); + header->setResizeMode(COLUMN_POPULARITY, QHeaderView::Fixed); + header->resizeSection(COLUMN_POPULARITY, 25); + + /* Initialize filter */ + ui->clearFilter->hide(); +} + +GroupTreeWidget::~GroupTreeWidget() +{ + delete ui; +} + +void GroupTreeWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void GroupTreeWidget::customContextMenuRequested(const QPoint &pos) +{ + emit treeCustomContextMenuRequested(pos); +} + +void GroupTreeWidget::currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous) +{ + QString id; + + if (current) { + id = current->data(COLUMN_DATA, ROLE_ID).toString(); + } + + emit treeCurrentItemChanged(id); +} + +QTreeWidgetItem *GroupTreeWidget::addCategoryItem(const QString &name, const QIcon &icon, bool expand) +{ + QFont font = QFont("ARIAL", 10); + font.setBold(true); + + QTreeWidgetItem *item = new QTreeWidgetItem(); + item->setText(COLUMN_NAME, name); + item->setData(COLUMN_DATA, ROLE_NAME, name); + item->setFont(COLUMN_NAME, font); + item->setIcon(COLUMN_NAME, icon); + item->setSizeHint(COLUMN_NAME, QSize(18, 18)); + item->setForeground(COLUMN_NAME, QBrush(QColor(79, 79, 79))); + + ui->treeWidget->addTopLevelItem(item); + + item->setExpanded(expand); + + return item; +} + +QString GroupTreeWidget::itemId(QTreeWidgetItem *item) +{ + if (item == NULL) { + return ""; + } + + return item->data(COLUMN_DATA, ROLE_ID).toString(); +} + +void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList &itemList) +{ + if (categoryItem == NULL) { + return; + } + + /* Iterate all items */ + QList::const_iterator it; + for (it = itemList.begin(); it != itemList.end(); it++) { + const GroupItemInfo &itemInfo = *it; + + QTreeWidgetItem *item = NULL; + + /* Search exisiting item */ + int childCount = categoryItem->childCount(); + for (int child = 0; child < childCount; child++) { + QTreeWidgetItem *childItem = categoryItem->child(child); + if (childItem->data(COLUMN_DATA, ROLE_ID).toString() == itemInfo.id) { + /* Found child */ + item = childItem; + break; + } + } + + if (item == NULL) { + item = new GroupTreeWidgetItem(); + item->setData(COLUMN_DATA, ROLE_ID, itemInfo.id); + categoryItem->addChild(item); + } + + item->setText(COLUMN_NAME, itemInfo.name); + item->setData(COLUMN_DATA, ROLE_NAME, itemInfo.name); + item->setData(COLUMN_DATA, ROLE_DESCRIPTION, itemInfo.description); + + /* Set last post */ + item->setData(COLUMN_DATA, ROLE_LASTPOST, itemInfo.lastpost); + + /* Set icon */ + item->setIcon(COLUMN_NAME, itemInfo.icon); + + /* Set popularity */ + QString tooltip = PopularityDefs::tooltip(itemInfo.popularity); + item->setIcon(COLUMN_POPULARITY, PopularityDefs::icon(itemInfo.popularity)); + + /* Set tooltip */ + if (itemInfo.privatekey) { + tooltip += "\n" + tr("Private Key Available"); + } + item->setToolTip(COLUMN_NAME, tooltip); + item->setToolTip(COLUMN_POPULARITY, tooltip); + + /* Set color */ + QBrush brush; + if (itemInfo.privatekey) { + brush = QBrush(Qt::blue); + } + item->setForeground(COLUMN_NAME, brush); + + /* Calculate score */ + calculateScore(item); + } + + /* Remove all items not in list */ + int child = 0; + int childCount = categoryItem->childCount(); + while (child < childCount) { + QString id = categoryItem->child(child)->data(COLUMN_DATA, ROLE_ID).toString(); + + for (it = itemList.begin(); it != itemList.end(); it++) { + if (it->id == id) { + break; + } + } + + if (it == itemList.end()) { + delete(categoryItem->takeChild(child)); + childCount = categoryItem->childCount(); + } else { + child++; + } + } + + categoryItem->sortChildren(COLUMN_NAME, Qt::DescendingOrder); +} + +void GroupTreeWidget::setUnreadCount(QTreeWidgetItem *item, int unreadCount) +{ + if (item == NULL) { + return; + } + + QString name = item->data(COLUMN_DATA, ROLE_NAME).toString(); + QFont font = item->font(COLUMN_NAME); + + if (unreadCount) { + name += QString(" (%1)").arg(unreadCount); + font.setBold(true); + } else { + font.setBold(false); + } + + item->setText(COLUMN_NAME, name); + item->setFont(COLUMN_NAME, font); + +} + +void GroupTreeWidget::calculateScore(QTreeWidgetItem *item) +{ + if (item) { + /* Calculate one item */ + QString filterText = ui->filterText->text(); + int score; + if (filterText.isEmpty()) { + score = 0; + item->setHidden(false); + } else { + QString scoreString; + + switch (ui->filterCombo->currentIndex()) { + case COMBO_NAME_INDEX: + scoreString = item->data(COLUMN_DATA, ROLE_NAME).toString(); + break; + case COMBO_DESC_INDEX: + scoreString = item->data(COLUMN_DATA, ROLE_DESCRIPTION).toString(); + break; + } + + score = scoreString.count(filterText, Qt::CaseInsensitive); + + if (score) { + item->setHidden(false); + } else { + item->setHidden(true); + } + } + + item->setData(COLUMN_DATA, ROLE_SEARCH_SCORE, score); + + return; + } + + /* Find out which has given word in it */ + QTreeWidgetItemIterator itemIterator(ui->treeWidget); + QTreeWidgetItem *item; + while ((item = *itemIterator) != NULL) { + itemIterator++; + + if (item->data(COLUMN_DATA, ROLE_ID).toString().isEmpty()) { + continue; + } + + calculateScore(item); + } +} + +void GroupTreeWidget::filterChanged() +{ + if (ui->filterText->text().isEmpty()) { + clearFilter(); + return; + } + + ui->clearFilter->setEnabled(true); + ui->clearFilter->show(); + + /* Recalculate score */ + calculateScore(NULL); + + int count = ui->treeWidget->topLevelItemCount(); + for (int child = 0; child < count; child++) { + ui->treeWidget->topLevelItem(child)->sortChildren(COLUMN_NAME, Qt::DescendingOrder); + } +} + +void GroupTreeWidget::clearFilter() +{ + ui->filterText->clear(); + ui->clearFilter->hide(); + ui->filterText->setFocus(); + + /* Recalculate score */ + calculateScore(NULL); + + int count = ui->treeWidget->topLevelItemCount(); + for (int child = 0; child < count; child++) { + ui->treeWidget->topLevelItem(child)->sortChildren(COLUMN_NAME, Qt::DescendingOrder); + } +} + +GroupTreeWidgetItem::GroupTreeWidgetItem() : QTreeWidgetItem() +{ +} + +bool GroupTreeWidgetItem::operator<(const QTreeWidgetItem& other) const +{ + QDateTime otherChanTs = other.data(COLUMN_DATA, ROLE_LASTPOST).toDateTime(); + QDateTime thisChanTs = this->data(COLUMN_DATA, ROLE_LASTPOST).toDateTime(); + + uint32_t otherCount = other.data(COLUMN_DATA, ROLE_SEARCH_SCORE).toUInt(); + uint32_t thisCount = this->data(COLUMN_DATA, ROLE_SEARCH_SCORE).toUInt(); + + /* If counts are equal then determine by who has the most recent post */ + if (otherCount == thisCount){ + if (thisChanTs < otherChanTs) { + return true; + } + } + + /* Choose the item where the string occurs the most */ + if (thisCount < otherCount) { + return true; + } + + if (thisChanTs < otherChanTs) { + return true; + } + + /* Compare name */ + return text(COLUMN_NAME) < other.text(COLUMN_NAME); +} diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.h b/retroshare-gui/src/gui/common/GroupTreeWidget.h new file mode 100644 index 000000000..579f45421 --- /dev/null +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.h @@ -0,0 +1,102 @@ +/**************************************************************** + * This file is distributed under the following license: + * + * Copyright (c) 2010, RetroShare Team + * + * 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 GROUPTREEWIDGET_H +#define GROUPTREEWIDGET_H + +#include +#include +#include +#include + +namespace Ui { + class GroupTreeWidget; +} + +class GroupItemInfo +{ +public: + GroupItemInfo() + { + popularity = 0; + privatekey = false; + } + +public: + QString id; + QString name; + QString description; + int popularity; + QDateTime lastpost; + QIcon icon; + bool privatekey; +}; + +class GroupTreeWidget : public QWidget +{ + Q_OBJECT + +public: + GroupTreeWidget(QWidget *parent = 0); + ~GroupTreeWidget(); + + // Add a new category item + QTreeWidgetItem *addCategoryItem(const QString &name, const QIcon &icon, bool expand); + // Get id of item + QString itemId(QTreeWidgetItem *item); + // Fill items of a group + void fillGroupItems(QTreeWidgetItem *categoryItem, const QList &itemList); + // Set the unread count of an item + void setUnreadCount(QTreeWidgetItem *item, int unreadCount); + +signals: + void treeCustomContextMenuRequested(const QPoint &pos); + void treeCurrentItemChanged(const QString &id); + +protected: + void changeEvent(QEvent *e); + +private slots: + void customContextMenuRequested(const QPoint &pos); + void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); + void filterChanged(); + void clearFilter(); + +private: + void calculateScore(QTreeWidgetItem *item); + +private: + Ui::GroupTreeWidget *ui; +}; + +class GroupTreeWidgetItem : public QTreeWidgetItem +{ +public: + GroupTreeWidgetItem(); + + /** + * reimplementing comparison operator so GroupTreeWidgetItem can be ordered in terms + * of occurences of property filterText in its data columns + */ + bool operator<(const QTreeWidgetItem &other) const; +}; + +#endif // GROUPTREEWIDGET_H diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.ui b/retroshare-gui/src/gui/common/GroupTreeWidget.ui new file mode 100644 index 000000000..3e1460bed --- /dev/null +++ b/retroshare-gui/src/gui/common/GroupTreeWidget.ui @@ -0,0 +1,240 @@ + + + GroupTreeWidget + + + + 0 + 0 + 316 + 257 + + + + QComboBox QAbstractItemView { +background-color:white; +} + +QComboBox::down-arrow { +image: url(:/images/combobox_arrow.png); +} + +QComboBox:drop-down +{ +subcontrol-origin: padding; +subcontrol-position: top right; +border-left-style: none; +border-top-right-radius: 1px; +border-bottom-right-radius: 1px; +} + +QComboBox { +border-image: url(:/images/btn_26.png) 4; +border-width: 4; +padding: 0px 6px; +font-size: 12px; +} + +QComboBox:hover { +border-image: url(:/images/btn_26_hover.png) 4; +} + +QComboBox::disabled { +color:gray; +} + + + + 2 + + + 0 + + + + + 0 + + + + + + 0 + 22 + + + + + 16777215 + 22 + + + + QFrame#searchlineframe{ +background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 #FEFEFE, stop:1 #E8E8E8); + +border: 1px solid #CCCCCC;} + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 1 + + + 0 + + + + + + 3 + 0 + + + + + 0 + 16 + + + + + 1677777 + 16777215 + + + + Enter a Keyword here + + + QLineEdit#searchLine{ +border: none;} + + + + + + + + + Title + + + + + Description + + + + + + + + + 16 + 16 + + + + + 16 + 16 + + + + Reset + + + QPushButton +{ + border-image: url(:/images/closenormal.png) +} + +QPushButton:hover +{ +border-image: url(:/images/closehover.png) +} + +QPushButton:pressed { +border-image: url(:/images/closepressed.png) +} + + + + + + + + + + + + + + + true + + + + 0 + 0 + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 300 + 0 + + + + + 9 + + + + Qt::CustomContextMenu + + + QAbstractItemView::NoEditTriggers + + + false + + + false + + + false + + + false + + + + + + + + diff --git a/retroshare-gui/src/lang/retroshare_de.qm b/retroshare-gui/src/lang/retroshare_de.qm index d6e14f845..832422182 100644 Binary files a/retroshare-gui/src/lang/retroshare_de.qm and b/retroshare-gui/src/lang/retroshare_de.qm differ diff --git a/retroshare-gui/src/lang/retroshare_de.ts b/retroshare-gui/src/lang/retroshare_de.ts index aa305cc47..698ebf309 100644 --- a/retroshare-gui/src/lang/retroshare_de.ts +++ b/retroshare-gui/src/lang/retroshare_de.ts @@ -757,13 +757,6 @@ p, li { white-space: pre-wrap; } Verteile Details - - CallToaster - - Message - Nachricht - - CertificatePage @@ -1005,7 +998,7 @@ p, li { white-space: pre-wrap; } ChannelFeed - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1023,17 +1016,7 @@ p, li { white-space: pre-wrap; } Hinzufügen - - Reset - Zurücksetzen - - - - Enter a Keyword here - Geben sie einen Suchbegriff ein - - - + Set all to read Alle als gelesen markieren @@ -1048,17 +1031,7 @@ p, li { white-space: pre-wrap; } Abbestellen - - Title - Titel - - - - Description - Beschreibung - - - + Subscribe To Channel Kanal abonnieren @@ -1073,42 +1046,28 @@ p, li { white-space: pre-wrap; } Kanal abbestellen - - Name - Name - - - - Popularity - Beliebtheit - - - + Own Channels Meine Kanäle - + Subscribed Channels Abonnierte Kanäle - + Popular Channels Beliebte Kanäle - + Other Channels Andere Kanäle - Popularity: %1 - Beliebtheit: %1 - - - - + + Post to Channel Kanalbeitrag erstellen @@ -1133,16 +1092,12 @@ p, li { white-space: pre-wrap; } Verteile Kanal - + No Channel Selected Keinen Kanal gewählt - Restore Publish Rights for Channel - Stelle Veröffentlichungsrechte für Kanal wieder her - - - + Edit Channel Details Kanal-Details bearbeiten @@ -2893,18 +2848,6 @@ Das ist nützlich, wenn Du eine externe Festplatte freigibst und die Datei nicht DownloadToaster - - Play video - Video abspielen - - - Play button - Abspielen Knopf - - - Play the downloaded video - Spiele das heruntergeladene Video ab - Start file @@ -2920,18 +2863,6 @@ Das ist nützlich, wenn Du eine externe Festplatte freigibst und die Datei nicht Close Schliessen - - Download completed - Download fertig - - - Play File - Datei abspielen - - - File %1 does not exist at location. - Datei %1 existiert nicht. - EditChanDetails @@ -3272,7 +3203,7 @@ p, li { white-space: pre-wrap; } Aktive Blöcke: - + Availability map ( Verfügbarkeits map @@ -3556,7 +3487,7 @@ p, li { white-space: pre-wrap; } ForumsDialog - + Subscribe to Forum Forum abonnieren @@ -3621,60 +3552,61 @@ p, li { white-space: pre-wrap; } Erweitern - Popularity: - Beliebtheit: + + AUTHD + - - + + Anonymous Anonym - - + + signed unterzeichnet - - + + none keine - + RetroShare - + No Forum Selected! Kein Forum ausgewählt! - + You cant reply a Anonymous Author Du kannst einem anonymen Autor nicht antworten - + Your Forums Deine Foren - + Subscribed Forums Abonnierte Foren - + Popular Forums Populäre Foren - + Other Forums Andere Foren @@ -3697,17 +3629,12 @@ p, li { white-space: pre-wrap; } Hinzufügen - - RetroShare Forums - RetroShare Foren - - - + Start new Thread for Selected Forum Starte ein neues Thema im ausgewählten Forum - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -3801,8 +3728,8 @@ p, li { white-space: pre-wrap; } Druckvorschau - - + + Start New Thread Erstelle neues Thema @@ -3830,7 +3757,7 @@ p, li { white-space: pre-wrap; } Inhalt - + Mark as read Als gelesen markieren @@ -4352,6 +4279,34 @@ Fill in your GPG password when asked, to sign your new key. Favoriten + + GroupTreeWidget + + + Enter a Keyword here + Gib einen Suchbegriff ein + + + + Title + Titel + + + + Description + Beschreibung + + + + Reset + Zurücksetzen + + + + Private Key Available + Privater Schlüssel verfügbar + + GuiExprElement @@ -5969,18 +5924,6 @@ Willst Du die Nachricht speichern ? MessageToaster - - Play video - Video abspielen - - - Play button - Abspielen Knopf - - - Play the downloaded video - Spiele das heruntergeladene Video ab - <b>1 new Message from</b> @@ -6606,26 +6549,6 @@ p, li { white-space: pre-wrap; } NetworkDialog - - Select a pem/pqi File - Wählen einer PEM- oder PQI-Datei - - - File Not Found - Datei nicht gefunden - - - %1 does not exist. Would you like to create it? - %1 ist nicht vorhanden. Möchten Sie es jetzt erstellen? - - - Failed to Create File - Es ist nicht gelungen, die Datei zu erstellen - - - Unable to create %1 [%2] - Kann %1 [%2] nicht erstellen - Personal signature @@ -6663,14 +6586,6 @@ Right-click and select 'make friend' to be able to connect. hat mich authentifiziert. Rechtsklick und als Freund hinzufügen um zu verbinden. - - Select Certificate - Zertifikat auswählen - - - Certificates (*.pqi *.pem) - Zertifikate (*.pqi *.pem) - @@ -6824,14 +6739,6 @@ p, li { white-space: pre-wrap; } yourself selbst - - Certificate file successfully created - Zertifikat-Datei erfolgreich erstellt - - - Sorry, certificate file creation failed - Zertifikat-Datei konnte nicht erstellt werden - Network Status @@ -6885,25 +6792,9 @@ p, li { white-space: pre-wrap; } Peer ID Peer ID - - Sorry, create certificate failed - Zertifikat-Datei konnte nicht erstellt werden - - - Please choose a filename - Bitte wählen sie einen Dateinamen - - - RetroShare Certificate (*.rsc );;All Files (*) - RetroShare Zertifikat (*.rsc );;Alle Dateien (*) - NetworkView - - Form - Formular - background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 lightgray, stop:1 darkgray); @@ -7168,10 +7059,6 @@ p, li { white-space: pre-wrap; } OnlineToaster - - RetroShare - RetroShare - Friend Online @@ -7316,10 +7203,6 @@ p, li { white-space: pre-wrap; } PeerStatus - - Online: 0 | Friends: 0 | Network: 0 - Online: 0 | Freunde: 0 | Netzwerk: 0 - Friends: 0/0 @@ -7335,10 +7218,6 @@ p, li { white-space: pre-wrap; } Friends Freunde - - Online - Online - PeersDialog @@ -8062,7 +7941,7 @@ p, li { white-space: pre-wrap; } PopularityDefs - + Popularity Beliebtheit @@ -9390,7 +9269,7 @@ p, li { white-space: pre-wrap; } Enter a keyword here (at least 3 char long) - Geben sie einen Suchbegriff ein (min. 3 Zeichen) + Gib einen Suchbegriff ein (min. 3 Zeichen) @@ -9451,7 +9330,7 @@ p, li { white-space: pre-wrap; } Enter a Keyword here - Geben sie einen Suchbegriff ein + Gib einen Suchbegriff ein @@ -11239,7 +11118,7 @@ p, li { white-space: pre-wrap; } Übertrage - + RetroShare @@ -11264,7 +11143,7 @@ p, li { white-space: pre-wrap; } Soll dieser Download wirklich abgebrochen und gelöscht werden? - + Speed / Queue position Geschwindigkeits- / Warteschlangenposition @@ -11327,43 +11206,43 @@ p, li { white-space: pre-wrap; } - + Failed Gescheitert - + - + Okay OK - - + + Waiting Warte - + Downloading Ladend - + Complete Vollständig - + Unknown Unbekannt - + version: Version: @@ -11373,7 +11252,7 @@ p, li { white-space: pre-wrap; } Hochladend - + Checking... Überprüfe... @@ -11416,26 +11295,6 @@ p, li { white-space: pre-wrap; } Trust Vertrauen - - is athenticated (one way) by - ist authentifiziert (ein Weg) von - - - athenticated himself - authentifizierte sich selbst - - - athenticated each others - authentifizierten sich beide jeweils - - - is athenticated by - ist authentifiziert von - - - athenticated - authentifiziert - is authenticated (one way) by