From 094e54d1220708cb0f146aca36fa40cf58f29617 Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 25 Mar 2022 16:23:09 +0100 Subject: [PATCH 01/10] added cmake list for files in GUI --- retroshare-gui/src/CMakeLists.txt | 1291 +++++++++++++++++++++++++++++ 1 file changed, 1291 insertions(+) create mode 100644 retroshare-gui/src/CMakeLists.txt diff --git a/retroshare-gui/src/CMakeLists.txt b/retroshare-gui/src/CMakeLists.txt new file mode 100644 index 000000000..871175869 --- /dev/null +++ b/retroshare-gui/src/CMakeLists.txt @@ -0,0 +1,1291 @@ +################################################################################ +# uselibresapi.pri # +# Copyright (C) 2018, Retroshare team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see . # +################################################################################ + +list( + APPEND RS_SOURCES + TorControl/TorControlWindow.cpp + + main.cpp + rshare.cpp + + gui/notifyqt.cpp + gui/AboutDialog.cpp + gui/AboutWidget.cpp + gui/QuickStartWizard.cpp + gui/StartDialog.cpp + gui/HomePage.cpp + gui/PluginsPage.cpp + gui/PluginManagerWidget.cpp + gui/PluginManager.cpp + gui/ChatLobbyWidget.cpp + gui/GetStartedDialog.cpp + gui/GenCertDialog.cpp + gui/NetworkDialog.cpp + gui/mainpagestack.cpp + gui/MainWindow.cpp + gui/NetworkView.cpp + gui/FriendsDialog.cpp + gui/ServicePermissionDialog.cpp + gui/RemoteDirModel.cpp + gui/RsAutoUpdatePage.cpp + gui/RetroShareLink.cpp + gui/SearchTreeWidget.cpp + gui/ShareManager.cpp + gui/ShareDialog.cpp + gui/NewsFeed.cpp + gui/SFListDelegate.cpp + gui/MainPage.cpp + gui/HelpDialog.cpp + gui/LogoBar.cpp + gui/SoundManager.cpp + + gui/im_history/ImHistoryBrowser.cpp + gui/im_history/IMHistoryItemDelegate.cpp + gui/im_history/IMHistoryItemPainter.cpp + + gui/help/browser/helpbrowser.cpp + gui/help/browser/helptextbrowser.cpp + + gui/FileTransfer/SearchDialog.cpp + gui/FileTransfer/SharedFilesDialog.cpp + gui/FileTransfer/TransfersDialog.cpp + gui/FileTransfer/FileTransferInfoWidget.cpp + gui/FileTransfer/DLListDelegate.cpp + gui/FileTransfer/ULListDelegate.cpp + gui/FileTransfer/xprogressbar.cpp + gui/FileTransfer/DetailsDialog.cpp + gui/FileTransfer/TransferUserNotify.cpp + gui/FileTransfer/BannedFilesDialog.cpp + + lang/languagesupport.cpp + + util/RsProtectedTimer.cpp + util/stringutil.cpp + util/RsNetUtil.cpp + util/DateTime.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/printpreview.cpp + util/log.cpp + util/misc.cpp + util/HandleRichText.cpp + util/ObjectPainter.cpp + util/RsFile.cpp + util/RichTextEdit.cpp + util/ClickableLabel.cpp + util/AspectRatioPixmapLabel.cpp + + gui/profile/ProfileWidget.cpp + gui/profile/StatusMessage.cpp + gui/profile/ProfileManager.cpp + + gui/chat/PopupChatWindow.cpp + gui/chat/PopupChatDialog.cpp + gui/chat/PopupDistantChatDialog.cpp + gui/chat/ChatTabWidget.cpp + gui/chat/ChatWidget.cpp + gui/chat/ChatDialog.cpp + gui/chat/ChatLobbyDialog.cpp + gui/chat/CreateLobbyDialog.cpp + gui/chat/ChatStyle.cpp + gui/chat/ChatUserNotify.cpp + gui/chat/ChatLobbyUserNotify.cpp + + gui/connect/ConfCertDialog.cpp + gui/connect/PGPKeyDialog.cpp + gui/connect/ConnectFriendWizard.cpp + gui/connect/ConnectProgressDialog.cpp + gui/connect/FriendRecommendDialog.cpp + + gui/msgs/MessagesDialog.cpp + gui/msgs/MessageComposer.cpp + gui/msgs/MessageWidget.cpp + gui/msgs/MessageWindow.cpp + gui/msgs/MessageModel.cpp + gui/msgs/TagsMenu.cpp + gui/msgs/MessageUserNotify.cpp + + gui/common/RsButtonOnText.cpp + gui/common/RSGraphWidget.cpp + gui/common/ElidedLabel.cpp + gui/common/vmessagebox.cpp + gui/common/RsCollectionDialog.cpp + gui/common/RsCollection.cpp + gui/common/RsUrlHandler.cpp + gui/common/rwindow.cpp + gui/common/rshtml.cpp + gui/common/AvatarDefs.cpp + gui/common/AvatarDialog.cpp + gui/common/GroupFlagsWidget.cpp + gui/common/GroupSelectionBox.cpp + gui/common/GroupChooser.cpp + gui/common/StatusDefs.cpp + gui/common/TagDefs.cpp + gui/common/GroupDefs.cpp + gui/common/Emoticons.cpp + gui/common/RSComboBox.cpp + gui/common/RSListWidgetItem.cpp + gui/common/RSTextEdit.cpp + gui/common/RSPlainTextEdit.cpp + gui/common/RSTreeWidget.cpp + gui/common/RSTreeWidgetItem.cpp + gui/common/RSFeedWidget.cpp + gui/common/RSTabWidget.cpp + gui/common/RSElidedItemDelegate.cpp + gui/common/RSItemDelegate.cpp + gui/common/PeerDefs.cpp + gui/common/FilesDefs.cpp + gui/common/PopularityDefs.cpp + gui/common/RsBanListDefs.cpp + gui/common/GroupTreeWidget.cpp + gui/common/RSTreeView.cpp + gui/common/AvatarWidget.cpp + gui/common/FriendListModel.cpp + gui/common/NewFriendList.cpp + gui/common/FriendSelectionWidget.cpp + gui/common/FriendSelectionDialog.cpp + gui/common/HashBox.cpp + gui/common/LineEditClear.cpp + gui/common/DropLineEdit.cpp + gui/common/RSTextBrowser.cpp + gui/common/RSImageBlockWidget.cpp + gui/common/FeedNotify.cpp + gui/common/UserNotify.cpp + gui/common/HeaderFrame.cpp + gui/common/MimeTextEdit.cpp + gui/common/UIStateHelper.cpp + gui/common/FloatingHelpBrowser.cpp + gui/common/SubscribeToolButton.cpp + gui/common/RsBanListToolButton.cpp + gui/common/FlowLayout.cpp + gui/common/PictureFlow.cpp + gui/common/ToasterNotify.cpp + + gui/style/RSStyle.cpp + gui/style/StyleDialog.cpp + + gui/settings/RSPermissionMatrixWidget.cpp + gui/settings/rsharesettings.cpp + gui/settings/RsharePeerSettings.cpp + gui/settings/rsettings.cpp + gui/settings/rsettingswin.cpp + gui/settings/GeneralPage.cpp + gui/settings/AboutPage.cpp + gui/settings/ServerPage.cpp + gui/settings/NotifyPage.cpp + gui/settings/CryptoPage.cpp + gui/settings/PeoplePage.cpp + gui/settings/MessagePage.cpp + gui/settings/NewTag.cpp + gui/settings/ForumPage.cpp + gui/settings/PluginsPage.cpp + gui/settings/PluginItem.cpp + gui/settings/AppearancePage.cpp + gui/settings/FileAssociationsPage.cpp + gui/settings/SoundPage.cpp + gui/settings/TransferPage.cpp + gui/settings/ChatPage.cpp + gui/settings/ChannelPage.cpp + gui/settings/PostedPage.cpp + gui/settings/ServicePermissionsPage.cpp + gui/settings/AddFileAssociationDialog.cpp + gui/settings/GroupFrameSettingsWidget.cpp + + gui/statusbar/peerstatus.cpp + gui/statusbar/natstatus.cpp + gui/statusbar/dhtstatus.cpp + gui/statusbar/torstatus.cpp + gui/statusbar/ratesstatus.cpp + gui/statusbar/hashingstatus.cpp + gui/statusbar/discstatus.cpp + gui/statusbar/SoundStatus.cpp + gui/statusbar/OpModeStatus.cpp + gui/statusbar/ToasterDisable.cpp + gui/statusbar/SysTrayStatus.cpp + + gui/toaster/ToasterItem.cpp + gui/toaster/MessageToaster.cpp + gui/toaster/DownloadToaster.cpp + gui/toaster/OnlineToaster.cpp + gui/toaster/ChatToaster.cpp + gui/toaster/GroupChatToaster.cpp + gui/toaster/ChatLobbyToaster.cpp + gui/toaster/FriendRequestToaster.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/elnode.cpp + + gui/feeds/BoardsCommentsItem.cpp + gui/feeds/FeedItem.cpp + gui/feeds/FeedHolder.cpp + gui/feeds/GxsCircleItem.cpp + gui/feeds/ChannelsCommentsItem.cpp + gui/feeds/PeerItem.cpp + gui/feeds/MsgItem.cpp + gui/feeds/ChatMsgItem.cpp + gui/feeds/SubFileItem.cpp + gui/feeds/AttachFileItem.cpp + gui/feeds/SecurityItem.cpp + gui/feeds/SecurityIpItem.cpp + gui/feeds/NewsFeedUserNotify.cpp + + gui/groups/CreateGroup.cpp + + gui/statistics/BandwidthGraphWindow.cpp + gui/statistics/BandwidthStatsWidget.cpp + gui/statistics/DhtWindow.cpp + gui/statistics/Histogram.cpp + gui/statistics/TurtleRouterDialog.cpp + gui/statistics/TurtleRouterStatistics.cpp + gui/statistics/GxsIdStatistics.cpp + gui/statistics/GlobalRouterStatistics.cpp + gui/statistics/GxsTransportStatistics.cpp + gui/statistics/StatisticsWindow.cpp + gui/statistics/BwCtrlWindow.cpp + gui/statistics/RttStatistics.cpp + gui/statistics/BWGraph.cpp + + util/RsSyntaxHighlighter.cpp + util/imageutil.cpp + util/retroshareWin32.cpp + + gui/NetworkDialog/pgpid_item_model.cpp + gui/NetworkDialog/pgpid_item_proxy.cpp + ) + +list( + APPEND RS_FORMS + TorControl/TorControlWindow.ui + + gui/StartDialog.ui + gui/HomePage.ui + gui/GetStartedDialog.ui + gui/GenCertDialog.ui + gui/AboutDialog.ui + gui/AboutWidget.ui + gui/QuickStartWizard.ui + gui/NetworkDialog.ui + gui/common/AvatarDialog.ui + gui/MainWindow.ui + gui/NetworkView.ui + gui/FriendsDialog.ui + gui/NewsFeed.ui + gui/ShareManager.ui + gui/ShareDialog.ui + gui/help/browser/helpbrowser.ui + gui/HelpDialog.ui + gui/ServicePermissionDialog.ui + gui/ChatLobbyWidget.ui + + gui/FileTransfer/TransfersDialog.ui + gui/FileTransfer/DetailsDialog.ui + gui/FileTransfer/SearchDialog.ui + gui/FileTransfer/SharedFilesDialog.ui + gui/FileTransfer/BannedFilesDialog.ui + + gui/profile/ProfileWidget.ui + gui/profile/StatusMessage.ui + gui/profile/ProfileManager.ui + + gui/chat/PopupChatWindow.ui + gui/chat/PopupChatDialog.ui + gui/chat/ChatTabWidget.ui + gui/chat/ChatWidget.ui + gui/chat/ChatLobbyDialog.ui + gui/chat/CreateLobbyDialog.ui + + gui/connect/ConfCertDialog.ui + gui/connect/PGPKeyDialog.ui + gui/connect/ConnectFriendWizard.ui + gui/connect/ConnectProgressDialog.ui + gui/connect/FriendRecommendDialog.ui + + gui/msgs/MessagesDialog.ui + gui/msgs/MessageComposer.ui + gui/msgs/MessageWindow.ui + gui/msgs/MessageWidget.ui + + gui/settings/settingsw.ui + gui/settings/GeneralPage.ui + gui/settings/ServerPage.ui + gui/settings/NotifyPage.ui + gui/settings/PeoplePage.ui + gui/settings/CryptoPage.ui + gui/settings/MessagePage.ui + gui/settings/NewTag.ui + gui/settings/ForumPage.ui + gui/settings/AboutPage.ui + gui/settings/PluginsPage.ui + gui/settings/AppearancePage.ui + gui/settings/TransferPage.ui + gui/settings/SoundPage.ui + gui/settings/ChatPage.ui + gui/settings/ChannelPage.ui + gui/settings/PostedPage.ui + gui/settings/ServicePermissionsPage.ui + gui/settings/PluginItem.ui + gui/settings/GroupFrameSettingsWidget.ui + + gui/toaster/MessageToaster.ui + gui/toaster/OnlineToaster.ui + gui/toaster/DownloadToaster.ui + gui/toaster/ChatToaster.ui + gui/toaster/GroupChatToaster.ui + gui/toaster/ChatLobbyToaster.ui + gui/toaster/FriendRequestToaster.ui + + gui/advsearch/AdvancedSearchDialog.ui + gui/advsearch/expressionwidget.ui + + gui/feeds/BoardsCommentsItem.ui + gui/feeds/GxsCircleItem.ui + gui/feeds/ChannelsCommentsItem.ui + gui/feeds/PeerItem.ui + gui/feeds/MsgItem.ui + gui/feeds/ChatMsgItem.ui + gui/feeds/SubFileItem.ui + gui/feeds/AttachFileItem.ui + gui/feeds/SecurityItem.ui + gui/feeds/SecurityIpItem.ui + + gui/im_history/ImHistoryBrowser.ui + + gui/groups/CreateGroup.ui + + gui/common/GroupTreeWidget.ui + gui/common/AvatarWidget.ui + gui/common/NewFriendList.ui + gui/common/FriendSelectionWidget.ui + gui/common/HashBox.ui + gui/common/RSImageBlockWidget.ui + gui/common/RsCollectionDialog.ui + gui/common/HeaderFrame.ui + gui/common/RSFeedWidget.ui + + gui/style/StyleDialog.ui + + gui/statistics/BandwidthGraphWindow.ui + gui/statistics/BandwidthStatsWidget.ui + gui/statistics/DhtWindow.ui + gui/statistics/TurtleRouterDialog.ui + gui/statistics/TurtleRouterStatistics.ui + gui/statistics/GxsIdStatistics.ui + gui/statistics/GlobalRouterStatistics.ui + gui/statistics/GxsTransportStatistics.ui + gui/statistics/StatisticsWindow.ui + gui/statistics/BwCtrlWindow.ui + gui/statistics/RttStatistics.ui + + util/RichTextEdit.ui + ) + +list( + APPEND RS_IMPLEMENTATION_HEADERS + + TorControl/TorControlWindow.h + + chat/distantchat.h + chat/distributedchat.h + chat/p3chatservice.h + chat/rschatitems.h + + rshare.h + retroshare-gui/configpage.h + retroshare-gui/RsAutoUpdatePage.h + retroshare-gui/mainpage.h + + control/bandwidthevent.h + control/eventtype.h + + gui/QuickStartWizard.h + gui/notifyqt.h + gui/GetStartedDialog.h + gui/StartDialog.h + gui/HomePage.h + gui/NetworkDialog.h + gui/GenCertDialog.h + gui/linetypes.h + gui/mainpagestack.h + gui/MainWindow.h + gui/RSHumanReadableDelegate.h + gui/AboutDialog.h + gui/AboutWidget.h + gui/NetworkView.h + gui/FriendsDialog.h + gui/ServicePermissionDialog.h + gui/RemoteDirModel.h + gui/PluginsPage.h + gui/PluginManagerWidget.h + gui/PluginManager.h + gui/RetroShareLink.h + gui/SearchTreeWidget.h + gui/ShareManager.h + gui/NewsFeed.h + gui/ShareDialog.h + gui/SFListDelegate.h + gui/SoundManager.h + gui/HelpDialog.h + gui/LogoBar.h + + gui/common/AvatarDialog.h + + gui/NetworkDialog/pgpid_item_model.h + gui/NetworkDialog/pgpid_item_proxy.h + + gui/FileTransfer/SearchDialog.h + gui/FileTransfer/SharedFilesDialog.h + gui/FileTransfer/xprogressbar.h + gui/FileTransfer/DetailsDialog.h + gui/FileTransfer/FileTransferInfoWidget.h + gui/FileTransfer/DLListDelegate.h + gui/FileTransfer/ULListDelegate.h + gui/FileTransfer/TransfersDialog.h + gui/FileTransfer/BannedFilesDialog.h + gui/FileTransfer/TransferUserNotify.h + + gui/statistics/TurtleRouterDialog.h + gui/statistics/TurtleRouterStatistics.h + gui/statistics/GxsIdStatistics.h + gui/statistics/dhtgraph.h + gui/statistics/Histogram.h + gui/statistics/BandwidthGraphWindow.h + gui/statistics/turtlegraph.h + gui/statistics/BandwidthStatsWidget.h + gui/statistics/DhtWindow.h + gui/statistics/GlobalRouterStatistics.h + gui/statistics/GxsTransportStatistics.h + gui/statistics/StatisticsWindow.h + gui/statistics/BwCtrlWindow.h + gui/statistics/BWGraph.h + gui/statistics/RttStatistics.h + + gui/plugins/PluginInterface.h + + gui/im_history/ImHistoryBrowser.h + gui/im_history/IMHistoryItemDelegate.h + gui/im_history/IMHistoryItemPainter.h + + lang/languagesupport.h + + util/RsSyntaxHighlighter.h + util/imageutil.h + util/RichTextEdit.h + util/retroshareWin32.h + util/RsProtectedTimer.h + util/stringutil.h + util/RsNetUtil.h + util/DateTime.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/RsAction.h + util/RsUserdata.h + util/printpreview.h + util/log.h + util/misc.h + util/HandleRichText.h + util/ObjectPainter.h + util/QtVersion.h + util/RsFile.h + util/qtthreadsutils.h + util/ClickableLabel.h + util/AspectRatioPixmapLabel.h + + gui/profile/ProfileWidget.h + gui/profile/ProfileManager.h + gui/profile/StatusMessage.h + + gui/chat/PopupChatWindow.h + gui/chat/PopupChatDialog.h + gui/chat/PopupDistantChatDialog.h + gui/chat/ChatTabWidget.h + gui/chat/ChatWidget.h + gui/chat/ChatDialog.h + gui/ChatLobbyWidget.h + gui/chat/ChatLobbyDialog.h + gui/chat/CreateLobbyDialog.h + gui/chat/ChatStyle.h + gui/chat/ChatUserNotify.h + gui/chat/ChatLobbyUserNotify.h + + gui/connect/ConfCertDialog.h + gui/connect/PGPKeyDialog.h + gui/connect/FriendRecommendDialog.h + + gui/msgs/MessagesDialog.h + gui/msgs/MessageInterface.h + gui/msgs/MessageComposer.h + gui/msgs/MessageWindow.h + gui/msgs/MessageWidget.h + gui/msgs/MessageModel.h + gui/msgs/TagsMenu.h + gui/msgs/textformat.h + gui/msgs/MessageUserNotify.h + + gui/images/retroshare_win.rc.h + + gui/settings/RSPermissionMatrixWidget.h + gui/settings/rsharesettings.h + gui/settings/RsharePeerSettings.h + gui/settings/rsettings.h + gui/settings/rsettingswin.h + gui/settings/GeneralPage.h + gui/settings/PeoplePage.h + gui/settings/AboutPage.h + gui/settings/ServerPage.h + gui/settings/NotifyPage.h + gui/settings/CryptoPage.h + gui/settings/MessagePage.h + gui/settings/NewTag.h + gui/settings/ForumPage.h + gui/settings/PluginsPage.h + gui/settings/PluginItem.h + gui/settings/AppearancePage.h + gui/settings/FileAssociationsPage.h + gui/settings/SoundPage.h + gui/settings/TransferPage.h + gui/settings/ChatPage.h + gui/settings/ChannelPage.h + gui/settings/PostedPage.h + gui/settings/ServicePermissionsPage.h + gui/settings/AddFileAssociationDialog.h + gui/settings/GroupFrameSettingsWidget.h + + gui/toaster/ToasterItem.h + gui/toaster/MessageToaster.h + gui/toaster/OnlineToaster.h + gui/toaster/DownloadToaster.h + gui/toaster/ChatToaster.h + gui/toaster/GroupChatToaster.h + gui/toaster/ChatLobbyToaster.h + gui/toaster/FriendRequestToaster.h + + gui/common/RsButtonOnText.h + gui/common/RsCollection.h + gui/common/RSGraphWidget.h + gui/common/ElidedLabel.h + gui/common/vmessagebox.h + gui/common/RsUrlHandler.h + gui/common/RsCollectionDialog.h + gui/common/rwindow.h + gui/common/rshtml.h + gui/common/AvatarDefs.h + gui/common/GroupFlagsWidget.h + gui/common/GroupSelectionBox.h + gui/common/GroupChooser.h + gui/common/StatusDefs.h + gui/common/TagDefs.h + gui/common/GroupDefs.h + gui/common/Emoticons.h + gui/common/RSComboBox.h + gui/common/RSListWidgetItem.h + gui/common/RSTextEdit.h + gui/common/RSPlainTextEdit.h + gui/common/RSTreeWidget.h + gui/common/RSTreeWidgetItem.h + gui/common/RSFeedWidget.h + gui/common/RSTabWidget.h + gui/common/RSElidedItemDelegate.h + gui/common/RSItemDelegate.h + gui/common/PeerDefs.h + gui/common/FilesDefs.h + gui/common/PopularityDefs.h + gui/common/RsBanListDefs.h + gui/common/GroupTreeWidget.h + gui/common/RSTreeView.h + gui/common/AvatarWidget.h + gui/common/FriendListModel.h + gui/common/NewFriendList.h + gui/common/FriendSelectionWidget.h + gui/common/FriendSelectionDialog.h + gui/common/HashBox.h + gui/common/LineEditClear.h + gui/common/DropLineEdit.h + gui/common/RSTextBrowser.h + gui/common/RSImageBlockWidget.h + gui/common/FeedNotify.h + gui/common/UserNotify.h + gui/common/HeaderFrame.h + gui/common/MimeTextEdit.h + gui/common/UIStateHelper.h + gui/common/FloatingHelpBrowser.h + gui/common/SubscribeToolButton.h + gui/common/RsBanListToolButton.h + gui/common/FlowLayout.h + gui/common/PictureFlow.h + gui/common/ToasterNotify.h + + gui/style/RSStyle.h + gui/style/StyleDialog.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/torstatus.h + gui/statusbar/ratesstatus.h + gui/statusbar/hashingstatus.h + gui/statusbar/discstatus.h + gui/statusbar/SoundStatus.h + gui/statusbar/OpModeStatus.h + gui/statusbar/ToasterDisable.h + gui/statusbar/SysTrayStatus.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/elnode.h + + gui/feeds/BoardsCommentsItem.h + gui/feeds/FeedItem.h + gui/feeds/FeedHolder.h + gui/feeds/GxsCircleItem.h + gui/feeds/ChannelsCommentsItem.h + gui/feeds/PeerItem.h + gui/feeds/MsgItem.h + gui/feeds/ChatMsgItem.h + gui/feeds/SubFileItem.h + gui/feeds/AttachFileItem.h + gui/feeds/SecurityItem.h + gui/feeds/SecurityIpItem.h + gui/feeds/NewsFeedUserNotify.h + + gui/connect/ConnectFriendWizard.h + gui/connect/ConnectProgressDialog.h + + gui/groups/CreateGroup.h + ) + +if(RS_JSONAPI) + list( + APPEND RS_SOURCES + gui/settings/JsonApiPage.cc + ) + + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/settings/JsonApiPage.h + ) + + list( + APPEND RS_FORMS + gui/settings/JsonApiPage.ui + ) +endif(RS_JSONAPI) + +if(RS_WEBUI) + list( + APPEND RS_SOURCES + gui/settings/WebuiPage.cpp + ) + + list( + APPEND RS_IMPLEMENTATION_HEADERS + jsonapi/p3webui.h + gui/settings/WebuiPage.h + ) + + list( + APPEND RS_FORMS + gui/settings/WebuiPage.ui + ) +endif(RS_WEBUI) + +list( + APPEND RS_QTRESOURCES + gui/images.qrc + gui/icons.qrc + lang/lang.qrc + gui/help/content/content.qrc + gui/emojione.qrc + gui/qss/stylesheet/qdarkstyle/dark/Standard_Dark.qrc + gui/qss/stylesheet/qdarkstyle/light/Standard_Light.qrc + ) + +list( + APPEND RS_TRANSLATIONS + lang/retroshare_ca_ES.ts + lang/retroshare_cs.ts + lang/retroshare_da.ts + lang/retroshare_de.ts + lang/retroshare_el.ts + lang/retroshare_en.ts + lang/retroshare_es.ts + lang/retroshare_fi.ts + lang/retroshare_fr.ts + lang/retroshare_hu.ts + lang/retroshare_it.ts + lang/retroshare_ja_JP.ts + lang/retroshare_nl.ts + lang/retroshare_ko.ts + lang/retroshare_pl.ts + lang/retroshare_ru.ts + lang/retroshare_sv.ts + lang/retroshare_tr.ts + lang/retroshare_zh_CN.ts + ) + +if(RS_UNFINISHED_TRANSLATIONS) + list( + APPEND RS_TRANSLATIONS + lang/retroshare_bg.ts + lang/retroshare_af.ts + lang/retroshare_pt.ts + lang/retroshare_sl.ts + lang/retroshare_sr.ts + lang/retroshare_zh_TW.ts + ) +endif(RS_UNFINISHED_TRANSLATIONS) + +if(RS_MESSENGER) + + target_compile_definitions( + ${PROJECT_NAME} PUBLIC MESSENGER_WINDOW + ) + + list( + APPEND RS_SOURCES + gui/MessengerWindow.cpp + gui/common/FriendList.cpp + ) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/MessengerWindow.h + gui/common/FriendList.h + ) + list( + APPEND RS_FORMS + gui/MessengerWindow.ui + gui/common/FriendList.ui + ) +endif(RS_MESSENGER) + +if(RS_IDLE) + list( + APPEND RS_IMPLEMENTATION_HEADERS + idle/idle.h + ) + list( + APPEND RS_SOURCES + idle/idle.cpp + idle/idle_platform.cpp + ) +endif(RS_IDLE) + +if(RS_FRAMECATCHER) + list( + APPEND RS_IMPLEMENTATION_HEADERS + util/framecatcher.h + ) + list( + APPEND RS_SOURCES + util/framecatcher.cpp + ) + + # TODO: LIBS += -lxine + + target_compile_definitions( + ${PROJECT_NAME} PUBLIC CHANNELS_FRAME_CATCHER + ) +endif(RS_FRAMECATCHER) + +# Embedded Friend Server + +if(RS_EFS) + target_compile_definitions( + ${PROJECT_NAME} PUBLIC RS_EMBEDED_FRIEND_SERVER + ) + list( + APPEND RS_SOURCES + gui/FriendServerControl.cpp + ) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/FriendServerControl.h + ) + list( + APPEND RS_FORMS + gui/FriendServerControl.ui + ) +endif(RS_EFS) + +# BELOW IS GXS Unfinished Services. + +if(RS_UNFINISHED) + + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/unfinished/ApplicationWindow.h + + # gui/unfinished/CalDialog.h + # gui/unfinished/ExampleDialog.h + # gui/unfinished/GamesDialog.h + # gui/unfinished/profile/ProfileView.h + # gui/unfinished/profile/ProfileEdit.h + # gui/unfinished/StatisticDialog.h + # gui/unfinished/PhotoDialog.h + # gui/unfinished/PhotoShow.h + ) + + list( + APPEND RS_FORMS + gui/unfinished/ApplicationWindow.ui + + # gui/unfinished/CalDialog.ui + # gui/unfinished/ExampleDialog.ui + # gui/unfinished/GamesDialog.ui + # gui/unfinished/profile/ProfileView.ui + # gui/unfinished/profile/ProfileEdit.ui + # gui/unfinished/StatisticDialog.ui + # gui/unfinished/PhotoDialog.ui + # gui/unfinished/PhotoShow.ui + ) + + list( + APPEND RS_SOURCES + gui/unfinished/ApplicationWindow.cpp + + # gui/unfinished/CalDialog.cpp + # gui/unfinished/ExampleDialog.cpp + # gui/unfinished/GamesDialog.cpp + # gui/unfinished/profile/ProfileView.cpp + # gui/unfinished/profile/ProfileEdit.cpp + # gui/unfinished/StatisticDialog.cpp + # gui/unfinished/PhotoDialog.cpp + # gui/unfinished/PhotoShow.cpp + ) + + target_compile_definitions( + ${PROJECT_NAME} PUBLIC UNFINISHED + ) +endif(RS_UNFINISHED) + +if(RS_GXSPHOTOSHARE) + target_compile_definitions( + ${PROJECT_NAME} PUBLIC RS_USE_PHOTO + ) + + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/PhotoShare/AlbumGroupDialog.h + gui/PhotoShare/AlbumExtra.h + gui/PhotoShare/PhotoDrop.h + gui/PhotoShare/AlbumItem.h + gui/PhotoShare/AlbumDialog.h + gui/PhotoShare/PhotoItem.h + gui/PhotoShare/PhotoShareItemHolder.h + gui/PhotoShare/PhotoShare.h + gui/PhotoShare/PhotoSlideShow.h + gui/PhotoShare/PhotoDialog.h + ) + list( + APPEND RS_FORMS + gui/PhotoShare/AlbumExtra.ui + gui/PhotoShare/PhotoItem.ui + gui/PhotoShare/PhotoDialog.ui + gui/PhotoShare/AlbumItem.ui + gui/PhotoShare/AlbumDialog.ui + gui/PhotoShare/PhotoShare.ui + gui/PhotoShare/PhotoSlideShow.ui + ) + + list( + APPEND RS_SOURCES + gui/PhotoShare/AlbumGroupDialog.cpp + gui/PhotoShare/AlbumExtra.cpp + gui/PhotoShare/PhotoItem.cpp + gui/PhotoShare/PhotoDialog.cpp + gui/PhotoShare/PhotoDrop.cpp + gui/PhotoShare/AlbumItem.cpp + gui/PhotoShare/AlbumDialog.cpp + gui/PhotoShare/PhotoShareItemHolder.cpp + gui/PhotoShare/PhotoShare.cpp + gui/PhotoShare/PhotoSlideShow.cpp + ) + + list( + APPEND RS_QTRESOURCES + gui/PhotoShare/Photo_images.qrc + ) +endif(RS_GXSPHOTOSHARE) + +if(RS_GXSWIKIPOS) + target_compile_definitions( + ${PROJECT_NAME} PUBLIC RS_USE_WIKI + ) + + target_include_directories(${PROJECT_NAME} PUBLIC ../../supportlibs/pegmarkdown) + + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/WikiPoos/WikiDialog.h + gui/WikiPoos/WikiAddDialog.h + gui/WikiPoos/WikiEditDialog.h + gui/gxs/WikiGroupDialog.h + gui/gxs/RsGxsUpdateBroadcastBase.h + gui/gxs/RsGxsUpdateBroadcastWidget.h + gui/gxs/RsGxsUpdateBroadcastPage.h + ) + + list( + APPEND RS_FORMS + gui/WikiPoos/WikiDialog.ui + gui/WikiPoos/WikiAddDialog.ui + gui/WikiPoos/WikiEditDialog.ui + ) + + list( + APPEND RS_SOURCES + gui/WikiPoos/WikiDialog.cpp + gui/WikiPoos/WikiAddDialog.cpp + gui/WikiPoos/WikiEditDialog.cpp + gui/gxs/WikiGroupDialog.cpp + gui/gxs/RsGxsUpdateBroadcastBase.cpp + gui/gxs/RsGxsUpdateBroadcastWidget.cpp + gui/gxs/RsGxsUpdateBroadcastPage.cpp + ) + + list( + APPEND RS_QTRESOURCES + gui/WikiPoos/Wiki_images.qrc + ) +endif(RS_GXSWIKIPOS) + +if(RS_GXSTHEWIRE) + target_compile_definitions( + ${PROJECT_NAME} PUBLIC RS_USE_WIRE + ) + + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/TheWire/WireDialog.h + gui/TheWire/WireGroupItem.h + gui/TheWire/WireGroupDialog.h + gui/TheWire/WireGroupExtra.h + gui/TheWire/PulseAddDialog.h + gui/TheWire/PulseViewItem.h + gui/TheWire/PulseTopLevel.h + gui/TheWire/PulseViewGroup.h + gui/TheWire/PulseReply.h + gui/TheWire/PulseReplySeperator.h + gui/TheWire/PulseMessage.h + ) + + list( + APPEND RS_FORMS + gui/TheWire/WireDialog.ui + gui/TheWire/WireGroupItem.ui + gui/TheWire/WireGroupExtra.ui + gui/TheWire/PulseAddDialog.ui + gui/TheWire/PulseTopLevel.ui + gui/TheWire/PulseViewGroup.ui + gui/TheWire/PulseReply.ui + gui/TheWire/PulseReplySeperator.ui + gui/TheWire/PulseMessage.ui + ) + + list( + APPEND RS_SOURCES + gui/TheWire/WireDialog.cpp + gui/TheWire/WireGroupItem.cpp + gui/TheWire/WireGroupDialog.cpp + gui/TheWire/WireGroupExtra.cpp + gui/TheWire/PulseAddDialog.cpp + gui/TheWire/PulseViewItem.cpp + gui/TheWire/PulseTopLevel.cpp + gui/TheWire/PulseViewGroup.cpp + gui/TheWire/PulseReply.cpp + gui/TheWire/PulseReplySeperator.cpp + gui/TheWire/PulseMessage.cpp + ) + + list( + APPEND RS_QTRESOURCES + RESOURCES += gui/TheWire/TheWire_images.qrc + ) +endif(RS_GXSTHEWIRE) + +if(RS_GXSIDENTITIES) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/Identity/IdDialog.h + gui/Identity/IdEditDialog.h + gui/Identity/IdDetailsDialog.h + ) + + list( + APPEND RS_FORMS + gui/Identity/IdDialog.ui + gui/Identity/IdEditDialog.ui + gui/Identity/IdDetailsDialog.ui + ) + + list( + APPEND RS_SOURCES + gui/Identity/IdDialog.cpp + gui/Identity/IdEditDialog.cpp + gui/Identity/IdDetailsDialog.cpp + ) +endif(RS_GXSIDENTITIES) + +if(RS_GXSCIRCLES) + target_compile_definitions( + ${PROJECT_NAME} PUBLIC RS_USE_CIRCLES + ) + + list( + gui/Circles/CirclesDialog.h + gui/Circles/CreateCircleDialog.h + gui/People/PeopleDialog.h + gui/People/CircleWidget.h + gui/People/IdentityWidget.h + ) + + list( + gui/Circles/CirclesDialog.ui + gui/Circles/CreateCircleDialog.ui + gui/People/PeopleDialog.ui + gui/People/CircleWidget.ui + gui/People/IdentityWidget.ui + ) + + list( + gui/Circles/CirclesDialog.cpp + gui/Circles/CreateCircleDialog.cpp + gui/People/PeopleDialog.cpp + gui/People/CircleWidget.cpp + gui/People/IdentityWidget.cpp + ) +endif(RS_GXSCIRCLES) + +if(RS_GXSGUI) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/gxs/GxsGroupDialog.h + gui/gxs/GxsIdDetails.h + gui/gxs/GxsIdChooser.h + gui/gxs/GxsIdLabel.h + gui/gxs/GxsCircleChooser.h + gui/gxs/GxsCircleLabel.h + gui/gxs/GxsIdTreeWidgetItem.h + gui/gxs/GxsCommentTreeWidget.h + gui/gxs/GxsCommentContainer.h + gui/gxs/GxsCommentDialog.h + gui/gxs/GxsCreateCommentDialog.h + gui/gxs/GxsGroupFrameDialog.h + gui/gxs/GxsMessageFrameWidget.h + gui/gxs/GxsMessageFramePostWidget.h + gui/gxs/GxsGroupFeedItem.h + gui/gxs/GxsFeedItem.h + gui/gxs/GxsGroupShareKey.h + gui/gxs/GxsUserNotify.h + gui/gxs/GxsFeedWidget.h + util/TokenQueue.h + util/RsGxsUpdateBroadcast.h + ) + + list( + APPEND RS_FORMS + gui/gxs/GxsGroupDialog.ui + gui/gxs/GxsCommentContainer.ui + gui/gxs/GxsCommentDialog.ui + gui/gxs/GxsCreateCommentDialog.ui + gui/gxs/GxsGroupFrameDialog.ui + gui/gxs/GxsGroupShareKey.ui + ) + + list( + APPEND RS_SOURCES + gui/gxs/GxsGroupDialog.cpp + gui/gxs/GxsIdDetails.cpp + gui/gxs/GxsIdChooser.cpp + gui/gxs/GxsIdLabel.cpp + gui/gxs/GxsCircleChooser.cpp + gui/gxs/GxsGroupShareKey.cpp + gui/gxs/GxsCircleLabel.cpp + gui/gxs/GxsIdTreeWidgetItem.cpp + gui/gxs/GxsCommentTreeWidget.cpp + gui/gxs/GxsCommentContainer.cpp + gui/gxs/GxsCommentDialog.cpp + gui/gxs/GxsCreateCommentDialog.cpp + gui/gxs/GxsGroupFrameDialog.cpp + gui/gxs/GxsMessageFrameWidget.cpp + gui/gxs/GxsMessageFramePostWidget.cpp + gui/gxs/GxsGroupFeedItem.cpp + gui/gxs/GxsFeedItem.cpp + gui/gxs/GxsUserNotify.cpp + gui/gxs/GxsFeedWidget.cpp + util/TokenQueue.cpp + util/RsGxsUpdateBroadcast.cpp + ) +endif(RS_GXSGUI) + +if(RS_GXSFORUMS) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/gxsforums/GxsForumsDialog.h + gui/gxsforums/GxsForumGroupDialog.h + gui/gxsforums/CreateGxsForumMsg.h + gui/gxsforums/GxsForumThreadWidget.h + gui/gxsforums/GxsForumModel.h + gui/gxsforums/GxsForumUserNotify.h + gui/feeds/GxsForumGroupItem.h + gui/feeds/GxsForumMsgItem.h + ) + + list( + APPEND RS_FORMS + ui/gxsforums/CreateGxsForumMsg.ui + gui/gxsforums/GxsForumThreadWidget.ui + gui/feeds/GxsForumGroupItem.ui + gui/feeds/GxsForumMsgItem.ui + ) + + list( + APPEND RS_SOURCES + gui/gxsforums/GxsForumsDialog.cpp + gui/gxsforums/GxsForumGroupDialog.cpp + gui/gxsforums/CreateGxsForumMsg.cpp + gui/gxsforums/GxsForumThreadWidget.cpp + gui/gxsforums/GxsForumModel.cpp + gui/gxsforums/GxsForumUserNotify.cpp + gui/feeds/GxsForumGroupItem.cpp + gui/feeds/GxsForumMsgItem.cpp + ) +endif(RS_GXSFORUMS) + + +if(RS_GXSCHANNELS) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/gxschannels/GxsChannelDialog.h + gui/gxschannels/GxsChannelGroupDialog.h + gui/gxschannels/CreateGxsChannelMsg.h + gui/gxschannels/GxsChannelPostsWidgetWithModel.h + gui/gxschannels/GxsChannelPostsModel.h + gui/gxschannels/GxsChannelPostFilesModel.h + gui/gxschannels/GxsChannelPostThumbnail.h + gui/gxschannels/GxsChannelFilesStatusWidget.h + gui/feeds/GxsChannelGroupItem.h + gui/feeds/GxsChannelPostItem.h + gui/gxschannels/GxsChannelUserNotify.h + ) + + list( + APPEND RS_FORMS + gui/gxschannels/GxsChannelPostsWidgetWithModel.ui + gui/gxschannels/GxsChannelFilesStatusWidget.ui + gui/gxschannels/CreateGxsChannelMsg.ui + gui/feeds/GxsChannelGroupItem.ui + gui/feeds/GxsChannelPostItem.ui + ) + + list( + APPEND RS_SOURCES + gui/gxschannels/GxsChannelDialog.cpp + gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp + gui/gxschannels/GxsChannelPostsModel.cpp + gui/gxschannels/GxsChannelPostFilesModel.cpp + gui/gxschannels/GxsChannelFilesStatusWidget.cpp + gui/gxschannels/GxsChannelPostThumbnail.cpp + gui/gxschannels/GxsChannelGroupDialog.cpp + gui/gxschannels/CreateGxsChannelMsg.cpp + gui/feeds/GxsChannelGroupItem.cpp + gui/feeds/GxsChannelPostItem.cpp + gui/gxschannels/GxsChannelUserNotify.cpp + ) +endif(RS_GXSCHANNELS) + +if(RS_GXSPOSTED) + list( + APPEND RS_IMPLEMENTATION_HEADERS + gui/Posted/PostedDialog.h + gui/Posted/PostedListWidgetWithModel.h + gui/Posted/PostedPostsModel.h + gui/Posted/BoardPostDisplayWidget.h + gui/Posted/PostedItem.h + gui/Posted/PostedCardView.h + gui/Posted/PostedGroupDialog.h + gui/feeds/PostedGroupItem.h + gui/Posted/PostedCreatePostDialog.h + gui/Posted/PhotoView.h + gui/Posted/PostedUserNotify.h + ) + + list( + APPEND RS_FORMS + gui/Posted/PostedListWidgetWithModel.ui + gui/feeds/PostedGroupItem.ui + gui/Posted/BoardPostDisplayWidget_compact.ui + gui/Posted/BoardPostDisplayWidget_card.ui + gui/Posted/PostedItem.ui + gui/Posted/PostedCardView.ui + gui/Posted/PostedCreatePostDialog.ui + gui/Posted/PhotoView.ui + ) + + list( + APPEND RS_SOURCES + gui/Posted/PostedDialog.cpp + gui/Posted/PostedListWidgetWithModel.cpp + gui/Posted/BoardPostDisplayWidget.cpp + gui/Posted/PostedPostsModel.cpp + gui/feeds/PostedGroupItem.cpp + gui/Posted/PostedItem.cpp + gui/Posted/PostedCardView.cpp + gui/Posted/PostedGroupDialog.cpp + gui/Posted/PostedCreatePostDialog.cpp + gui/Posted/PhotoView.cpp + gui/Posted/PostedUserNotify.cpp + ) + + list( + APPEND RS_QTRESOURCES + gui/Posted/Posted_images.qrc + ) +endif(RS_GXSPOSTED) + + + From 40336c23374f26784d09666851bf2125e0ecc0bb Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 25 Mar 2022 18:39:14 +0100 Subject: [PATCH 02/10] added root cmake file in retroshare-gui --- retroshare-gui/CMakeLists.txt | 470 ++++++++++++++++++++++++++++++++++ 1 file changed, 470 insertions(+) create mode 100644 retroshare-gui/CMakeLists.txt diff --git a/retroshare-gui/CMakeLists.txt b/retroshare-gui/CMakeLists.txt new file mode 100644 index 000000000..57721d9f8 --- /dev/null +++ b/retroshare-gui/CMakeLists.txt @@ -0,0 +1,470 @@ +################################################################################ +# retroshare-gui/CMakeLists.txt # +# Copyright (C) 2022, Retroshare team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see . # +################################################################################ + +cmake_minimum_required (VERSION 3.18.0) +project(retroshare-gui VERSION 0.6.6 LANGUAGES CXX) + +include(CMakeDependentOption) + +set( + RS_BIN_INSTALL_DIR + "${CMAKE_INSTALL_PREFIX}/bin" + CACHE PATH + "Path where to install retroshare-service compiled binary" ) + +option( + RS_DEVELOPMENT_BUILD + "Disable optimization to speed up build, enable verbose build log. \ + just for development purposes, not suitable for library usage" + OFF ) + +option( + RS_JSON_API + "Use restbed to expose libretroshare as JSON API via HTTP" + ON ) + +option( + RS_SERVICE_DESKTOP + "Install icons and shortcuts for desktop environements" + OFF ) + +option( + RS_SERVICE_TERMINAL_LOGIN + "Enable RetroShare login via terminal" + ON ) + +cmake_dependent_option( + RS_SERVICE_TERMINAL_WEBUI_PASSWORD + "Enable settin Web UI password via terminal in retroshare-service" + OFF + "RS_WEBUI" + ON ) + +cmake_dependent_option( + RS_WEBUI + "Install RetroShare Web UI" + OFF + "RS_JSON_API" + ON ) + +################################################################################ + +set(FETCHCONTENT_QUIET OFF) +include(FetchContent) + +find_package(Git REQUIRED) + +################################################################################ + +if(RS_DEVELOPMENT_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +endif(RS_DEVELOPMENT_BUILD) + +################################################################################ + +include(src/CMakeLists.txt) + +add_executable(${PROJECT_NAME} ${RS_SERVICE_SOURCES}) + +install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) + +################################################################################ + +if(RS_DEVELOPMENT_BUILD) + target_compile_options(${PROJECT_NAME} PRIVATE "-O0") +endif(RS_DEVELOPMENT_BUILD) + +################################################################################ + +set(RETROSHAREGUI_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../retroshare-gui/") +if(EXISTS "${RETROSHAREGUI_DEVEL_DIR}/.git" ) + message( + STATUS + "retroshare-gui submodule found at ${RETROSHAREGUI_DEVEL_DIR} using it" ) + add_subdirectory( + "${RETROSHAREGUI_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/retroshare-gui" ) +else() + FetchContent_Declare( + retroshare-gui + GIT_REPOSITORY "https://gitlab.com/RetroShare/retroshare.git" + GIT_TAG "origin/master" + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + TIMEOUT 10 + ) + FetchContent_MakeAvailable(retroshare-gui) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE retroshare) + +################################################################################ + +if(RS_SERVICE_DESKTOP) + if(UNIX AND NOT APPLE) + install( + FILES data/retroshare.svg + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/ ) + + install( + FILES data/retroshare.xpm + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps/ ) + + install( + FILES data/24x24/apps/retroshare.png + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/24x24/apps/retroshare.png ) + + install( + FILES data/48x48/apps/retroshare.png + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps/retroshare.png ) + + install( + FILES data/64x64/apps/retroshare.png + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps/retroshare.png ) + + install( + FILES data/128x128/apps/retroshare.png + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps/retroshare.png ) + + install( + FILES data/retroshare.desktop + DESTINATION ${CMAKE_INSTALL_PREFIX}/data/retroshare.desktop ) + + install( + FILES gui/qss/chat/Bubble gui/qss/chat/Bubble_Compact + DESTINATION ${CMAKE_INSTALL_PREFIX}/data/stylesheets/ ) + + install( + FILES src/sounds/ src/qss/ + DESTINATION ${CMAKE_INSTALL_PREFIX}/ ) + endif(UNIX AND NOT APPLE) +endif(RS_SERVICE_DESKTOP) + +################################################################################ + +if(RS_JSON_API) + target_compile_definitions(${PROJECT_NAME} PUBLIC RS_JSONAPI) +endif(RS_JSON_API) + +################################################################################ + +################################################################################ +# TODO # +################################################################################ + +if(RS_GUI_CMARK) + set(CMARK_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../supportlibs/cmark/") + if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) + message( STATUS "cmark submodule found at ${LIBRETROSHARE_DEVEL_DIR} using it" ) + add_subdirectory( "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" ) + else() + FetchContent_Declare( + cmark + GIT_REPOSITORY "https://github.com/commonmark/cmark.git" + GIT_TAG "origin/master" + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + TIMEOUT 10 + ) + FetchContent_MakeAvailable(cmark) + endif() +endif(RS_GUI_CMARK) + + +# # Auto detect installed version of cmark +# rs_gui_cmark { +# DEFINES *= USE_CMARK +# no_rs_cross_compiling { +# message("Using compiled cmark") +# CMARK_SRC_PATH=$$clean_path($${RS_SRC_PATH}/supportlibs/cmark) +# CMARK_BUILD_PATH=$$clean_path($${RS_BUILD_PATH}/supportlibs/cmark/build) +# INCLUDEPATH *= $$clean_path($${CMARK_SRC_PATH}/src/) +# DEPENDPATH *= $$clean_path($${CMARK_SRC_PATH}/src/) +# QMAKE_LIBDIR *= $$clean_path($${CMARK_BUILD_PATH}/) +# # Using sLibs would fail as libcmark.a is generated at compile-time +# LIBS *= -L$$clean_path($${CMARK_BUILD_PATH}/src/) -lcmark +# +# DUMMYCMARKINPUT = FORCE +# CMAKE_GENERATOR_OVERRIDE="" +# win32-g++|win32-clang-g++:CMAKE_GENERATOR_OVERRIDE="-G \"MSYS Makefiles\"" +# gencmarklib.name = Generating libcmark. +# gencmarklib.input = DUMMYCMARKINPUT +# gencmarklib.output = $$clean_path($${CMARK_BUILD_PATH}/src/libcmark.a) +# gencmarklib.CONFIG += target_predeps combine +# gencmarklib.variable_out = PRE_TARGETDEPS +# gencmarklib.commands = \ +# cd $${RS_SRC_PATH} && ( \ +# git submodule update --init supportlibs/cmark ; \ +# cd $${CMARK_SRC_PATH} ; \ +# true ) && \ +# mkdir -p $${CMARK_BUILD_PATH} && cd $${CMARK_BUILD_PATH} && \ +# cmake \ +# -DCMAKE_CXX_COMPILER=$$QMAKE_CXX \ +# \"-DCMAKE_CXX_FLAGS=$${QMAKE_CXXFLAGS}\" \ +# $${CMAKE_GENERATOR_OVERRIDE} \ +# -DCMAKE_INSTALL_PREFIX=. \ +# -B. \ +# -H$$shell_path($${CMARK_SRC_PATH}) && \ +# $(MAKE) +# QMAKE_EXTRA_COMPILERS += gencmarklib +# } else { +# message("Using systems cmark") +# sLibs *= libcmark +# } +# } + +################################# Linux ########################################## +# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib + +if(UNIX) + find_package(PkgConfig REQUIRED) + + pkg_check_modules(X11 REQUIRED x11) + pkg_check_modules(XSCRNSAVER REQUIRED xscrnsaver) + + target_link_libraries(${PROJECT_NAME} PRIVATE ${X11_LIBRARIES}) + target_include_directories(${PROJECT_NAME} PRIVATE ${X11_INCLUDE_DIRS}) + target_compile_options(${PROJECT_NAME} PRIVATE ${X11_CFLAGS_OTHER}) + + target_link_libraries(${PROJECT_NAME} ${XSCRNSAVER_LIBRARIES}) + target_include_directories(retroshare-gui PRIVATE ${XSCRNSAVER_INCLUDE_DIRS}) + target_compile_options(retroshare-gui PRIVATE ${XSCRNSAVER_CFLAGS_OTHER}) + + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_XSS) + target_compile_definitions(${PROJECT_NAME} PRIVATE _FILE_OFFSET_BITS=64) + target_link_options(${PROJECT_NAME} PRIVATE LINKER:-rdynamic) +endif(UNIX) + +if(RS_SANITIZE) + target_link_libraries(${PROJECT_NAME} asan) + target_link_libraries(${PROJECT_NAME} ubsan) +endif(RS_SANITIZE) + +# #################### Cross compilation for windows under Linux ################### +# +# win32-x-g++ { +# OBJECTS_DIR = temp/win32-x-g++/obj +# +# 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-g++|win32-clang-g++ { +# CONFIG(debug, debug|release) { +# # show console output +# CONFIG += console +# } else { +# CONFIG -= console +# } +# +# CONFIG(debug, debug|release) { +# } else { +# # Tell linker to use ASLR protection +# QMAKE_LFLAGS += -Wl,-dynamicbase +# # Tell linker to use DEP protection +# QMAKE_LFLAGS += -Wl,-nxcompat +# } +# +# # Fix linking error (ld.exe: Error: export ordinal too large) due to too +# # many exported symbols. +# !libretroshare_shared:QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL +# +# # Switch off optimization for release version +# QMAKE_CXXFLAGS_RELEASE -= -O2 +# QMAKE_CXXFLAGS_RELEASE += -O0 +# QMAKE_CFLAGS_RELEASE -= -O2 +# QMAKE_CFLAGS_RELEASE += -O0 +# +# # Switch on optimization for debug version +# #QMAKE_CXXFLAGS_DEBUG += -O2 +# #QMAKE_CFLAGS_DEBUG += -O2 +# +# OBJECTS_DIR = temp/obj +# +# dLib = ws2_32 gdi32 uuid ole32 iphlpapi crypt32 winmm +# LIBS *= $$linkDynamicLibs(dLib) +# +# RC_FILE = gui/images/retroshare_win.rc +# +# # export symbols for the plugins +# LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a +# +# # create lib directory +# isEmpty(QMAKE_SH) { +# QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib $(MKDIR) lib +# } else { +# QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib || $(MKDIR) lib +# } +# +# greaterThan(QT_MAJOR_VERSION, 4) { +# # Qt 5 +# RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src +# } else { +# # Qt 4 +# QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src +# } +# } +# +# ##################################### MacOS ###################################### +# +# macx { +# # ENABLE THIS OPTION FOR Univeral Binary BUILD. +# #CONFIG += ppc x86 +# #QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 +# QMAKE_INFO_PLIST = Info.plist +# mac_icon.files = $$files($$PWD/rsMacIcon.icns) +# mac_icon.path = Contents/Resources +# QMAKE_BUNDLE_DATA += mac_icon +# dplQSS.files = $$PWD/qss +# dplQSS.path = Contents/Resources +# QMAKE_BUNDLE_DATA += dplQSS +# dplChatStyles.files = \ +# $$PWD/gui/qss/chat/Bubble \ +# $$PWD/gui/qss/chat/Bubble_Compact +# dplChatStyles.path = Contents/Resources/stylesheets +# QMAKE_BUNDLE_DATA += dplChatStyles +# # mac_webui.files = $$files($$PWD/../../libresapi/src/webui) +# # mac_webui.path = Contents/Resources +# # QMAKE_BUNDLE_DATA += mac_webui +# +# OBJECTS_DIR = temp/obj +# +# CONFIG += version_detail_bash_script +# LIBS += -lssl -lcrypto -lz +# for(lib, LIB_DIR):exists($$lib/libminiupnpc.a){ LIBS += $$lib/libminiupnpc.a} +# LIBS += -framework CoreFoundation +# LIBS += -framework Security +# LIBS += -framework Carbon +# +# for(lib, LIB_DIR):LIBS += -L"$$lib" +# for(bin, BIN_DIR):LIBS += -L"$$bin" +# +# DEPENDPATH += . $$INC_DIR +# INCLUDEPATH += . $$INC_DIR +# +# #DEFINES *= MAC_IDLE # for idle feature +# CONFIG -= uitools +# } +# +# ##################################### FreeBSD ###################################### +# +# freebsd-* { +# INCLUDEPATH *= /usr/local/include/gpgme +# LIBS *= -lssl +# LIBS *= -lgpgme +# LIBS *= -lupnp +# LIBS *= -lgnome-keyring +# +# LIBS += -lsqlite3 +# } +# +# ##################################### Haiku ###################################### +# +# haiku-* { +# PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a +# PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a +# +# LIBS *= ../../libretroshare/src/lib/libretroshare.a +# LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 -lbsd +# LIBS *= -lssl -lcrypto -lnetwork +# LIBS *= -lgpgme +# LIBS *= -lupnp +# LIBS *= -lz +# LIBS *= -lixml +# +# LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a +# LIBS += -lsqlite3 +# } +# +# ##################################### OpenBSD ###################################### +# +# openbsd-* { +# INCLUDEPATH *= /usr/local/include +# +# LIBS *= -lssl -lcrypto +# LIBS *= -lgpgme +# LIBS *= -lupnp +# LIBS *= -lgnome-keyring +# LIBS += -lsqlite3 +# LIBS *= -rdynamic +# } +# +# ################################### COMMON stuff ################################## +# +# wikipoos { +# PRE_TARGETDEPS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a +# LIBS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a +# LIBS *= -lglib-2.0 +# } + +set(LIBRETROSHARE_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libretroshare/") +if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) + message( + STATUS + "libretroshare submodule found at ${LIBRETROSHARE_DEVEL_DIR} using it" ) + add_subdirectory( + "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" ) +else() + FetchContent_Declare( + libretroshare + GIT_REPOSITORY "https://gitlab.com/RetroShare/libretroshare.git" + GIT_TAG "origin/master" + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + TIMEOUT 10 + ) + FetchContent_MakeAvailable(libretroshare) +endif() + +################################ QT FILES ####################################### + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +find_package( Qt5 COMPONENTS Widgets REQUIRED) + +target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets) + +################################ GENERAL ####################################### + +target_link_libraries(${PROJECT_NAME} PRIVATE retroshare) +add_dependencies(${PROJECT_NAME} libretroshare) + +add_executable(${PROJECT_NAME} ${RS_SOURCES} ${RS_FORMS} ${RS_QTRESOURCES}) + +install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) From bf1b3ed69a938049f434aac9fdfd3915f62b44ea Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 25 Mar 2022 22:05:28 +0100 Subject: [PATCH 03/10] fixed some bugs --- retroshare-gui/CMakeLists.txt | 53 +++++++++++------------------------ 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/retroshare-gui/CMakeLists.txt b/retroshare-gui/CMakeLists.txt index 57721d9f8..19e7690c9 100644 --- a/retroshare-gui/CMakeLists.txt +++ b/retroshare-gui/CMakeLists.txt @@ -80,7 +80,7 @@ endif(RS_DEVELOPMENT_BUILD) include(src/CMakeLists.txt) -add_executable(${PROJECT_NAME} ${RS_SERVICE_SOURCES}) +add_executable(${PROJECT_NAME} ${RS_SOURCES} ${RS_FORMS} ${RS_QTRESOURCES}) install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) @@ -92,27 +92,25 @@ endif(RS_DEVELOPMENT_BUILD) ################################################################################ -set(RETROSHAREGUI_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../retroshare-gui/") -if(EXISTS "${RETROSHAREGUI_DEVEL_DIR}/.git" ) +set(LIBRETROSHARE_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libretroshare/") +if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) message( STATUS - "retroshare-gui submodule found at ${RETROSHAREGUI_DEVEL_DIR} using it" ) + "libretroshare submodule found at ${LIBRETROSHARE_DEVEL_DIR} using it" ) add_subdirectory( - "${RETROSHAREGUI_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/retroshare-gui" ) + "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" ) else() FetchContent_Declare( - retroshare-gui - GIT_REPOSITORY "https://gitlab.com/RetroShare/retroshare.git" + libretroshare + GIT_REPOSITORY "https://gitlab.com/RetroShare/libretroshare.git" GIT_TAG "origin/master" GIT_SHALLOW TRUE GIT_PROGRESS TRUE TIMEOUT 10 ) - FetchContent_MakeAvailable(retroshare-gui) + FetchContent_MakeAvailable(libretroshare) endif() -target_link_libraries(${PROJECT_NAME} PRIVATE retroshare) - ################################################################################ if(RS_SERVICE_DESKTOP) @@ -237,11 +235,12 @@ if(UNIX) pkg_check_modules(X11 REQUIRED x11) pkg_check_modules(XSCRNSAVER REQUIRED xscrnsaver) - target_link_libraries(${PROJECT_NAME} PRIVATE ${X11_LIBRARIES}) + list( APPEND RS_LINK_LIBRARIES ${X11_LIBRARIES} ) + list( APPEND RS_LINK_LIBRARIES ${XSCRNSAVER_LIBRARIES} ) + target_include_directories(${PROJECT_NAME} PRIVATE ${X11_INCLUDE_DIRS}) target_compile_options(${PROJECT_NAME} PRIVATE ${X11_CFLAGS_OTHER}) - target_link_libraries(${PROJECT_NAME} ${XSCRNSAVER_LIBRARIES}) target_include_directories(retroshare-gui PRIVATE ${XSCRNSAVER_INCLUDE_DIRS}) target_compile_options(retroshare-gui PRIVATE ${XSCRNSAVER_CFLAGS_OTHER}) @@ -251,8 +250,8 @@ if(UNIX) endif(UNIX) if(RS_SANITIZE) - target_link_libraries(${PROJECT_NAME} asan) - target_link_libraries(${PROJECT_NAME} ubsan) + list( APPEND RS_LINK_LIBRARIES asan ) + list( APPEND RS_LINK_LIBRARIES ubsan ) endif(RS_SANITIZE) # #################### Cross compilation for windows under Linux ################### @@ -428,25 +427,6 @@ endif(RS_SANITIZE) # LIBS *= -lglib-2.0 # } -set(LIBRETROSHARE_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libretroshare/") -if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) - message( - STATUS - "libretroshare submodule found at ${LIBRETROSHARE_DEVEL_DIR} using it" ) - add_subdirectory( - "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" ) -else() - FetchContent_Declare( - libretroshare - GIT_REPOSITORY "https://gitlab.com/RetroShare/libretroshare.git" - GIT_TAG "origin/master" - GIT_SHALLOW TRUE - GIT_PROGRESS TRUE - TIMEOUT 10 - ) - FetchContent_MakeAvailable(libretroshare) -endif() - ################################ QT FILES ####################################### set(CMAKE_CXX_STANDARD 11) @@ -458,13 +438,12 @@ set(CMAKE_AUTOUIC ON) find_package( Qt5 COMPONENTS Widgets REQUIRED) -target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets) +list( APPEND RS_LINK_LIBRARIES Qt5::Widget ) ################################ GENERAL ####################################### -target_link_libraries(${PROJECT_NAME} PRIVATE retroshare) +target_link_libraries(${PROJECT_NAME} PRIVATE ${RS_LINK_LIBRARIES}) + add_dependencies(${PROJECT_NAME} libretroshare) -add_executable(${PROJECT_NAME} ${RS_SOURCES} ${RS_FORMS} ${RS_QTRESOURCES}) - install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) From a0ac041582196fe1c2fc2ff2d30649c7ba2783c4 Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 25 Mar 2022 23:35:12 +0100 Subject: [PATCH 04/10] fixed compilatin --- retroshare-gui/CMakeLists.txt | 52 +- retroshare-gui/src/CMakeLists.txt | 1843 ++++++++--------- .../src/gui/statistics/BandwidthStatsWidget.h | 2 + 3 files changed, 953 insertions(+), 944 deletions(-) diff --git a/retroshare-gui/CMakeLists.txt b/retroshare-gui/CMakeLists.txt index 19e7690c9..0a44cfa82 100644 --- a/retroshare-gui/CMakeLists.txt +++ b/retroshare-gui/CMakeLists.txt @@ -62,6 +62,22 @@ cmake_dependent_option( "RS_JSON_API" ON ) +################################ QT FILES ####################################### + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +find_package( Qt5 COMPONENTS Widgets REQUIRED) +find_package( Qt5 COMPONENTS Xml REQUIRED) +find_package( Qt5 COMPONENTS Network REQUIRED) +find_package( Qt5 COMPONENTS PrintSupport REQUIRED) + +list( APPEND RS_LINK_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Network Qt5::PrintSupport) + ################################################################################ set(FETCHCONTENT_QUIET OFF) @@ -80,8 +96,7 @@ endif(RS_DEVELOPMENT_BUILD) include(src/CMakeLists.txt) -add_executable(${PROJECT_NAME} ${RS_SOURCES} ${RS_FORMS} ${RS_QTRESOURCES}) - +add_executable(${PROJECT_NAME} ${RS_GUI_SOURCES} ${RS_GUI_FORMS} ${RS_GUI_QTRESOURCES}) install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) ################################################################################ @@ -111,6 +126,8 @@ else() FetchContent_MakeAvailable(libretroshare) endif() +target_include_directories(${PROJECT_NAME} PRIVATE ${LIBRETROSHARE_DEVEL_DIR}/src/) + ################################################################################ if(RS_SERVICE_DESKTOP) @@ -161,10 +178,6 @@ endif(RS_JSON_API) ################################################################################ -################################################################################ -# TODO # -################################################################################ - if(RS_GUI_CMARK) set(CMARK_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../supportlibs/cmark/") if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) @@ -184,6 +197,10 @@ if(RS_GUI_CMARK) endif(RS_GUI_CMARK) +################################################################################ +# TODO # +################################################################################ + # # Auto detect installed version of cmark # rs_gui_cmark { # DEFINES *= USE_CMARK @@ -427,23 +444,16 @@ endif(RS_SANITIZE) # LIBS *= -lglib-2.0 # } -################################ QT FILES ####################################### - -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -find_package( Qt5 COMPONENTS Widgets REQUIRED) - -list( APPEND RS_LINK_LIBRARIES Qt5::Widget ) - ################################ GENERAL ####################################### target_link_libraries(${PROJECT_NAME} PRIVATE ${RS_LINK_LIBRARIES}) -add_dependencies(${PROJECT_NAME} libretroshare) +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/) + +set( CMAKE_CXX_FLAGS "-Wno-deprecated-declarations" ) +target_compile_definitions(${PROJECT_NAME} PUBLIC RS_NO_WARN_DEPRECATED ) + + + +#add_dependencies(${PROJECT_NAME} libretroshare) -install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) diff --git a/retroshare-gui/src/CMakeLists.txt b/retroshare-gui/src/CMakeLists.txt index 871175869..540363ea2 100644 --- a/retroshare-gui/src/CMakeLists.txt +++ b/retroshare-gui/src/CMakeLists.txt @@ -17,765 +17,762 @@ ################################################################################ list( - APPEND RS_SOURCES - TorControl/TorControlWindow.cpp + APPEND RS_GUI_SOURCES + src/TorControl/TorControlWindow.cpp - main.cpp - rshare.cpp + src/main.cpp + src/rshare.cpp - gui/notifyqt.cpp - gui/AboutDialog.cpp - gui/AboutWidget.cpp - gui/QuickStartWizard.cpp - gui/StartDialog.cpp - gui/HomePage.cpp - gui/PluginsPage.cpp - gui/PluginManagerWidget.cpp - gui/PluginManager.cpp - gui/ChatLobbyWidget.cpp - gui/GetStartedDialog.cpp - gui/GenCertDialog.cpp - gui/NetworkDialog.cpp - gui/mainpagestack.cpp - gui/MainWindow.cpp - gui/NetworkView.cpp - gui/FriendsDialog.cpp - gui/ServicePermissionDialog.cpp - gui/RemoteDirModel.cpp - gui/RsAutoUpdatePage.cpp - gui/RetroShareLink.cpp - gui/SearchTreeWidget.cpp - gui/ShareManager.cpp - gui/ShareDialog.cpp - gui/NewsFeed.cpp - gui/SFListDelegate.cpp - gui/MainPage.cpp - gui/HelpDialog.cpp - gui/LogoBar.cpp - gui/SoundManager.cpp + src/gui/notifyqt.cpp + src/gui/AboutDialog.cpp + src/gui/AboutWidget.cpp + src/gui/QuickStartWizard.cpp + src/gui/StartDialog.cpp + src/gui/HomePage.cpp + src/gui/PluginsPage.cpp + src/gui/PluginManagerWidget.cpp + src/gui/PluginManager.cpp + src/gui/ChatLobbyWidget.cpp + src/gui/GetStartedDialog.cpp + src/gui/GenCertDialog.cpp + src/gui/NetworkDialog.cpp + src/gui/mainpagestack.cpp + src/gui/MainWindow.cpp + src/gui/NetworkView.cpp + src/gui/FriendsDialog.cpp + src/gui/ServicePermissionDialog.cpp + src/gui/RemoteDirModel.cpp + src/gui/RsAutoUpdatePage.cpp + src/gui/RetroShareLink.cpp + src/gui/SearchTreeWidget.cpp + src/gui/ShareManager.cpp + # src/gui/ShareDialog.cpp + src/gui/NewsFeed.cpp + src/gui/MainPage.cpp + src/gui/HelpDialog.cpp + src/gui/LogoBar.cpp + src/gui/SoundManager.cpp - gui/im_history/ImHistoryBrowser.cpp - gui/im_history/IMHistoryItemDelegate.cpp - gui/im_history/IMHistoryItemPainter.cpp + src/gui/im_history/ImHistoryBrowser.cpp + src/gui/im_history/IMHistoryItemDelegate.cpp + src/gui/im_history/IMHistoryItemPainter.cpp - gui/help/browser/helpbrowser.cpp - gui/help/browser/helptextbrowser.cpp + src/gui/help/browser/helpbrowser.cpp + src/gui/help/browser/helptextbrowser.cpp - gui/FileTransfer/SearchDialog.cpp - gui/FileTransfer/SharedFilesDialog.cpp - gui/FileTransfer/TransfersDialog.cpp - gui/FileTransfer/FileTransferInfoWidget.cpp - gui/FileTransfer/DLListDelegate.cpp - gui/FileTransfer/ULListDelegate.cpp - gui/FileTransfer/xprogressbar.cpp - gui/FileTransfer/DetailsDialog.cpp - gui/FileTransfer/TransferUserNotify.cpp - gui/FileTransfer/BannedFilesDialog.cpp + src/gui/FileTransfer/SearchDialog.cpp + src/gui/FileTransfer/SharedFilesDialog.cpp + src/gui/FileTransfer/TransfersDialog.cpp + src/gui/FileTransfer/FileTransferInfoWidget.cpp + src/gui/FileTransfer/DLListDelegate.cpp + src/gui/FileTransfer/ULListDelegate.cpp + src/gui/FileTransfer/xprogressbar.cpp + src/gui/FileTransfer/DetailsDialog.cpp + src/gui/FileTransfer/TransferUserNotify.cpp + src/gui/FileTransfer/BannedFilesDialog.cpp - lang/languagesupport.cpp + src/lang/languagesupport.cpp - util/RsProtectedTimer.cpp - util/stringutil.cpp - util/RsNetUtil.cpp - util/DateTime.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/printpreview.cpp - util/log.cpp - util/misc.cpp - util/HandleRichText.cpp - util/ObjectPainter.cpp - util/RsFile.cpp - util/RichTextEdit.cpp - util/ClickableLabel.cpp - util/AspectRatioPixmapLabel.cpp + src/util/RsProtectedTimer.cpp + src/util/stringutil.cpp + src/util/RsNetUtil.cpp + src/util/DateTime.cpp + src/util/RetroStyleLabel.cpp + src/util/WidgetBackgroundImage.cpp + src/util/PixmapMerging.cpp + src/util/MouseEventFilter.cpp + src/util/EventFilter.cpp + src/util/Widget.cpp + src/util/RsAction.cpp + src/util/printpreview.cpp + src/util/log.cpp + src/util/misc.cpp + src/util/HandleRichText.cpp + src/util/ObjectPainter.cpp + src/util/RsFile.cpp + src/util/RichTextEdit.cpp + src/util/ClickableLabel.cpp + src/util/AspectRatioPixmapLabel.cpp - gui/profile/ProfileWidget.cpp - gui/profile/StatusMessage.cpp - gui/profile/ProfileManager.cpp + src/gui/profile/ProfileWidget.cpp + src/gui/profile/StatusMessage.cpp + src/gui/profile/ProfileManager.cpp - gui/chat/PopupChatWindow.cpp - gui/chat/PopupChatDialog.cpp - gui/chat/PopupDistantChatDialog.cpp - gui/chat/ChatTabWidget.cpp - gui/chat/ChatWidget.cpp - gui/chat/ChatDialog.cpp - gui/chat/ChatLobbyDialog.cpp - gui/chat/CreateLobbyDialog.cpp - gui/chat/ChatStyle.cpp - gui/chat/ChatUserNotify.cpp - gui/chat/ChatLobbyUserNotify.cpp + src/gui/chat/PopupChatWindow.cpp + src/gui/chat/PopupChatDialog.cpp + src/gui/chat/PopupDistantChatDialog.cpp + src/gui/chat/ChatTabWidget.cpp + src/gui/chat/ChatWidget.cpp + src/gui/chat/ChatDialog.cpp + src/gui/chat/ChatLobbyDialog.cpp + src/gui/chat/CreateLobbyDialog.cpp + src/gui/chat/ChatStyle.cpp + src/gui/chat/ChatUserNotify.cpp + src/gui/chat/ChatLobbyUserNotify.cpp - gui/connect/ConfCertDialog.cpp - gui/connect/PGPKeyDialog.cpp - gui/connect/ConnectFriendWizard.cpp - gui/connect/ConnectProgressDialog.cpp - gui/connect/FriendRecommendDialog.cpp + src/gui/connect/ConfCertDialog.cpp + src/gui/connect/PGPKeyDialog.cpp + src/gui/connect/ConnectFriendWizard.cpp + src/gui/connect/ConnectProgressDialog.cpp + src/gui/connect/FriendRecommendDialog.cpp - gui/msgs/MessagesDialog.cpp - gui/msgs/MessageComposer.cpp - gui/msgs/MessageWidget.cpp - gui/msgs/MessageWindow.cpp - gui/msgs/MessageModel.cpp - gui/msgs/TagsMenu.cpp - gui/msgs/MessageUserNotify.cpp + src/gui/msgs/MessagesDialog.cpp + src/gui/msgs/MessageComposer.cpp + src/gui/msgs/MessageWidget.cpp + src/gui/msgs/MessageWindow.cpp + src/gui/msgs/MessageModel.cpp + src/gui/msgs/TagsMenu.cpp + src/gui/msgs/MessageUserNotify.cpp - gui/common/RsButtonOnText.cpp - gui/common/RSGraphWidget.cpp - gui/common/ElidedLabel.cpp - gui/common/vmessagebox.cpp - gui/common/RsCollectionDialog.cpp - gui/common/RsCollection.cpp - gui/common/RsUrlHandler.cpp - gui/common/rwindow.cpp - gui/common/rshtml.cpp - gui/common/AvatarDefs.cpp - gui/common/AvatarDialog.cpp - gui/common/GroupFlagsWidget.cpp - gui/common/GroupSelectionBox.cpp - gui/common/GroupChooser.cpp - gui/common/StatusDefs.cpp - gui/common/TagDefs.cpp - gui/common/GroupDefs.cpp - gui/common/Emoticons.cpp - gui/common/RSComboBox.cpp - gui/common/RSListWidgetItem.cpp - gui/common/RSTextEdit.cpp - gui/common/RSPlainTextEdit.cpp - gui/common/RSTreeWidget.cpp - gui/common/RSTreeWidgetItem.cpp - gui/common/RSFeedWidget.cpp - gui/common/RSTabWidget.cpp - gui/common/RSElidedItemDelegate.cpp - gui/common/RSItemDelegate.cpp - gui/common/PeerDefs.cpp - gui/common/FilesDefs.cpp - gui/common/PopularityDefs.cpp - gui/common/RsBanListDefs.cpp - gui/common/GroupTreeWidget.cpp - gui/common/RSTreeView.cpp - gui/common/AvatarWidget.cpp - gui/common/FriendListModel.cpp - gui/common/NewFriendList.cpp - gui/common/FriendSelectionWidget.cpp - gui/common/FriendSelectionDialog.cpp - gui/common/HashBox.cpp - gui/common/LineEditClear.cpp - gui/common/DropLineEdit.cpp - gui/common/RSTextBrowser.cpp - gui/common/RSImageBlockWidget.cpp - gui/common/FeedNotify.cpp - gui/common/UserNotify.cpp - gui/common/HeaderFrame.cpp - gui/common/MimeTextEdit.cpp - gui/common/UIStateHelper.cpp - gui/common/FloatingHelpBrowser.cpp - gui/common/SubscribeToolButton.cpp - gui/common/RsBanListToolButton.cpp - gui/common/FlowLayout.cpp - gui/common/PictureFlow.cpp - gui/common/ToasterNotify.cpp + src/gui/common/RsButtonOnText.cpp + src/gui/common/RSGraphWidget.cpp + src/gui/common/ElidedLabel.cpp + src/gui/common/vmessagebox.cpp + src/gui/common/RsCollectionDialog.cpp + src/gui/common/RsCollection.cpp + src/gui/common/RsUrlHandler.cpp + src/gui/common/rwindow.cpp + src/gui/common/rshtml.cpp + src/gui/common/AvatarDefs.cpp + src/gui/common/AvatarDialog.cpp + src/gui/common/GroupFlagsWidget.cpp + src/gui/common/GroupSelectionBox.cpp + src/gui/common/GroupChooser.cpp + src/gui/common/StatusDefs.cpp + src/gui/common/TagDefs.cpp + src/gui/common/GroupDefs.cpp + src/gui/common/Emoticons.cpp + src/gui/common/RSComboBox.cpp + src/gui/common/RSListWidgetItem.cpp + src/gui/common/RSTextEdit.cpp + src/gui/common/RSPlainTextEdit.cpp + src/gui/common/RSTreeWidget.cpp + src/gui/common/RSTreeWidgetItem.cpp + src/gui/common/RSFeedWidget.cpp + src/gui/common/RSTabWidget.cpp + src/gui/common/RSElidedItemDelegate.cpp + src/gui/common/RSItemDelegate.cpp + src/gui/common/PeerDefs.cpp + src/gui/common/FilesDefs.cpp + src/gui/common/PopularityDefs.cpp + src/gui/common/RsBanListDefs.cpp + src/gui/common/GroupTreeWidget.cpp + src/gui/common/RSTreeView.cpp + src/gui/common/AvatarWidget.cpp + src/gui/common/FriendListModel.cpp + src/gui/common/NewFriendList.cpp + src/gui/common/FriendSelectionWidget.cpp + src/gui/common/FriendSelectionDialog.cpp + src/gui/common/HashBox.cpp + src/gui/common/LineEditClear.cpp + src/gui/common/DropLineEdit.cpp + src/gui/common/RSTextBrowser.cpp + src/gui/common/RSImageBlockWidget.cpp + src/gui/common/FeedNotify.cpp + src/gui/common/UserNotify.cpp + src/gui/common/HeaderFrame.cpp + src/gui/common/MimeTextEdit.cpp + src/gui/common/UIStateHelper.cpp + src/gui/common/FloatingHelpBrowser.cpp + src/gui/common/SubscribeToolButton.cpp + src/gui/common/RsBanListToolButton.cpp + src/gui/common/FlowLayout.cpp + src/gui/common/PictureFlow.cpp + src/gui/common/ToasterNotify.cpp - gui/style/RSStyle.cpp - gui/style/StyleDialog.cpp + src/gui/style/RSStyle.cpp + src/gui/style/StyleDialog.cpp - gui/settings/RSPermissionMatrixWidget.cpp - gui/settings/rsharesettings.cpp - gui/settings/RsharePeerSettings.cpp - gui/settings/rsettings.cpp - gui/settings/rsettingswin.cpp - gui/settings/GeneralPage.cpp - gui/settings/AboutPage.cpp - gui/settings/ServerPage.cpp - gui/settings/NotifyPage.cpp - gui/settings/CryptoPage.cpp - gui/settings/PeoplePage.cpp - gui/settings/MessagePage.cpp - gui/settings/NewTag.cpp - gui/settings/ForumPage.cpp - gui/settings/PluginsPage.cpp - gui/settings/PluginItem.cpp - gui/settings/AppearancePage.cpp - gui/settings/FileAssociationsPage.cpp - gui/settings/SoundPage.cpp - gui/settings/TransferPage.cpp - gui/settings/ChatPage.cpp - gui/settings/ChannelPage.cpp - gui/settings/PostedPage.cpp - gui/settings/ServicePermissionsPage.cpp - gui/settings/AddFileAssociationDialog.cpp - gui/settings/GroupFrameSettingsWidget.cpp + src/gui/settings/RSPermissionMatrixWidget.cpp + src/gui/settings/rsharesettings.cpp + src/gui/settings/RsharePeerSettings.cpp + src/gui/settings/rsettings.cpp + src/gui/settings/rsettingswin.cpp + src/gui/settings/GeneralPage.cpp + src/gui/settings/AboutPage.cpp + src/gui/settings/ServerPage.cpp + src/gui/settings/NotifyPage.cpp + src/gui/settings/CryptoPage.cpp + src/gui/settings/PeoplePage.cpp + src/gui/settings/MessagePage.cpp + src/gui/settings/NewTag.cpp + src/gui/settings/ForumPage.cpp + src/gui/settings/PluginsPage.cpp + src/gui/settings/PluginItem.cpp + src/gui/settings/AppearancePage.cpp + src/gui/settings/FileAssociationsPage.cpp + src/gui/settings/SoundPage.cpp + src/gui/settings/TransferPage.cpp + src/gui/settings/ChatPage.cpp + src/gui/settings/ChannelPage.cpp + src/gui/settings/PostedPage.cpp + src/gui/settings/ServicePermissionsPage.cpp + src/gui/settings/AddFileAssociationDialog.cpp + src/gui/settings/GroupFrameSettingsWidget.cpp - gui/statusbar/peerstatus.cpp - gui/statusbar/natstatus.cpp - gui/statusbar/dhtstatus.cpp - gui/statusbar/torstatus.cpp - gui/statusbar/ratesstatus.cpp - gui/statusbar/hashingstatus.cpp - gui/statusbar/discstatus.cpp - gui/statusbar/SoundStatus.cpp - gui/statusbar/OpModeStatus.cpp - gui/statusbar/ToasterDisable.cpp - gui/statusbar/SysTrayStatus.cpp + src/gui/statusbar/peerstatus.cpp + src/gui/statusbar/natstatus.cpp + src/gui/statusbar/dhtstatus.cpp + src/gui/statusbar/torstatus.cpp + src/gui/statusbar/ratesstatus.cpp + src/gui/statusbar/hashingstatus.cpp + src/gui/statusbar/discstatus.cpp + src/gui/statusbar/SoundStatus.cpp + src/gui/statusbar/OpModeStatus.cpp + src/gui/statusbar/ToasterDisable.cpp + src/gui/statusbar/SysTrayStatus.cpp - gui/toaster/ToasterItem.cpp - gui/toaster/MessageToaster.cpp - gui/toaster/DownloadToaster.cpp - gui/toaster/OnlineToaster.cpp - gui/toaster/ChatToaster.cpp - gui/toaster/GroupChatToaster.cpp - gui/toaster/ChatLobbyToaster.cpp - gui/toaster/FriendRequestToaster.cpp + src/gui/toaster/ToasterItem.cpp + src/gui/toaster/MessageToaster.cpp + src/gui/toaster/DownloadToaster.cpp + src/gui/toaster/OnlineToaster.cpp + src/gui/toaster/ChatToaster.cpp + src/gui/toaster/GroupChatToaster.cpp + src/gui/toaster/ChatLobbyToaster.cpp + src/gui/toaster/FriendRequestToaster.cpp - gui/advsearch/advancedsearchdialog.cpp - gui/advsearch/expressionwidget.cpp - gui/advsearch/guiexprelement.cpp + src/gui/advsearch/advancedsearchdialog.cpp + src/gui/advsearch/expressionwidget.cpp + src/gui/advsearch/guiexprelement.cpp - gui/elastic/graphwidget.cpp - gui/elastic/edge.cpp - gui/elastic/arrow.cpp - gui/elastic/elnode.cpp + src/gui/elastic/graphwidget.cpp + src/gui/elastic/edge.cpp + src/gui/elastic/arrow.cpp + src/gui/elastic/elnode.cpp - gui/feeds/BoardsCommentsItem.cpp - gui/feeds/FeedItem.cpp - gui/feeds/FeedHolder.cpp - gui/feeds/GxsCircleItem.cpp - gui/feeds/ChannelsCommentsItem.cpp - gui/feeds/PeerItem.cpp - gui/feeds/MsgItem.cpp - gui/feeds/ChatMsgItem.cpp - gui/feeds/SubFileItem.cpp - gui/feeds/AttachFileItem.cpp - gui/feeds/SecurityItem.cpp - gui/feeds/SecurityIpItem.cpp - gui/feeds/NewsFeedUserNotify.cpp + src/gui/feeds/BoardsCommentsItem.cpp + src/gui/feeds/FeedItem.cpp + src/gui/feeds/FeedHolder.cpp + src/gui/feeds/GxsCircleItem.cpp + src/gui/feeds/ChannelsCommentsItem.cpp + src/gui/feeds/PeerItem.cpp + src/gui/feeds/MsgItem.cpp + src/gui/feeds/ChatMsgItem.cpp + src/gui/feeds/SubFileItem.cpp + src/gui/feeds/AttachFileItem.cpp + src/gui/feeds/SecurityItem.cpp + src/gui/feeds/SecurityIpItem.cpp + src/gui/feeds/NewsFeedUserNotify.cpp - gui/groups/CreateGroup.cpp + src/gui/groups/CreateGroup.cpp - gui/statistics/BandwidthGraphWindow.cpp - gui/statistics/BandwidthStatsWidget.cpp - gui/statistics/DhtWindow.cpp - gui/statistics/Histogram.cpp - gui/statistics/TurtleRouterDialog.cpp - gui/statistics/TurtleRouterStatistics.cpp - gui/statistics/GxsIdStatistics.cpp - gui/statistics/GlobalRouterStatistics.cpp - gui/statistics/GxsTransportStatistics.cpp - gui/statistics/StatisticsWindow.cpp - gui/statistics/BwCtrlWindow.cpp - gui/statistics/RttStatistics.cpp - gui/statistics/BWGraph.cpp + src/gui/statistics/BandwidthGraphWindow.cpp + src/gui/statistics/BandwidthStatsWidget.cpp + src/gui/statistics/DhtWindow.cpp + src/gui/statistics/Histogram.cpp + src/gui/statistics/TurtleRouterDialog.cpp + src/gui/statistics/TurtleRouterStatistics.cpp + src/gui/statistics/GxsIdStatistics.cpp + src/gui/statistics/GlobalRouterStatistics.cpp + src/gui/statistics/GxsTransportStatistics.cpp + src/gui/statistics/StatisticsWindow.cpp + src/gui/statistics/BwCtrlWindow.cpp + src/gui/statistics/RttStatistics.cpp + src/gui/statistics/BWGraph.cpp - util/RsSyntaxHighlighter.cpp - util/imageutil.cpp - util/retroshareWin32.cpp + src/util/RsSyntaxHighlighter.cpp + src/util/imageutil.cpp + src/util/retroshareWin32.cpp - gui/NetworkDialog/pgpid_item_model.cpp - gui/NetworkDialog/pgpid_item_proxy.cpp + src/gui/NetworkDialog/pgpid_item_model.cpp + src/gui/NetworkDialog/pgpid_item_proxy.cpp ) list( - APPEND RS_FORMS - TorControl/TorControlWindow.ui + APPEND RS_GUI_FORMS + src/TorControl/TorControlWindow.ui - gui/StartDialog.ui - gui/HomePage.ui - gui/GetStartedDialog.ui - gui/GenCertDialog.ui - gui/AboutDialog.ui - gui/AboutWidget.ui - gui/QuickStartWizard.ui - gui/NetworkDialog.ui - gui/common/AvatarDialog.ui - gui/MainWindow.ui - gui/NetworkView.ui - gui/FriendsDialog.ui - gui/NewsFeed.ui - gui/ShareManager.ui - gui/ShareDialog.ui - gui/help/browser/helpbrowser.ui - gui/HelpDialog.ui - gui/ServicePermissionDialog.ui - gui/ChatLobbyWidget.ui + src/gui/StartDialog.ui + src/gui/HomePage.ui + src/gui/GetStartedDialog.ui + src/gui/GenCertDialog.ui + src/gui/AboutDialog.ui + src/gui/AboutWidget.ui + src/gui/QuickStartWizard.ui + src/gui/NetworkDialog.ui + src/gui/common/AvatarDialog.ui + src/gui/MainWindow.ui + src/gui/NetworkView.ui + src/gui/FriendsDialog.ui + src/gui/NewsFeed.ui + src/gui/ShareManager.ui + src/gui/help/browser/helpbrowser.ui + src/gui/HelpDialog.ui + src/gui/ServicePermissionDialog.ui + src/gui/ChatLobbyWidget.ui - gui/FileTransfer/TransfersDialog.ui - gui/FileTransfer/DetailsDialog.ui - gui/FileTransfer/SearchDialog.ui - gui/FileTransfer/SharedFilesDialog.ui - gui/FileTransfer/BannedFilesDialog.ui + src/gui/FileTransfer/TransfersDialog.ui + src/gui/FileTransfer/DetailsDialog.ui + src/gui/FileTransfer/SearchDialog.ui + src/gui/FileTransfer/SharedFilesDialog.ui + src/gui/FileTransfer/BannedFilesDialog.ui - gui/profile/ProfileWidget.ui - gui/profile/StatusMessage.ui - gui/profile/ProfileManager.ui + src/gui/profile/ProfileWidget.ui + src/gui/profile/StatusMessage.ui + src/gui/profile/ProfileManager.ui - gui/chat/PopupChatWindow.ui - gui/chat/PopupChatDialog.ui - gui/chat/ChatTabWidget.ui - gui/chat/ChatWidget.ui - gui/chat/ChatLobbyDialog.ui - gui/chat/CreateLobbyDialog.ui + src/gui/chat/PopupChatWindow.ui + src/gui/chat/PopupChatDialog.ui + src/gui/chat/ChatTabWidget.ui + src/gui/chat/ChatWidget.ui + src/gui/chat/ChatLobbyDialog.ui + src/gui/chat/CreateLobbyDialog.ui - gui/connect/ConfCertDialog.ui - gui/connect/PGPKeyDialog.ui - gui/connect/ConnectFriendWizard.ui - gui/connect/ConnectProgressDialog.ui - gui/connect/FriendRecommendDialog.ui + src/gui/connect/ConfCertDialog.ui + src/gui/connect/PGPKeyDialog.ui + src/gui/connect/ConnectFriendWizard.ui + src/gui/connect/ConnectProgressDialog.ui + src/gui/connect/FriendRecommendDialog.ui - gui/msgs/MessagesDialog.ui - gui/msgs/MessageComposer.ui - gui/msgs/MessageWindow.ui - gui/msgs/MessageWidget.ui + src/gui/msgs/MessagesDialog.ui + src/gui/msgs/MessageComposer.ui + src/gui/msgs/MessageWindow.ui + src/gui/msgs/MessageWidget.ui - gui/settings/settingsw.ui - gui/settings/GeneralPage.ui - gui/settings/ServerPage.ui - gui/settings/NotifyPage.ui - gui/settings/PeoplePage.ui - gui/settings/CryptoPage.ui - gui/settings/MessagePage.ui - gui/settings/NewTag.ui - gui/settings/ForumPage.ui - gui/settings/AboutPage.ui - gui/settings/PluginsPage.ui - gui/settings/AppearancePage.ui - gui/settings/TransferPage.ui - gui/settings/SoundPage.ui - gui/settings/ChatPage.ui - gui/settings/ChannelPage.ui - gui/settings/PostedPage.ui - gui/settings/ServicePermissionsPage.ui - gui/settings/PluginItem.ui - gui/settings/GroupFrameSettingsWidget.ui + src/gui/settings/settingsw.ui + src/gui/settings/GeneralPage.ui + src/gui/settings/ServerPage.ui + src/gui/settings/NotifyPage.ui + src/gui/settings/PeoplePage.ui + src/gui/settings/CryptoPage.ui + src/gui/settings/MessagePage.ui + src/gui/settings/NewTag.ui + src/gui/settings/ForumPage.ui + src/gui/settings/AboutPage.ui + src/gui/settings/PluginsPage.ui + src/gui/settings/AppearancePage.ui + src/gui/settings/TransferPage.ui + src/gui/settings/SoundPage.ui + src/gui/settings/ChatPage.ui + src/gui/settings/ChannelPage.ui + src/gui/settings/PostedPage.ui + src/gui/settings/ServicePermissionsPage.ui + src/gui/settings/PluginItem.ui + src/gui/settings/GroupFrameSettingsWidget.ui - gui/toaster/MessageToaster.ui - gui/toaster/OnlineToaster.ui - gui/toaster/DownloadToaster.ui - gui/toaster/ChatToaster.ui - gui/toaster/GroupChatToaster.ui - gui/toaster/ChatLobbyToaster.ui - gui/toaster/FriendRequestToaster.ui + src/gui/toaster/MessageToaster.ui + src/gui/toaster/OnlineToaster.ui + src/gui/toaster/DownloadToaster.ui + src/gui/toaster/ChatToaster.ui + src/gui/toaster/GroupChatToaster.ui + src/gui/toaster/ChatLobbyToaster.ui + src/gui/toaster/FriendRequestToaster.ui - gui/advsearch/AdvancedSearchDialog.ui - gui/advsearch/expressionwidget.ui + src/gui/advsearch/AdvancedSearchDialog.ui + src/gui/advsearch/expressionwidget.ui - gui/feeds/BoardsCommentsItem.ui - gui/feeds/GxsCircleItem.ui - gui/feeds/ChannelsCommentsItem.ui - gui/feeds/PeerItem.ui - gui/feeds/MsgItem.ui - gui/feeds/ChatMsgItem.ui - gui/feeds/SubFileItem.ui - gui/feeds/AttachFileItem.ui - gui/feeds/SecurityItem.ui - gui/feeds/SecurityIpItem.ui + src/gui/feeds/BoardsCommentsItem.ui + src/gui/feeds/GxsCircleItem.ui + src/gui/feeds/ChannelsCommentsItem.ui + src/gui/feeds/PeerItem.ui + src/gui/feeds/MsgItem.ui + src/gui/feeds/ChatMsgItem.ui + src/gui/feeds/SubFileItem.ui + src/gui/feeds/AttachFileItem.ui + src/gui/feeds/SecurityItem.ui + src/gui/feeds/SecurityIpItem.ui - gui/im_history/ImHistoryBrowser.ui + src/gui/im_history/ImHistoryBrowser.ui - gui/groups/CreateGroup.ui + src/gui/groups/CreateGroup.ui - gui/common/GroupTreeWidget.ui - gui/common/AvatarWidget.ui - gui/common/NewFriendList.ui - gui/common/FriendSelectionWidget.ui - gui/common/HashBox.ui - gui/common/RSImageBlockWidget.ui - gui/common/RsCollectionDialog.ui - gui/common/HeaderFrame.ui - gui/common/RSFeedWidget.ui + src/gui/common/GroupTreeWidget.ui + src/gui/common/AvatarWidget.ui + src/gui/common/NewFriendList.ui + src/gui/common/FriendSelectionWidget.ui + src/gui/common/HashBox.ui + src/gui/common/RSImageBlockWidget.ui + src/gui/common/RsCollectionDialog.ui + src/gui/common/HeaderFrame.ui + src/gui/common/RSFeedWidget.ui - gui/style/StyleDialog.ui + src/gui/style/StyleDialog.ui - gui/statistics/BandwidthGraphWindow.ui - gui/statistics/BandwidthStatsWidget.ui - gui/statistics/DhtWindow.ui - gui/statistics/TurtleRouterDialog.ui - gui/statistics/TurtleRouterStatistics.ui - gui/statistics/GxsIdStatistics.ui - gui/statistics/GlobalRouterStatistics.ui - gui/statistics/GxsTransportStatistics.ui - gui/statistics/StatisticsWindow.ui - gui/statistics/BwCtrlWindow.ui - gui/statistics/RttStatistics.ui + src/gui/statistics/BandwidthGraphWindow.ui + src/gui/statistics/BandwidthStatsWidget.ui + src/gui/statistics/DhtWindow.ui + src/gui/statistics/TurtleRouterDialog.ui + src/gui/statistics/TurtleRouterStatistics.ui + src/gui/statistics/GxsIdStatistics.ui + src/gui/statistics/GlobalRouterStatistics.ui + src/gui/statistics/GxsTransportStatistics.ui + src/gui/statistics/StatisticsWindow.ui + src/gui/statistics/BwCtrlWindow.ui + src/gui/statistics/RttStatistics.ui - util/RichTextEdit.ui + src/util/RichTextEdit.ui ) list( APPEND RS_IMPLEMENTATION_HEADERS - TorControl/TorControlWindow.h + src/TorControl/TorControlWindow.h - chat/distantchat.h - chat/distributedchat.h - chat/p3chatservice.h - chat/rschatitems.h + src/chat/distantchat.h + src/chat/distributedchat.h + src/chat/p3chatservice.h + src/chat/rschatitems.h - rshare.h - retroshare-gui/configpage.h - retroshare-gui/RsAutoUpdatePage.h - retroshare-gui/mainpage.h + src/rshare.h + src/retroshare-gui/configpage.h + src/retroshare-gui/RsAutoUpdatePage.h + src/retroshare-gui/mainpage.h - control/bandwidthevent.h - control/eventtype.h + src/control/bandwidthevent.h + src/control/eventtype.h - gui/QuickStartWizard.h - gui/notifyqt.h - gui/GetStartedDialog.h - gui/StartDialog.h - gui/HomePage.h - gui/NetworkDialog.h - gui/GenCertDialog.h - gui/linetypes.h - gui/mainpagestack.h - gui/MainWindow.h - gui/RSHumanReadableDelegate.h - gui/AboutDialog.h - gui/AboutWidget.h - gui/NetworkView.h - gui/FriendsDialog.h - gui/ServicePermissionDialog.h - gui/RemoteDirModel.h - gui/PluginsPage.h - gui/PluginManagerWidget.h - gui/PluginManager.h - gui/RetroShareLink.h - gui/SearchTreeWidget.h - gui/ShareManager.h - gui/NewsFeed.h - gui/ShareDialog.h - gui/SFListDelegate.h - gui/SoundManager.h - gui/HelpDialog.h - gui/LogoBar.h + src/gui/QuickStartWizard.h + src/gui/notifyqt.h + src/gui/GetStartedDialog.h + src/gui/StartDialog.h + src/gui/HomePage.h + src/gui/NetworkDialog.h + src/gui/GenCertDialog.h + src/gui/linetypes.h + src/gui/mainpagestack.h + src/gui/MainWindow.h + src/gui/RSHumanReadableDelegate.h + src/gui/AboutDialog.h + src/gui/AboutWidget.h + src/gui/NetworkView.h + src/gui/FriendsDialog.h + src/gui/ServicePermissionDialog.h + src/gui/RemoteDirModel.h + src/gui/PluginsPage.h + src/gui/PluginManagerWidget.h + src/gui/PluginManager.h + src/gui/RetroShareLink.h + src/gui/SearchTreeWidget.h + src/gui/ShareManager.h + src/gui/NewsFeed.h + src/gui/ShareDialog.h + src/gui/SFListDelegate.h + src/gui/SoundManager.h + src/gui/HelpDialog.h + src/gui/LogoBar.h - gui/common/AvatarDialog.h + src/gui/common/AvatarDialog.h - gui/NetworkDialog/pgpid_item_model.h - gui/NetworkDialog/pgpid_item_proxy.h + src/gui/NetworkDialog/pgpid_item_model.h + src/gui/NetworkDialog/pgpid_item_proxy.h - gui/FileTransfer/SearchDialog.h - gui/FileTransfer/SharedFilesDialog.h - gui/FileTransfer/xprogressbar.h - gui/FileTransfer/DetailsDialog.h - gui/FileTransfer/FileTransferInfoWidget.h - gui/FileTransfer/DLListDelegate.h - gui/FileTransfer/ULListDelegate.h - gui/FileTransfer/TransfersDialog.h - gui/FileTransfer/BannedFilesDialog.h - gui/FileTransfer/TransferUserNotify.h + src/gui/FileTransfer/SearchDialog.h + src/gui/FileTransfer/SharedFilesDialog.h + src/gui/FileTransfer/xprogressbar.h + src/gui/FileTransfer/DetailsDialog.h + src/gui/FileTransfer/FileTransferInfoWidget.h + src/gui/FileTransfer/DLListDelegate.h + src/gui/FileTransfer/ULListDelegate.h + src/gui/FileTransfer/TransfersDialog.h + src/gui/FileTransfer/BannedFilesDialog.h + src/gui/FileTransfer/TransferUserNotify.h - gui/statistics/TurtleRouterDialog.h - gui/statistics/TurtleRouterStatistics.h - gui/statistics/GxsIdStatistics.h - gui/statistics/dhtgraph.h - gui/statistics/Histogram.h - gui/statistics/BandwidthGraphWindow.h - gui/statistics/turtlegraph.h - gui/statistics/BandwidthStatsWidget.h - gui/statistics/DhtWindow.h - gui/statistics/GlobalRouterStatistics.h - gui/statistics/GxsTransportStatistics.h - gui/statistics/StatisticsWindow.h - gui/statistics/BwCtrlWindow.h - gui/statistics/BWGraph.h - gui/statistics/RttStatistics.h + src/gui/statistics/TurtleRouterDialog.h + src/gui/statistics/TurtleRouterStatistics.h + src/gui/statistics/GxsIdStatistics.h + src/gui/statistics/dhtgraph.h + src/gui/statistics/Histogram.h + src/gui/statistics/BandwidthGraphWindow.h + src/gui/statistics/turtlegraph.h + src/gui/statistics/BandwidthStatsWidget.h + src/gui/statistics/DhtWindow.h + src/gui/statistics/GlobalRouterStatistics.h + src/gui/statistics/GxsTransportStatistics.h + src/gui/statistics/StatisticsWindow.h + src/gui/statistics/BwCtrlWindow.h + src/gui/statistics/BWGraph.h + src/gui/statistics/RttStatistics.h - gui/plugins/PluginInterface.h + src/gui/plugins/PluginInterface.h - gui/im_history/ImHistoryBrowser.h - gui/im_history/IMHistoryItemDelegate.h - gui/im_history/IMHistoryItemPainter.h + src/gui/im_history/ImHistoryBrowser.h + src/gui/im_history/IMHistoryItemDelegate.h + src/gui/im_history/IMHistoryItemPainter.h - lang/languagesupport.h + src/lang/languagesupport.h - util/RsSyntaxHighlighter.h - util/imageutil.h - util/RichTextEdit.h - util/retroshareWin32.h - util/RsProtectedTimer.h - util/stringutil.h - util/RsNetUtil.h - util/DateTime.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/RsAction.h - util/RsUserdata.h - util/printpreview.h - util/log.h - util/misc.h - util/HandleRichText.h - util/ObjectPainter.h - util/QtVersion.h - util/RsFile.h - util/qtthreadsutils.h - util/ClickableLabel.h - util/AspectRatioPixmapLabel.h + src/util/RsSyntaxHighlighter.h + src/util/imageutil.h + src/util/RichTextEdit.h + src/util/retroshareWin32.h + src/util/RsProtectedTimer.h + src/util/stringutil.h + src/util/RsNetUtil.h + src/util/DateTime.h + src/util/RetroStyleLabel.h + src/util/dllexport.h + src/util/NonCopyable.h + src/util/rsutildll.h + src/util/dllexport.h + src/util/global.h + src/util/rsqtutildll.h + src/util/Interface.h + src/util/PixmapMerging.h + src/util/MouseEventFilter.h + src/util/EventFilter.h + src/util/Widget.h + src/util/RsAction.h + src/util/RsUserdata.h + src/util/printpreview.h + src/util/log.h + src/util/misc.h + src/util/HandleRichText.h + src/util/ObjectPainter.h + src/util/QtVersion.h + src/util/RsFile.h + src/util/qtthreadsutils.h + src/util/ClickableLabel.h + src/util/AspectRatioPixmapLabel.h - gui/profile/ProfileWidget.h - gui/profile/ProfileManager.h - gui/profile/StatusMessage.h + src/gui/profile/ProfileWidget.h + src/gui/profile/ProfileManager.h + src/gui/profile/StatusMessage.h - gui/chat/PopupChatWindow.h - gui/chat/PopupChatDialog.h - gui/chat/PopupDistantChatDialog.h - gui/chat/ChatTabWidget.h - gui/chat/ChatWidget.h - gui/chat/ChatDialog.h - gui/ChatLobbyWidget.h - gui/chat/ChatLobbyDialog.h - gui/chat/CreateLobbyDialog.h - gui/chat/ChatStyle.h - gui/chat/ChatUserNotify.h - gui/chat/ChatLobbyUserNotify.h + src/gui/chat/PopupChatWindow.h + src/gui/chat/PopupChatDialog.h + src/gui/chat/PopupDistantChatDialog.h + src/gui/chat/ChatTabWidget.h + src/gui/chat/ChatWidget.h + src/gui/chat/ChatDialog.h + src/gui/ChatLobbyWidget.h + src/gui/chat/ChatLobbyDialog.h + src/gui/chat/CreateLobbyDialog.h + src/gui/chat/ChatStyle.h + src/gui/chat/ChatUserNotify.h + src/gui/chat/ChatLobbyUserNotify.h - gui/connect/ConfCertDialog.h - gui/connect/PGPKeyDialog.h - gui/connect/FriendRecommendDialog.h + src/gui/connect/ConfCertDialog.h + src/gui/connect/PGPKeyDialog.h + src/gui/connect/FriendRecommendDialog.h - gui/msgs/MessagesDialog.h - gui/msgs/MessageInterface.h - gui/msgs/MessageComposer.h - gui/msgs/MessageWindow.h - gui/msgs/MessageWidget.h - gui/msgs/MessageModel.h - gui/msgs/TagsMenu.h - gui/msgs/textformat.h - gui/msgs/MessageUserNotify.h + src/gui/msgs/MessagesDialog.h + src/gui/msgs/MessageInterface.h + src/gui/msgs/MessageComposer.h + src/gui/msgs/MessageWindow.h + src/gui/msgs/MessageWidget.h + src/gui/msgs/MessageModel.h + src/gui/msgs/TagsMenu.h + src/gui/msgs/textformat.h + src/gui/msgs/MessageUserNotify.h - gui/images/retroshare_win.rc.h + src/gui/images/retroshare_win.rc.h - gui/settings/RSPermissionMatrixWidget.h - gui/settings/rsharesettings.h - gui/settings/RsharePeerSettings.h - gui/settings/rsettings.h - gui/settings/rsettingswin.h - gui/settings/GeneralPage.h - gui/settings/PeoplePage.h - gui/settings/AboutPage.h - gui/settings/ServerPage.h - gui/settings/NotifyPage.h - gui/settings/CryptoPage.h - gui/settings/MessagePage.h - gui/settings/NewTag.h - gui/settings/ForumPage.h - gui/settings/PluginsPage.h - gui/settings/PluginItem.h - gui/settings/AppearancePage.h - gui/settings/FileAssociationsPage.h - gui/settings/SoundPage.h - gui/settings/TransferPage.h - gui/settings/ChatPage.h - gui/settings/ChannelPage.h - gui/settings/PostedPage.h - gui/settings/ServicePermissionsPage.h - gui/settings/AddFileAssociationDialog.h - gui/settings/GroupFrameSettingsWidget.h + src/gui/settings/RSPermissionMatrixWidget.h + src/gui/settings/rsharesettings.h + src/gui/settings/RsharePeerSettings.h + src/gui/settings/rsettings.h + src/gui/settings/rsettingswin.h + src/gui/settings/GeneralPage.h + src/gui/settings/PeoplePage.h + src/gui/settings/AboutPage.h + src/gui/settings/ServerPage.h + src/gui/settings/NotifyPage.h + src/gui/settings/CryptoPage.h + src/gui/settings/MessagePage.h + src/gui/settings/NewTag.h + src/gui/settings/ForumPage.h + src/gui/settings/PluginsPage.h + src/gui/settings/PluginItem.h + src/gui/settings/AppearancePage.h + src/gui/settings/FileAssociationsPage.h + src/gui/settings/SoundPage.h + src/gui/settings/TransferPage.h + src/gui/settings/ChatPage.h + src/gui/settings/ChannelPage.h + src/gui/settings/PostedPage.h + src/gui/settings/ServicePermissionsPage.h + src/gui/settings/AddFileAssociationDialog.h + src/gui/settings/GroupFrameSettingsWidget.h - gui/toaster/ToasterItem.h - gui/toaster/MessageToaster.h - gui/toaster/OnlineToaster.h - gui/toaster/DownloadToaster.h - gui/toaster/ChatToaster.h - gui/toaster/GroupChatToaster.h - gui/toaster/ChatLobbyToaster.h - gui/toaster/FriendRequestToaster.h + src/gui/toaster/ToasterItem.h + src/gui/toaster/MessageToaster.h + src/gui/toaster/OnlineToaster.h + src/gui/toaster/DownloadToaster.h + src/gui/toaster/ChatToaster.h + src/gui/toaster/GroupChatToaster.h + src/gui/toaster/ChatLobbyToaster.h + src/gui/toaster/FriendRequestToaster.h - gui/common/RsButtonOnText.h - gui/common/RsCollection.h - gui/common/RSGraphWidget.h - gui/common/ElidedLabel.h - gui/common/vmessagebox.h - gui/common/RsUrlHandler.h - gui/common/RsCollectionDialog.h - gui/common/rwindow.h - gui/common/rshtml.h - gui/common/AvatarDefs.h - gui/common/GroupFlagsWidget.h - gui/common/GroupSelectionBox.h - gui/common/GroupChooser.h - gui/common/StatusDefs.h - gui/common/TagDefs.h - gui/common/GroupDefs.h - gui/common/Emoticons.h - gui/common/RSComboBox.h - gui/common/RSListWidgetItem.h - gui/common/RSTextEdit.h - gui/common/RSPlainTextEdit.h - gui/common/RSTreeWidget.h - gui/common/RSTreeWidgetItem.h - gui/common/RSFeedWidget.h - gui/common/RSTabWidget.h - gui/common/RSElidedItemDelegate.h - gui/common/RSItemDelegate.h - gui/common/PeerDefs.h - gui/common/FilesDefs.h - gui/common/PopularityDefs.h - gui/common/RsBanListDefs.h - gui/common/GroupTreeWidget.h - gui/common/RSTreeView.h - gui/common/AvatarWidget.h - gui/common/FriendListModel.h - gui/common/NewFriendList.h - gui/common/FriendSelectionWidget.h - gui/common/FriendSelectionDialog.h - gui/common/HashBox.h - gui/common/LineEditClear.h - gui/common/DropLineEdit.h - gui/common/RSTextBrowser.h - gui/common/RSImageBlockWidget.h - gui/common/FeedNotify.h - gui/common/UserNotify.h - gui/common/HeaderFrame.h - gui/common/MimeTextEdit.h - gui/common/UIStateHelper.h - gui/common/FloatingHelpBrowser.h - gui/common/SubscribeToolButton.h - gui/common/RsBanListToolButton.h - gui/common/FlowLayout.h - gui/common/PictureFlow.h - gui/common/ToasterNotify.h + src/gui/common/RsButtonOnText.h + src/gui/common/RsCollection.h + src/gui/common/RSGraphWidget.h + src/gui/common/ElidedLabel.h + src/gui/common/vmessagebox.h + src/gui/common/RsUrlHandler.h + src/gui/common/RsCollectionDialog.h + src/gui/common/rwindow.h + src/gui/common/rshtml.h + src/gui/common/AvatarDefs.h + src/gui/common/GroupFlagsWidget.h + src/gui/common/GroupSelectionBox.h + src/gui/common/GroupChooser.h + src/gui/common/StatusDefs.h + src/gui/common/TagDefs.h + src/gui/common/GroupDefs.h + src/gui/common/Emoticons.h + src/gui/common/RSComboBox.h + src/gui/common/RSListWidgetItem.h + src/gui/common/RSTextEdit.h + src/gui/common/RSPlainTextEdit.h + src/gui/common/RSTreeWidget.h + src/gui/common/RSTreeWidgetItem.h + src/gui/common/RSFeedWidget.h + src/gui/common/RSTabWidget.h + src/gui/common/RSElidedItemDelegate.h + src/gui/common/RSItemDelegate.h + src/gui/common/PeerDefs.h + src/gui/common/FilesDefs.h + src/gui/common/PopularityDefs.h + src/gui/common/RsBanListDefs.h + src/gui/common/GroupTreeWidget.h + src/gui/common/RSTreeView.h + src/gui/common/AvatarWidget.h + src/gui/common/FriendListModel.h + src/gui/common/NewFriendList.h + src/gui/common/FriendSelectionWidget.h + src/gui/common/FriendSelectionDialog.h + src/gui/common/HashBox.h + src/gui/common/LineEditClear.h + src/gui/common/DropLineEdit.h + src/gui/common/RSTextBrowser.h + src/gui/common/RSImageBlockWidget.h + src/gui/common/FeedNotify.h + src/gui/common/UserNotify.h + src/gui/common/HeaderFrame.h + src/gui/common/MimeTextEdit.h + src/gui/common/UIStateHelper.h + src/gui/common/FloatingHelpBrowser.h + src/gui/common/SubscribeToolButton.h + src/gui/common/RsBanListToolButton.h + src/gui/common/FlowLayout.h + src/gui/common/PictureFlow.h + src/gui/common/ToasterNotify.h - gui/style/RSStyle.h - gui/style/StyleDialog.h + src/gui/style/RSStyle.h + src/gui/style/StyleDialog.h - gui/help/browser/helpbrowser.h - gui/help/browser/helptextbrowser.h + src/gui/help/browser/helpbrowser.h + src/gui/help/browser/helptextbrowser.h - gui/statusbar/peerstatus.h - gui/statusbar/natstatus.h - gui/statusbar/dhtstatus.h - gui/statusbar/torstatus.h - gui/statusbar/ratesstatus.h - gui/statusbar/hashingstatus.h - gui/statusbar/discstatus.h - gui/statusbar/SoundStatus.h - gui/statusbar/OpModeStatus.h - gui/statusbar/ToasterDisable.h - gui/statusbar/SysTrayStatus.h + src/gui/statusbar/peerstatus.h + src/gui/statusbar/natstatus.h + src/gui/statusbar/dhtstatus.h + src/gui/statusbar/torstatus.h + src/gui/statusbar/ratesstatus.h + src/gui/statusbar/hashingstatus.h + src/gui/statusbar/discstatus.h + src/gui/statusbar/SoundStatus.h + src/gui/statusbar/OpModeStatus.h + src/gui/statusbar/ToasterDisable.h + src/gui/statusbar/SysTrayStatus.h - gui/advsearch/advancedsearchdialog.h - gui/advsearch/expressionwidget.h - gui/advsearch/guiexprelement.h + src/gui/advsearch/advancedsearchdialog.h + src/gui/advsearch/expressionwidget.h + src/gui/advsearch/guiexprelement.h - gui/elastic/graphwidget.h - gui/elastic/edge.h - gui/elastic/arrow.h - gui/elastic/elnode.h + src/gui/elastic/graphwidget.h + src/gui/elastic/edge.h + src/gui/elastic/arrow.h + src/gui/elastic/elnode.h - gui/feeds/BoardsCommentsItem.h - gui/feeds/FeedItem.h - gui/feeds/FeedHolder.h - gui/feeds/GxsCircleItem.h - gui/feeds/ChannelsCommentsItem.h - gui/feeds/PeerItem.h - gui/feeds/MsgItem.h - gui/feeds/ChatMsgItem.h - gui/feeds/SubFileItem.h - gui/feeds/AttachFileItem.h - gui/feeds/SecurityItem.h - gui/feeds/SecurityIpItem.h - gui/feeds/NewsFeedUserNotify.h + src/gui/feeds/BoardsCommentsItem.h + src/gui/feeds/FeedItem.h + src/gui/feeds/FeedHolder.h + src/gui/feeds/GxsCircleItem.h + src/gui/feeds/ChannelsCommentsItem.h + src/gui/feeds/PeerItem.h + src/gui/feeds/MsgItem.h + src/gui/feeds/ChatMsgItem.h + src/gui/feeds/SubFileItem.h + src/gui/feeds/AttachFileItem.h + src/gui/feeds/SecurityItem.h + src/gui/feeds/SecurityIpItem.h + src/gui/feeds/NewsFeedUserNotify.h - gui/connect/ConnectFriendWizard.h - gui/connect/ConnectProgressDialog.h + src/gui/connect/ConnectFriendWizard.h + src/gui/connect/ConnectProgressDialog.h - gui/groups/CreateGroup.h + src/gui/groups/CreateGroup.h ) -if(RS_JSONAPI) +if(RS_JSON_API) list( - APPEND RS_SOURCES - gui/settings/JsonApiPage.cc + APPEND RS_GUI_SOURCES + src/gui/settings/JsonApiPage.cc ) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/settings/JsonApiPage.h + src/gui/settings/JsonApiPage.h ) list( - APPEND RS_FORMS - gui/settings/JsonApiPage.ui + APPEND RS_GUI_FORMS + src/gui/settings/JsonApiPage.ui ) -endif(RS_JSONAPI) +endif(RS_JSON_API) if(RS_WEBUI) list( - APPEND RS_SOURCES - gui/settings/WebuiPage.cpp + APPEND RS_GUI_SOURCES + src/gui/settings/WebuiPage.cpp ) list( APPEND RS_IMPLEMENTATION_HEADERS - jsonapi/p3webui.h - gui/settings/WebuiPage.h + src/jsonapi/p3webui.h + src/gui/settings/WebuiPage.h ) list( - APPEND RS_FORMS - gui/settings/WebuiPage.ui + APPEND RS_GUI_FORMS + src/gui/settings/WebuiPage.ui ) endif(RS_WEBUI) list( - APPEND RS_QTRESOURCES - gui/images.qrc - gui/icons.qrc - lang/lang.qrc - gui/help/content/content.qrc - gui/emojione.qrc - gui/qss/stylesheet/qdarkstyle/dark/Standard_Dark.qrc - gui/qss/stylesheet/qdarkstyle/light/Standard_Light.qrc + APPEND RS_GUI_QTRESOURCES + src/gui/images.qrc + src/gui/icons.qrc + src/lang/lang.qrc + src/gui/help/content/content.qrc + src/gui/emojione.qrc + src/gui/qss/stylesheet/qdarkstyle/dark/Standard_Dark.qrc + src/gui/qss/stylesheet/qdarkstyle/light/Standard_Light.qrc ) list( APPEND RS_TRANSLATIONS - lang/retroshare_ca_ES.ts - lang/retroshare_cs.ts - lang/retroshare_da.ts - lang/retroshare_de.ts - lang/retroshare_el.ts - lang/retroshare_en.ts - lang/retroshare_es.ts - lang/retroshare_fi.ts - lang/retroshare_fr.ts - lang/retroshare_hu.ts - lang/retroshare_it.ts - lang/retroshare_ja_JP.ts - lang/retroshare_nl.ts - lang/retroshare_ko.ts - lang/retroshare_pl.ts - lang/retroshare_ru.ts - lang/retroshare_sv.ts - lang/retroshare_tr.ts - lang/retroshare_zh_CN.ts + src/lang/retroshare_ca_ES.ts + src/lang/retroshare_cs.ts + src/lang/retroshare_da.ts + src/lang/retroshare_de.ts + src/lang/retroshare_el.ts + src/lang/retroshare_en.ts + src/lang/retroshare_es.ts + src/lang/retroshare_fi.ts + src/lang/retroshare_fr.ts + src/lang/retroshare_hu.ts + src/lang/retroshare_it.ts + src/lang/retroshare_ja_JP.ts + src/lang/retroshare_nl.ts + src/lang/retroshare_ko.ts + src/lang/retroshare_pl.ts + src/lang/retroshare_ru.ts + src/lang/retroshare_sv.ts + src/lang/retroshare_tr.ts + src/lang/retroshare_zh_CN.ts ) if(RS_UNFINISHED_TRANSLATIONS) list( APPEND RS_TRANSLATIONS - lang/retroshare_bg.ts - lang/retroshare_af.ts - lang/retroshare_pt.ts - lang/retroshare_sl.ts - lang/retroshare_sr.ts - lang/retroshare_zh_TW.ts + src/lang/retroshare_bg.ts + src/lang/retroshare_af.ts + src/lang/retroshare_pt.ts + src/lang/retroshare_sl.ts + src/lang/retroshare_sr.ts + src/lang/retroshare_zh_TW.ts ) endif(RS_UNFINISHED_TRANSLATIONS) @@ -786,42 +783,42 @@ if(RS_MESSENGER) ) list( - APPEND RS_SOURCES - gui/MessengerWindow.cpp - gui/common/FriendList.cpp + APPEND RS_GUI_SOURCES + src/gui/MessengerWindow.cpp + src/gui/common/FriendList.cpp ) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/MessengerWindow.h - gui/common/FriendList.h + src/gui/MessengerWindow.h + src/gui/common/FriendList.h ) list( - APPEND RS_FORMS - gui/MessengerWindow.ui - gui/common/FriendList.ui + APPEND RS_GUI_FORMS + src/gui/MessengerWindow.ui + src/gui/common/FriendList.ui ) endif(RS_MESSENGER) if(RS_IDLE) list( APPEND RS_IMPLEMENTATION_HEADERS - idle/idle.h + src/idle/idle.h ) list( - APPEND RS_SOURCES - idle/idle.cpp - idle/idle_platform.cpp + APPEND RS_GUI_SOURCES + src/idle/idle.cpp + src/idle/idle_platform.cpp ) endif(RS_IDLE) if(RS_FRAMECATCHER) list( APPEND RS_IMPLEMENTATION_HEADERS - util/framecatcher.h + src/util/framecatcher.h ) list( - APPEND RS_SOURCES - util/framecatcher.cpp + APPEND RS_GUI_SOURCES + src/util/framecatcher.cpp ) # TODO: LIBS += -lxine @@ -838,16 +835,16 @@ if(RS_EFS) ${PROJECT_NAME} PUBLIC RS_EMBEDED_FRIEND_SERVER ) list( - APPEND RS_SOURCES - gui/FriendServerControl.cpp + APPEND RS_GUI_SOURCES + src/gui/FriendServerControl.cpp ) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/FriendServerControl.h + src/gui/FriendServerControl.h ) list( - APPEND RS_FORMS - gui/FriendServerControl.ui + APPEND RS_GUI_FORMS + src/gui/FriendServerControl.ui ) endif(RS_EFS) @@ -857,7 +854,7 @@ if(RS_UNFINISHED) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/unfinished/ApplicationWindow.h + src/gui/unfinished/ApplicationWindow.h # gui/unfinished/CalDialog.h # gui/unfinished/ExampleDialog.h @@ -870,8 +867,8 @@ if(RS_UNFINISHED) ) list( - APPEND RS_FORMS - gui/unfinished/ApplicationWindow.ui + APPEND RS_GUI_FORMS + src/gui/unfinished/ApplicationWindow.ui # gui/unfinished/CalDialog.ui # gui/unfinished/ExampleDialog.ui @@ -884,8 +881,8 @@ if(RS_UNFINISHED) ) list( - APPEND RS_SOURCES - gui/unfinished/ApplicationWindow.cpp + APPEND RS_GUI_SOURCES + src/gui/unfinished/ApplicationWindow.cpp # gui/unfinished/CalDialog.cpp # gui/unfinished/ExampleDialog.cpp @@ -909,45 +906,45 @@ if(RS_GXSPHOTOSHARE) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/PhotoShare/AlbumGroupDialog.h - gui/PhotoShare/AlbumExtra.h - gui/PhotoShare/PhotoDrop.h - gui/PhotoShare/AlbumItem.h - gui/PhotoShare/AlbumDialog.h - gui/PhotoShare/PhotoItem.h - gui/PhotoShare/PhotoShareItemHolder.h - gui/PhotoShare/PhotoShare.h - gui/PhotoShare/PhotoSlideShow.h - gui/PhotoShare/PhotoDialog.h + src/gui/PhotoShare/AlbumGroupDialog.h + src/gui/PhotoShare/AlbumExtra.h + src/gui/PhotoShare/PhotoDrop.h + src/gui/PhotoShare/AlbumItem.h + src/gui/PhotoShare/AlbumDialog.h + src/gui/PhotoShare/PhotoItem.h + src/gui/PhotoShare/PhotoShareItemHolder.h + src/gui/PhotoShare/PhotoShare.h + src/gui/PhotoShare/PhotoSlideShow.h + src/gui/PhotoShare/PhotoDialog.h ) list( - APPEND RS_FORMS - gui/PhotoShare/AlbumExtra.ui - gui/PhotoShare/PhotoItem.ui - gui/PhotoShare/PhotoDialog.ui - gui/PhotoShare/AlbumItem.ui - gui/PhotoShare/AlbumDialog.ui - gui/PhotoShare/PhotoShare.ui - gui/PhotoShare/PhotoSlideShow.ui + APPEND RS_GUI_FORMS + src/gui/PhotoShare/AlbumExtra.ui + src/gui/PhotoShare/PhotoItem.ui + src/gui/PhotoShare/PhotoDialog.ui + src/gui/PhotoShare/AlbumItem.ui + src/gui/PhotoShare/AlbumDialog.ui + src/gui/PhotoShare/PhotoShare.ui + src/gui/PhotoShare/PhotoSlideShow.ui ) list( - APPEND RS_SOURCES - gui/PhotoShare/AlbumGroupDialog.cpp - gui/PhotoShare/AlbumExtra.cpp - gui/PhotoShare/PhotoItem.cpp - gui/PhotoShare/PhotoDialog.cpp - gui/PhotoShare/PhotoDrop.cpp - gui/PhotoShare/AlbumItem.cpp - gui/PhotoShare/AlbumDialog.cpp - gui/PhotoShare/PhotoShareItemHolder.cpp - gui/PhotoShare/PhotoShare.cpp - gui/PhotoShare/PhotoSlideShow.cpp + APPEND RS_GUI_SOURCES + src/gui/PhotoShare/AlbumGroupDialog.cpp + src/gui/PhotoShare/AlbumExtra.cpp + src/gui/PhotoShare/PhotoItem.cpp + src/gui/PhotoShare/PhotoDialog.cpp + src/gui/PhotoShare/PhotoDrop.cpp + src/gui/PhotoShare/AlbumItem.cpp + src/gui/PhotoShare/AlbumDialog.cpp + src/gui/PhotoShare/PhotoShareItemHolder.cpp + src/gui/PhotoShare/PhotoShare.cpp + src/gui/PhotoShare/PhotoSlideShow.cpp ) list( - APPEND RS_QTRESOURCES - gui/PhotoShare/Photo_images.qrc + APPEND RS_GUI_QTRESOURCES + src/gui/PhotoShare/Photo_images.qrc ) endif(RS_GXSPHOTOSHARE) @@ -960,36 +957,36 @@ if(RS_GXSWIKIPOS) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/WikiPoos/WikiDialog.h - gui/WikiPoos/WikiAddDialog.h - gui/WikiPoos/WikiEditDialog.h - gui/gxs/WikiGroupDialog.h - gui/gxs/RsGxsUpdateBroadcastBase.h - gui/gxs/RsGxsUpdateBroadcastWidget.h - gui/gxs/RsGxsUpdateBroadcastPage.h + src/gui/WikiPoos/WikiDialog.h + src/gui/WikiPoos/WikiAddDialog.h + src/gui/WikiPoos/WikiEditDialog.h + src/gui/gxs/WikiGroupDialog.h + src/gui/gxs/RsGxsUpdateBroadcastBase.h + src/gui/gxs/RsGxsUpdateBroadcastWidget.h + src/gui/gxs/RsGxsUpdateBroadcastPage.h ) list( - APPEND RS_FORMS - gui/WikiPoos/WikiDialog.ui - gui/WikiPoos/WikiAddDialog.ui - gui/WikiPoos/WikiEditDialog.ui + APPEND RS_GUI_FORMS + src/gui/WikiPoos/WikiDialog.ui + src/gui/WikiPoos/WikiAddDialog.ui + src/gui/WikiPoos/WikiEditDialog.ui ) list( - APPEND RS_SOURCES - gui/WikiPoos/WikiDialog.cpp - gui/WikiPoos/WikiAddDialog.cpp - gui/WikiPoos/WikiEditDialog.cpp - gui/gxs/WikiGroupDialog.cpp - gui/gxs/RsGxsUpdateBroadcastBase.cpp - gui/gxs/RsGxsUpdateBroadcastWidget.cpp - gui/gxs/RsGxsUpdateBroadcastPage.cpp + APPEND RS_GUI_SOURCES + src/gui/WikiPoos/WikiDialog.cpp + src/gui/WikiPoos/WikiAddDialog.cpp + src/gui/WikiPoos/WikiEditDialog.cpp + src/gui/gxs/WikiGroupDialog.cpp + src/gui/gxs/RsGxsUpdateBroadcastBase.cpp + src/gui/gxs/RsGxsUpdateBroadcastWidget.cpp + src/gui/gxs/RsGxsUpdateBroadcastPage.cpp ) list( - APPEND RS_QTRESOURCES - gui/WikiPoos/Wiki_images.qrc + APPEND RS_GUI_QTRESOURCES + src/gui/WikiPoos/Wiki_images.qrc ) endif(RS_GXSWIKIPOS) @@ -1000,73 +997,73 @@ if(RS_GXSTHEWIRE) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/TheWire/WireDialog.h - gui/TheWire/WireGroupItem.h - gui/TheWire/WireGroupDialog.h - gui/TheWire/WireGroupExtra.h - gui/TheWire/PulseAddDialog.h - gui/TheWire/PulseViewItem.h - gui/TheWire/PulseTopLevel.h - gui/TheWire/PulseViewGroup.h - gui/TheWire/PulseReply.h - gui/TheWire/PulseReplySeperator.h - gui/TheWire/PulseMessage.h + src/gui/TheWire/WireDialog.h + src/gui/TheWire/WireGroupItem.h + src/gui/TheWire/WireGroupDialog.h + src/gui/TheWire/WireGroupExtra.h + src/gui/TheWire/PulseAddDialog.h + src/gui/TheWire/PulseViewItem.h + src/gui/TheWire/PulseTopLevel.h + src/gui/TheWire/PulseViewGroup.h + src/gui/TheWire/PulseReply.h + src/gui/TheWire/PulseReplySeperator.h + src/gui/TheWire/PulseMessage.h ) list( - APPEND RS_FORMS - gui/TheWire/WireDialog.ui - gui/TheWire/WireGroupItem.ui - gui/TheWire/WireGroupExtra.ui - gui/TheWire/PulseAddDialog.ui - gui/TheWire/PulseTopLevel.ui - gui/TheWire/PulseViewGroup.ui - gui/TheWire/PulseReply.ui - gui/TheWire/PulseReplySeperator.ui - gui/TheWire/PulseMessage.ui + APPEND RS_GUI_FORMS + src/gui/TheWire/WireDialog.ui + src/gui/TheWire/WireGroupItem.ui + src/gui/TheWire/WireGroupExtra.ui + src/gui/TheWire/PulseAddDialog.ui + src/gui/TheWire/PulseTopLevel.ui + src/gui/TheWire/PulseViewGroup.ui + src/gui/TheWire/PulseReply.ui + src/gui/TheWire/PulseReplySeperator.ui + src/gui/TheWire/PulseMessage.ui ) list( - APPEND RS_SOURCES - gui/TheWire/WireDialog.cpp - gui/TheWire/WireGroupItem.cpp - gui/TheWire/WireGroupDialog.cpp - gui/TheWire/WireGroupExtra.cpp - gui/TheWire/PulseAddDialog.cpp - gui/TheWire/PulseViewItem.cpp - gui/TheWire/PulseTopLevel.cpp - gui/TheWire/PulseViewGroup.cpp - gui/TheWire/PulseReply.cpp - gui/TheWire/PulseReplySeperator.cpp - gui/TheWire/PulseMessage.cpp + APPEND RS_GUI_SOURCES + src/gui/TheWire/WireDialog.cpp + src/gui/TheWire/WireGroupItem.cpp + src/gui/TheWire/WireGroupDialog.cpp + src/gui/TheWire/WireGroupExtra.cpp + src/gui/TheWire/PulseAddDialog.cpp + src/gui/TheWire/PulseViewItem.cpp + src/gui/TheWire/PulseTopLevel.cpp + src/gui/TheWire/PulseViewGroup.cpp + src/gui/TheWire/PulseReply.cpp + src/gui/TheWire/PulseReplySeperator.cpp + src/gui/TheWire/PulseMessage.cpp ) list( - APPEND RS_QTRESOURCES - RESOURCES += gui/TheWire/TheWire_images.qrc + APPEND RS_GUI_QTRESOURCES + RESOURCES += src/gui/TheWire/TheWire_images.qrc ) endif(RS_GXSTHEWIRE) if(RS_GXSIDENTITIES) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/Identity/IdDialog.h - gui/Identity/IdEditDialog.h - gui/Identity/IdDetailsDialog.h + src/gui/Identity/IdDialog.h + src/gui/Identity/IdEditDialog.h + src/gui/Identity/IdDetailsDialog.h ) list( - APPEND RS_FORMS - gui/Identity/IdDialog.ui - gui/Identity/IdEditDialog.ui - gui/Identity/IdDetailsDialog.ui + APPEND RS_GUI_FORMS + src/gui/Identity/IdDialog.ui + src/gui/Identity/IdEditDialog.ui + src/gui/Identity/IdDetailsDialog.ui ) list( - APPEND RS_SOURCES - gui/Identity/IdDialog.cpp - gui/Identity/IdEditDialog.cpp - gui/Identity/IdDetailsDialog.cpp + APPEND RS_GUI_SOURCES + src/gui/Identity/IdDialog.cpp + src/gui/Identity/IdEditDialog.cpp + src/gui/Identity/IdDetailsDialog.cpp ) endif(RS_GXSIDENTITIES) @@ -1076,123 +1073,123 @@ if(RS_GXSCIRCLES) ) list( - gui/Circles/CirclesDialog.h - gui/Circles/CreateCircleDialog.h - gui/People/PeopleDialog.h - gui/People/CircleWidget.h - gui/People/IdentityWidget.h + src/gui/Circles/CirclesDialog.h + src/gui/Circles/CreateCircleDialog.h + src/gui/People/PeopleDialog.h + src/gui/People/CircleWidget.h + src/gui/People/IdentityWidget.h ) list( - gui/Circles/CirclesDialog.ui - gui/Circles/CreateCircleDialog.ui - gui/People/PeopleDialog.ui - gui/People/CircleWidget.ui - gui/People/IdentityWidget.ui + src/gui/Circles/CirclesDialog.ui + src/gui/Circles/CreateCircleDialog.ui + src/gui/People/PeopleDialog.ui + src/gui/People/CircleWidget.ui + src/gui/People/IdentityWidget.ui ) list( - gui/Circles/CirclesDialog.cpp - gui/Circles/CreateCircleDialog.cpp - gui/People/PeopleDialog.cpp - gui/People/CircleWidget.cpp - gui/People/IdentityWidget.cpp + src/gui/Circles/CirclesDialog.cpp + src/gui/Circles/CreateCircleDialog.cpp + src/gui/People/PeopleDialog.cpp + src/gui/People/CircleWidget.cpp + src/gui/People/IdentityWidget.cpp ) endif(RS_GXSCIRCLES) if(RS_GXSGUI) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/gxs/GxsGroupDialog.h - gui/gxs/GxsIdDetails.h - gui/gxs/GxsIdChooser.h - gui/gxs/GxsIdLabel.h - gui/gxs/GxsCircleChooser.h - gui/gxs/GxsCircleLabel.h - gui/gxs/GxsIdTreeWidgetItem.h - gui/gxs/GxsCommentTreeWidget.h - gui/gxs/GxsCommentContainer.h - gui/gxs/GxsCommentDialog.h - gui/gxs/GxsCreateCommentDialog.h - gui/gxs/GxsGroupFrameDialog.h - gui/gxs/GxsMessageFrameWidget.h - gui/gxs/GxsMessageFramePostWidget.h - gui/gxs/GxsGroupFeedItem.h - gui/gxs/GxsFeedItem.h - gui/gxs/GxsGroupShareKey.h - gui/gxs/GxsUserNotify.h - gui/gxs/GxsFeedWidget.h - util/TokenQueue.h - util/RsGxsUpdateBroadcast.h + src/gui/gxs/GxsGroupDialog.h + src/gui/gxs/GxsIdDetails.h + src/gui/gxs/GxsIdChooser.h + src/gui/gxs/GxsIdLabel.h + src/gui/gxs/GxsCircleChooser.h + src/gui/gxs/GxsCircleLabel.h + src/gui/gxs/GxsIdTreeWidgetItem.h + src/gui/gxs/GxsCommentTreeWidget.h + src/gui/gxs/GxsCommentContainer.h + src/gui/gxs/GxsCommentDialog.h + src/gui/gxs/GxsCreateCommentDialog.h + src/gui/gxs/GxsGroupFrameDialog.h + src/gui/gxs/GxsMessageFrameWidget.h + src/gui/gxs/GxsMessageFramePostWidget.h + src/gui/gxs/GxsGroupFeedItem.h + src/gui/gxs/GxsFeedItem.h + src/gui/gxs/GxsGroupShareKey.h + src/gui/gxs/GxsUserNotify.h + src/gui/gxs/GxsFeedWidget.h + src/util/TokenQueue.h + src/util/RsGxsUpdateBroadcast.h ) list( - APPEND RS_FORMS - gui/gxs/GxsGroupDialog.ui - gui/gxs/GxsCommentContainer.ui - gui/gxs/GxsCommentDialog.ui - gui/gxs/GxsCreateCommentDialog.ui - gui/gxs/GxsGroupFrameDialog.ui - gui/gxs/GxsGroupShareKey.ui + APPEND RS_GUI_FORMS + src/gui/gxs/GxsGroupDialog.ui + src/gui/gxs/GxsCommentContainer.ui + src/gui/gxs/GxsCommentDialog.ui + src/gui/gxs/GxsCreateCommentDialog.ui + src/gui/gxs/GxsGroupFrameDialog.ui + src/gui/gxs/GxsGroupShareKey.ui ) list( - APPEND RS_SOURCES - gui/gxs/GxsGroupDialog.cpp - gui/gxs/GxsIdDetails.cpp - gui/gxs/GxsIdChooser.cpp - gui/gxs/GxsIdLabel.cpp - gui/gxs/GxsCircleChooser.cpp - gui/gxs/GxsGroupShareKey.cpp - gui/gxs/GxsCircleLabel.cpp - gui/gxs/GxsIdTreeWidgetItem.cpp - gui/gxs/GxsCommentTreeWidget.cpp - gui/gxs/GxsCommentContainer.cpp - gui/gxs/GxsCommentDialog.cpp - gui/gxs/GxsCreateCommentDialog.cpp - gui/gxs/GxsGroupFrameDialog.cpp - gui/gxs/GxsMessageFrameWidget.cpp - gui/gxs/GxsMessageFramePostWidget.cpp - gui/gxs/GxsGroupFeedItem.cpp - gui/gxs/GxsFeedItem.cpp - gui/gxs/GxsUserNotify.cpp - gui/gxs/GxsFeedWidget.cpp - util/TokenQueue.cpp - util/RsGxsUpdateBroadcast.cpp + APPEND RS_GUI_SOURCES + src/gui/gxs/GxsGroupDialog.cpp + src/gui/gxs/GxsIdDetails.cpp + src/gui/gxs/GxsIdChooser.cpp + src/gui/gxs/GxsIdLabel.cpp + src/gui/gxs/GxsCircleChooser.cpp + src/gui/gxs/GxsGroupShareKey.cpp + src/gui/gxs/GxsCircleLabel.cpp + src/gui/gxs/GxsIdTreeWidgetItem.cpp + src/gui/gxs/GxsCommentTreeWidget.cpp + src/gui/gxs/GxsCommentContainer.cpp + src/gui/gxs/GxsCommentDialog.cpp + src/gui/gxs/GxsCreateCommentDialog.cpp + src/gui/gxs/GxsGroupFrameDialog.cpp + src/gui/gxs/GxsMessageFrameWidget.cpp + src/gui/gxs/GxsMessageFramePostWidget.cpp + src/gui/gxs/GxsGroupFeedItem.cpp + src/gui/gxs/GxsFeedItem.cpp + src/gui/gxs/GxsUserNotify.cpp + src/gui/gxs/GxsFeedWidget.cpp + src/util/TokenQueue.cpp + src/util/RsGxsUpdateBroadcast.cpp ) endif(RS_GXSGUI) if(RS_GXSFORUMS) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/gxsforums/GxsForumsDialog.h - gui/gxsforums/GxsForumGroupDialog.h - gui/gxsforums/CreateGxsForumMsg.h - gui/gxsforums/GxsForumThreadWidget.h - gui/gxsforums/GxsForumModel.h - gui/gxsforums/GxsForumUserNotify.h - gui/feeds/GxsForumGroupItem.h - gui/feeds/GxsForumMsgItem.h + src/gui/gxsforums/GxsForumsDialog.h + src/gui/gxsforums/GxsForumGroupDialog.h + src/gui/gxsforums/CreateGxsForumMsg.h + src/gui/gxsforums/GxsForumThreadWidget.h + src/gui/gxsforums/GxsForumModel.h + src/gui/gxsforums/GxsForumUserNotify.h + src/gui/feeds/GxsForumGroupItem.h + src/gui/feeds/GxsForumMsgItem.h ) list( - APPEND RS_FORMS - ui/gxsforums/CreateGxsForumMsg.ui - gui/gxsforums/GxsForumThreadWidget.ui - gui/feeds/GxsForumGroupItem.ui - gui/feeds/GxsForumMsgItem.ui + APPEND RS_GUI_FORMS + src/gui/gxsforums/CreateGxsForumMsg.ui + src/gui/gxsforums/GxsForumThreadWidget.ui + src/gui/feeds/GxsForumGroupItem.ui + src/gui/feeds/GxsForumMsgItem.ui ) list( - APPEND RS_SOURCES - gui/gxsforums/GxsForumsDialog.cpp - gui/gxsforums/GxsForumGroupDialog.cpp - gui/gxsforums/CreateGxsForumMsg.cpp - gui/gxsforums/GxsForumThreadWidget.cpp - gui/gxsforums/GxsForumModel.cpp - gui/gxsforums/GxsForumUserNotify.cpp - gui/feeds/GxsForumGroupItem.cpp - gui/feeds/GxsForumMsgItem.cpp + APPEND RS_GUI_SOURCES + src/gui/gxsforums/GxsForumsDialog.cpp + src/gui/gxsforums/GxsForumGroupDialog.cpp + src/gui/gxsforums/CreateGxsForumMsg.cpp + src/gui/gxsforums/GxsForumThreadWidget.cpp + src/gui/gxsforums/GxsForumModel.cpp + src/gui/gxsforums/GxsForumUserNotify.cpp + src/gui/feeds/GxsForumGroupItem.cpp + src/gui/feeds/GxsForumMsgItem.cpp ) endif(RS_GXSFORUMS) @@ -1200,90 +1197,90 @@ endif(RS_GXSFORUMS) if(RS_GXSCHANNELS) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/gxschannels/GxsChannelDialog.h - gui/gxschannels/GxsChannelGroupDialog.h - gui/gxschannels/CreateGxsChannelMsg.h - gui/gxschannels/GxsChannelPostsWidgetWithModel.h - gui/gxschannels/GxsChannelPostsModel.h - gui/gxschannels/GxsChannelPostFilesModel.h - gui/gxschannels/GxsChannelPostThumbnail.h - gui/gxschannels/GxsChannelFilesStatusWidget.h - gui/feeds/GxsChannelGroupItem.h - gui/feeds/GxsChannelPostItem.h - gui/gxschannels/GxsChannelUserNotify.h + src/gui/gxschannels/GxsChannelDialog.h + src/gui/gxschannels/GxsChannelGroupDialog.h + src/gui/gxschannels/CreateGxsChannelMsg.h + src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h + src/gui/gxschannels/GxsChannelPostsModel.h + src/gui/gxschannels/GxsChannelPostFilesModel.h + src/gui/gxschannels/GxsChannelPostThumbnail.h + src/gui/gxschannels/GxsChannelFilesStatusWidget.h + src/gui/feeds/GxsChannelGroupItem.h + src/gui/feeds/GxsChannelPostItem.h + src/gui/gxschannels/GxsChannelUserNotify.h ) list( - APPEND RS_FORMS - gui/gxschannels/GxsChannelPostsWidgetWithModel.ui - gui/gxschannels/GxsChannelFilesStatusWidget.ui - gui/gxschannels/CreateGxsChannelMsg.ui - gui/feeds/GxsChannelGroupItem.ui - gui/feeds/GxsChannelPostItem.ui + APPEND RS_GUI_FORMS + src/gui/gxschannels/GxsChannelPostsWidgetWithModel.ui + src/gui/gxschannels/GxsChannelFilesStatusWidget.ui + src/gui/gxschannels/CreateGxsChannelMsg.ui + src/gui/feeds/GxsChannelGroupItem.ui + src/gui/feeds/GxsChannelPostItem.ui ) list( - APPEND RS_SOURCES - gui/gxschannels/GxsChannelDialog.cpp - gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp - gui/gxschannels/GxsChannelPostsModel.cpp - gui/gxschannels/GxsChannelPostFilesModel.cpp - gui/gxschannels/GxsChannelFilesStatusWidget.cpp - gui/gxschannels/GxsChannelPostThumbnail.cpp - gui/gxschannels/GxsChannelGroupDialog.cpp - gui/gxschannels/CreateGxsChannelMsg.cpp - gui/feeds/GxsChannelGroupItem.cpp - gui/feeds/GxsChannelPostItem.cpp - gui/gxschannels/GxsChannelUserNotify.cpp + APPEND RS_GUI_SOURCES + src/gui/gxschannels/GxsChannelDialog.cpp + src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp + src/gui/gxschannels/GxsChannelPostsModel.cpp + src/gui/gxschannels/GxsChannelPostFilesModel.cpp + src/gui/gxschannels/GxsChannelFilesStatusWidget.cpp + src/gui/gxschannels/GxsChannelPostThumbnail.cpp + src/gui/gxschannels/GxsChannelGroupDialog.cpp + src/gui/gxschannels/CreateGxsChannelMsg.cpp + src/gui/feeds/GxsChannelGroupItem.cpp + src/gui/feeds/GxsChannelPostItem.cpp + src/gui/gxschannels/GxsChannelUserNotify.cpp ) endif(RS_GXSCHANNELS) if(RS_GXSPOSTED) list( APPEND RS_IMPLEMENTATION_HEADERS - gui/Posted/PostedDialog.h - gui/Posted/PostedListWidgetWithModel.h - gui/Posted/PostedPostsModel.h - gui/Posted/BoardPostDisplayWidget.h - gui/Posted/PostedItem.h - gui/Posted/PostedCardView.h - gui/Posted/PostedGroupDialog.h - gui/feeds/PostedGroupItem.h - gui/Posted/PostedCreatePostDialog.h - gui/Posted/PhotoView.h - gui/Posted/PostedUserNotify.h + src/gui/Posted/PostedDialog.h + src/gui/Posted/PostedListWidgetWithModel.h + src/gui/Posted/PostedPostsModel.h + src/gui/Posted/BoardPostDisplayWidget.h + src/gui/Posted/PostedItem.h + src/gui/Posted/PostedCardView.h + src/gui/Posted/PostedGroupDialog.h + src/gui/feeds/PostedGroupItem.h + src/gui/Posted/PostedCreatePostDialog.h + src/gui/Posted/PhotoView.h + src/gui/Posted/PostedUserNotify.h ) list( - APPEND RS_FORMS - gui/Posted/PostedListWidgetWithModel.ui - gui/feeds/PostedGroupItem.ui - gui/Posted/BoardPostDisplayWidget_compact.ui - gui/Posted/BoardPostDisplayWidget_card.ui - gui/Posted/PostedItem.ui - gui/Posted/PostedCardView.ui - gui/Posted/PostedCreatePostDialog.ui - gui/Posted/PhotoView.ui + APPEND RS_GUI_FORMS + src/gui/Posted/PostedListWidgetWithModel.ui + src/gui/feeds/PostedGroupItem.ui + src/gui/Posted/BoardPostDisplayWidget_compact.ui + src/gui/Posted/BoardPostDisplayWidget_card.ui + src/gui/Posted/PostedItem.ui + src/gui/Posted/PostedCardView.ui + src/gui/Posted/PostedCreatePostDialog.ui + src/gui/Posted/PhotoView.ui ) list( - APPEND RS_SOURCES - gui/Posted/PostedDialog.cpp - gui/Posted/PostedListWidgetWithModel.cpp - gui/Posted/BoardPostDisplayWidget.cpp - gui/Posted/PostedPostsModel.cpp - gui/feeds/PostedGroupItem.cpp - gui/Posted/PostedItem.cpp - gui/Posted/PostedCardView.cpp - gui/Posted/PostedGroupDialog.cpp - gui/Posted/PostedCreatePostDialog.cpp - gui/Posted/PhotoView.cpp - gui/Posted/PostedUserNotify.cpp + APPEND RS_GUI_SOURCES + src/gui/Posted/PostedDialog.cpp + src/gui/Posted/PostedListWidgetWithModel.cpp + src/gui/Posted/BoardPostDisplayWidget.cpp + src/gui/Posted/PostedPostsModel.cpp + src/gui/feeds/PostedGroupItem.cpp + src/gui/Posted/PostedItem.cpp + src/gui/Posted/PostedCardView.cpp + src/gui/Posted/PostedGroupDialog.cpp + src/gui/Posted/PostedCreatePostDialog.cpp + src/gui/Posted/PhotoView.cpp + src/gui/Posted/PostedUserNotify.cpp ) list( - APPEND RS_QTRESOURCES - gui/Posted/Posted_images.qrc + APPEND RS_GUI_QTRESOURCES + src/gui/Posted/Posted_images.qrc ) endif(RS_GXSPOSTED) diff --git a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h index c0ae4b4b2..0445ab76f 100644 --- a/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h +++ b/retroshare-gui/src/gui/statistics/BandwidthStatsWidget.h @@ -18,6 +18,8 @@ * * *******************************************************************************/ +#pragma once + #include "ui_BandwidthStatsWidget.h" #include "BWGraph.h" From dd653e546223d3d0fc866904cdf9c69c00ccb4b3 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 26 Mar 2022 20:55:10 +0100 Subject: [PATCH 05/10] moved to cpp files some column defines that otherwise collapsed in .h files --- .../src/gui/FileTransfer/DLListDelegate.cpp | 45 ++++-- .../src/gui/FileTransfer/DLListDelegate.h | 24 --- .../src/gui/FileTransfer/ULListDelegate.cpp | 28 +++- .../src/gui/FileTransfer/ULListDelegate.h | 13 -- .../gui/NetworkDialog/pgpid_item_model.cpp | 71 +++++---- .../src/gui/NetworkDialog/pgpid_item_model.h | 14 -- .../src/gui/NetworkDialog/pgpid_item_proxy.h | 8 +- retroshare-gui/src/gui/RemoteDirModel.cpp | 141 ++++++++++-------- retroshare-gui/src/gui/RemoteDirModel.h | 9 -- 9 files changed, 174 insertions(+), 179 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp index 4385af476..0b8588f76 100644 --- a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp +++ b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp @@ -32,6 +32,29 @@ Q_DECLARE_METATYPE(FileProgressInfo) +// Defines for download list list columns +#define DLLISTDELEGATE_COLUMN_NAME 0 +#define DLLISTDELEGATE_COLUMN_SIZE 1 +#define DLLISTDELEGATE_COLUMN_COMPLETED 2 +#define DLLISTDELEGATE_COLUMN_DLSPEED 3 +#define DLLISTDELEGATE_COLUMN_PROGRESS 4 +#define DLLISTDELEGATE_COLUMN_SOURCES 5 +#define DLLISTDELEGATE_COLUMN_STATUS 6 +#define DLLISTDELEGATE_COLUMN_PRIORITY 7 +#define DLLISTDELEGATE_COLUMN_REMAINING 8 +#define DLLISTDELEGATE_COLUMN_DOWNLOADTIME 9 +#define DLLISTDELEGATE_COLUMN_ID 10 +#define DLLISTDELEGATE_COLUMN_LASTDL 11 +#define DLLISTDELEGATE_COLUMN_PATH 12 +#define DLLISTDELEGATE_COLUMN_COUNT 13 + +#define PRIORITY_NULL 0.0 +#define PRIORITY_FASTER 0.1 +#define PRIORITY_AVERAGE 0.2 +#define PRIORITY_SLOWER 0.3 + +#define MAX_CHAR_TMP 128 + DLListDelegate::DLListDelegate(QObject *parent) : QAbstractItemDelegate(parent) { } @@ -69,7 +92,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } // draw the background color if not the progress column or if progress is not displayed - if(index.column() != COLUMN_PROGRESS) { + if(index.column() != DLLISTDELEGATE_COLUMN_PROGRESS) { if(option.showDecorationSelected && (option.state & QStyle::State_Selected)) { if(cg == QPalette::Normal && !(option.state & QStyle::State_Active)) { cg = QPalette::Inactive; @@ -83,7 +106,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } } switch(index.column()) { - case COLUMN_SIZE: + case DLLISTDELEGATE_COLUMN_SIZE: fileSize = index.data().toLongLong(); if(fileSize <= 0){ temp = ""; @@ -102,7 +125,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_REMAINING: + case DLLISTDELEGATE_COLUMN_REMAINING: remaining = index.data().toLongLong(); if(remaining <= 0){ temp = ""; @@ -121,7 +144,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_COMPLETED: + case DLLISTDELEGATE_COLUMN_COMPLETED: completed = index.data().toLongLong(); if(completed <= 0){ temp = ""; @@ -140,7 +163,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_DLSPEED: + case DLLISTDELEGATE_COLUMN_DLSPEED: dlspeed = index.data().toDouble(); if (dlspeed <= 0) { temp = ""; @@ -151,7 +174,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_PROGRESS: + case DLLISTDELEGATE_COLUMN_PROGRESS: { // create a xProgressBar FileProgressInfo pinfo = index.data(Qt::UserRole).value() ; @@ -180,7 +203,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignCenter, newopt.text); break; - case COLUMN_SOURCES: + case DLLISTDELEGATE_COLUMN_SOURCES: { double dblValue = index.data().toDouble(); @@ -188,7 +211,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->drawText(option.rect, Qt::AlignCenter, temp); } break; - case COLUMN_PRIORITY: + case DLLISTDELEGATE_COLUMN_PRIORITY: { double dblValue = index.data().toDouble(); if (dblValue == PRIORITY_NULL) @@ -205,7 +228,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->drawText(option.rect, Qt::AlignCenter, temp); } break; - case COLUMN_DOWNLOADTIME: + case DLLISTDELEGATE_COLUMN_DOWNLOADTIME: downloadtime = index.data().toLongLong(); minutes = downloadtime / 60; seconds = downloadtime % 60; @@ -225,7 +248,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti temp = "" ; painter->drawText(option.rect, Qt::AlignCenter, temp); break; - case COLUMN_NAME: + case DLLISTDELEGATE_COLUMN_NAME: { // decoration int pixOffset = 0; @@ -254,7 +277,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->drawText(option.rect.translated(pixOffset, 0), Qt::AlignLeft, temp); } break; - case COLUMN_LASTDL: + case DLLISTDELEGATE_COLUMN_LASTDL: if (index.data().value().isEmpty()) break; qi64Value = index.data().value(); diff --git a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h index 3b67934fe..ab11ad461 100644 --- a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h +++ b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h @@ -24,30 +24,6 @@ #include #include "xprogressbar.h" - -// Defines for download list list columns -#define COLUMN_NAME 0 -#define COLUMN_SIZE 1 -#define COLUMN_COMPLETED 2 -#define COLUMN_DLSPEED 3 -#define COLUMN_PROGRESS 4 -#define COLUMN_SOURCES 5 -#define COLUMN_STATUS 6 -#define COLUMN_PRIORITY 7 -#define COLUMN_REMAINING 8 -#define COLUMN_DOWNLOADTIME 9 -#define COLUMN_ID 10 -#define COLUMN_LASTDL 11 -#define COLUMN_PATH 12 -#define COLUMN_COUNT 13 - -#define PRIORITY_NULL 0.0 -#define PRIORITY_FASTER 0.1 -#define PRIORITY_AVERAGE 0.2 -#define PRIORITY_SLOWER 0.3 - -#define MAX_CHAR_TMP 128 - class QModelIndex; class QPainter; diff --git a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp index c4c9bb90d..8b379d780 100644 --- a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp +++ b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp @@ -25,6 +25,18 @@ Q_DECLARE_METATYPE(FileProgressInfo) +// Defines for upload list list columns +#define ULLISTDELEGATE_COLUMN_UNAME 0 +#define ULLISTDELEGATE_COLUMN_UPEER 1 +#define ULLISTDELEGATE_COLUMN_USIZE 2 +#define ULLISTDELEGATE_COLUMN_UTRANSFERRED 3 +#define ULLISTDELEGATE_COLUMN_ULSPEED 4 +#define ULLISTDELEGATE_COLUMN_UPROGRESS 5 +#define ULLISTDELEGATE_COLUMN_UHASH 6 +#define ULLISTDELEGATE_COLUMN_UCOUNT 7 + +#define MAX_CHAR_TMP 128 + ULListDelegate::ULListDelegate(QObject *parent) : QAbstractItemDelegate(parent) { ; @@ -65,7 +77,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti // draw the background color bool bDrawBackground = true; - if(index.column() == COLUMN_UPROGRESS) { + if(index.column() == ULLISTDELEGATE_COLUMN_UPROGRESS) { FileProgressInfo pinfo = index.data().value() ; bDrawBackground = (pinfo.type == FileProgressInfo::UNINIT); } @@ -84,7 +96,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } switch(index.column()) { - case COLUMN_USIZE: + case ULLISTDELEGATE_COLUMN_USIZE: fileSize = index.data().toLongLong(); if(fileSize <= 0){ temp = ""; @@ -103,7 +115,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_UTRANSFERRED: + case ULLISTDELEGATE_COLUMN_UTRANSFERRED: transferred = index.data().toLongLong(); if(transferred <= 0){ temp = ""; @@ -122,7 +134,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_ULSPEED: + case ULLISTDELEGATE_COLUMN_ULSPEED: ulspeed = index.data().toDouble(); if (ulspeed <= 0) { temp = ""; @@ -133,7 +145,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case COLUMN_UPROGRESS: + case ULLISTDELEGATE_COLUMN_UPROGRESS: { FileProgressInfo pinfo = index.data().value() ; if (pinfo.type == FileProgressInfo::UNINIT) @@ -143,7 +155,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->save() ; xProgressBar progressBar(pinfo,option.rect,painter,0);// the 3rd param is the color schema (0 is the default value) - QString ext = QFileInfo(QString::fromStdString(index.sibling(index.row(), COLUMN_UNAME).data().toString().toStdString())).suffix();; + QString ext = QFileInfo(QString::fromStdString(index.sibling(index.row(), ULLISTDELEGATE_COLUMN_UNAME).data().toString().toStdString())).suffix();; if (ext == "rsfc" || ext == "rsrl" || ext == "dist" || ext == "rsfb") progressBar.setColorSchema( 9); else @@ -157,8 +169,8 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignCenter, newopt.text); break; - case COLUMN_UNAME: - case COLUMN_UPEER: + case ULLISTDELEGATE_COLUMN_UNAME: + case ULLISTDELEGATE_COLUMN_UPEER: // decoration value = index.data(Qt::DecorationRole); pixmap = qvariant_cast(value).pixmap(option.decorationSize, option.state & QStyle::State_Enabled ? QIcon::Normal : QIcon::Disabled, option.state & QStyle::State_Open ? QIcon::On : QIcon::Off); diff --git a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h index 24a7d66d1..2f3aa4139 100644 --- a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h +++ b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h @@ -23,19 +23,6 @@ #include -// Defines for upload list list columns -#define COLUMN_UNAME 0 -#define COLUMN_UPEER 1 -#define COLUMN_USIZE 2 -#define COLUMN_UTRANSFERRED 3 -#define COLUMN_ULSPEED 4 -#define COLUMN_UPROGRESS 5 -#define COLUMN_UHASH 6 -#define COLUMN_UCOUNT 7 - - -#define MAX_CHAR_TMP 128 - class QModelIndex; class QPainter; diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp index 49bba065f..58a349514 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp @@ -24,6 +24,17 @@ #include #include +#define IMAGE_AUTHED ":/images/accepted16.png" +#define IMAGE_DENIED ":/images/denied16.png" +#define IMAGE_TRUSTED ":/images/rs-2.png" + +#define PGP_ITEM_MODEL_COLUMN_CHECK 0 +#define PGP_ITEM_MODEL_COLUMN_PEERNAME 1 +#define PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER 2 +#define PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME 3 +#define PGP_ITEM_MODEL_COLUMN_PEERID 4 +#define PGP_ITEM_MODEL_COLUMN_LAST_USED 5 +#define PGP_ITEM_MODEL_COLUMN_COUNT 6 /*TODO: * using list here for internal data storage is not best option @@ -41,22 +52,22 @@ QVariant pgpid_item_model::headerData(int section, Qt::Orientation orientation, { switch(section) { - case COLUMN_CHECK: + case PGP_ITEM_MODEL_COLUMN_CHECK: return QString(tr(" Do you accept connections signed by this profile?")); break; - case COLUMN_PEERNAME: + case PGP_ITEM_MODEL_COLUMN_PEERNAME: return QString(tr("Name of the profile")); break; - case COLUMN_I_AUTH_PEER: + case PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER: return QString(tr("This column indicates the trust level you indicated and whether you signed the profile PGP key")); break; - case COLUMN_PEER_AUTH_ME: + case PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME: return QString(tr("Did that peer sign your own profile PGP key")); break; - case COLUMN_PEERID: + case PGP_ITEM_MODEL_COLUMN_PEERID: return QString(tr("PGP Key Id of that profile")); break; - case COLUMN_LAST_USED: + case PGP_ITEM_MODEL_COLUMN_LAST_USED: return QString(tr("Last time this key was used (received time, or to check connection)")); break; } @@ -65,22 +76,22 @@ QVariant pgpid_item_model::headerData(int section, Qt::Orientation orientation, { switch(section) { - case COLUMN_CHECK: + case PGP_ITEM_MODEL_COLUMN_CHECK: return QString(tr("Connections")); break; - case COLUMN_PEERNAME: + case PGP_ITEM_MODEL_COLUMN_PEERNAME: return QString(tr("Profile")); break; - case COLUMN_I_AUTH_PEER: + case PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER: return QString(tr("Trust level")); break; - case COLUMN_PEER_AUTH_ME: + case PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME: return QString(tr("Has signed your key?")); break; - case COLUMN_PEERID: + case PGP_ITEM_MODEL_COLUMN_PEERID: return QString(tr("Id")); break; - case COLUMN_LAST_USED: + case PGP_ITEM_MODEL_COLUMN_LAST_USED: return QString(tr("Last used")); break; } @@ -98,13 +109,13 @@ QVariant pgpid_item_model::headerData(int section, Qt::Orientation orientation, { switch(section) { - case COLUMN_CHECK: + case PGP_ITEM_MODEL_COLUMN_CHECK: return 25*font_height; break; - case COLUMN_PEERNAME: case COLUMN_I_AUTH_PEER: case COLUMN_PEER_AUTH_ME: + case PGP_ITEM_MODEL_COLUMN_PEERNAME: case PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER: case PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME: return 200*font_height; break; - case COLUMN_LAST_USED: + case PGP_ITEM_MODEL_COLUMN_LAST_USED: return 75*font_height; break; } @@ -122,7 +133,7 @@ int pgpid_item_model::rowCount(const QModelIndex &/*parent*/) const int pgpid_item_model::columnCount(const QModelIndex &/*parent*/) const { - return COLUMN_COUNT; + return PGP_ITEM_MODEL_COLUMN_COUNT; } @@ -148,20 +159,20 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const { switch(index.column()) { - case COLUMN_LAST_USED: + case PGP_ITEM_MODEL_COLUMN_LAST_USED: return detail.lastUsed; break; - case COLUMN_I_AUTH_PEER: + case PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER: { if (detail.ownsign) return RS_TRUST_LVL_ULTIMATE; return detail.trustLvl; } break; - case COLUMN_PEER_AUTH_ME: + case PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME: return detail.hasSignedMe; break; - case COLUMN_CHECK: + case PGP_ITEM_MODEL_COLUMN_CHECK: return detail.accept_connection; break; default: @@ -174,13 +185,13 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const { switch(index.column()) { - case COLUMN_PEERNAME: + case PGP_ITEM_MODEL_COLUMN_PEERNAME: return QString::fromUtf8(detail.name.c_str()); break; - case COLUMN_PEERID: + case PGP_ITEM_MODEL_COLUMN_PEERID: return QString::fromStdString(detail.gpg_id.toStdString()); break; - case COLUMN_I_AUTH_PEER: + case PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER: { if (detail.ownsign) return tr("Personal signature"); @@ -199,7 +210,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const } } break; - case COLUMN_PEER_AUTH_ME: + case PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME: { if (detail.hasSignedMe) return tr("Yes"); @@ -207,7 +218,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const return tr("No"); } break; - case COLUMN_LAST_USED: + case PGP_ITEM_MODEL_COLUMN_LAST_USED: { time_t now = time(NULL); uint64_t last_time_used = now - detail.lastUsed ; @@ -226,7 +237,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const return lst_used_str; } break; - case COLUMN_CHECK: + case PGP_ITEM_MODEL_COLUMN_CHECK: { if (detail.accept_connection || rsPeers->getGPGOwnId() == detail.gpg_id) return tr("Accepted"); @@ -242,7 +253,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const { switch(index.column()) { - case COLUMN_I_AUTH_PEER: + case PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER: { if (detail.ownsign) return tr("PGP key signed by you"); @@ -263,7 +274,7 @@ QVariant pgpid_item_model::data(const QModelIndex &index, int role) const { switch(index.column()) { - case COLUMN_CHECK: + case PGP_ITEM_MODEL_COLUMN_CHECK: { if (detail.accept_connection) return QIcon(IMAGE_AUTHED); @@ -345,14 +356,14 @@ void pgpid_item_model::data_updated(std::list &new_neighs) break; if(*i1 != *i2) { - QModelIndex topLeft = createIndex(ii1,0), bottomRight = createIndex(ii1, COLUMN_COUNT-1); + QModelIndex topLeft = createIndex(ii1,0), bottomRight = createIndex(ii1, PGP_ITEM_MODEL_COLUMN_COUNT-1); emit dataChanged(topLeft, bottomRight); } } } if(new_size > old_size) { - QModelIndex topLeft = createIndex(old_size ? old_size -1 : 0 ,0), bottomRight = createIndex(new_size -1, COLUMN_COUNT-1); + QModelIndex topLeft = createIndex(old_size ? old_size -1 : 0 ,0), bottomRight = createIndex(new_size -1, PGP_ITEM_MODEL_COLUMN_COUNT-1); emit dataChanged(topLeft, bottomRight); } //dirty solution for initial data fetch diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h index c4ae73400..e33987acd 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h @@ -25,20 +25,6 @@ #include #include -#define IMAGE_AUTHED ":/images/accepted16.png" -#define IMAGE_DENIED ":/images/denied16.png" -#define IMAGE_TRUSTED ":/images/rs-2.png" - - -#define COLUMN_CHECK 0 -#define COLUMN_PEERNAME 1 -#define COLUMN_I_AUTH_PEER 2 -#define COLUMN_PEER_AUTH_ME 3 -#define COLUMN_PEERID 4 -#define COLUMN_LAST_USED 5 -#define COLUMN_COUNT 6 - - class pgpid_item_model : public QAbstractTableModel { Q_OBJECT diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h index 0260b815d..b892e093e 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h @@ -35,12 +35,12 @@ public: pgpid_item_proxy(QObject *parent = nullptr); bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; - bool lessThan(const QModelIndex &left, const QModelIndex &right) const override + bool lessThan(const QModelIndex &left, const QModelIndex &right) const override { if(left.column() == COLUMN_LAST_USED) - return left.data(Qt::EditRole).toUInt() < right.data(Qt::EditRole).toUInt(); - else - return left.data(Qt::DisplayRole).toString().toUpper() < right.data(Qt::DisplayRole).toString().toUpper(); + return left.data(Qt::EditRole).toUInt() < right.data(Qt::EditRole).toUInt(); + else + return left.data(Qt::DisplayRole).toString().toUpper() < right.data(Qt::DisplayRole).toString().toUpper(); } public slots: diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index a6f31a428..05e19857f 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -48,6 +48,15 @@ * #define RDM_SEARCH_DEBUG ****/ +#define REMOTEDIRMODEL_COLUMN_NAME 0 +#define REMOTEDIRMODEL_COLUMN_FILENB 1 +#define REMOTEDIRMODEL_COLUMN_SIZE 2 +#define REMOTEDIRMODEL_COLUMN_AGE 3 +#define REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS 4 +#define REMOTEDIRMODEL_COLUMN_WN_VISU_DIR 5 +#define REMOTEDIRMODEL_COLUMN_COUNT 6 +#define RETROSHARE_DIR_MODEL_FILTER_STRING "filtered" + static const uint32_t FLAT_VIEW_MAX_REFS_PER_SECOND = 2000 ; static const size_t FLAT_VIEW_MAX_REFS_TABLE_SIZE = 10000 ; // static const uint32_t FLAT_VIEW_MIN_DELAY_BETWEEN_UPDATES = 120 ; // dont rebuild ref list more than every 2 mins. @@ -295,11 +304,11 @@ int FlatStyle_RDM::rowCount(const QModelIndex &parent) const int TreeStyle_RDM::columnCount(const QModelIndex &/*parent*/) const { - return COLUMN_COUNT; + return REMOTEDIRMODEL_COLUMN_COUNT; } int FlatStyle_RDM::columnCount(const QModelIndex &/*parent*/) const { - return COLUMN_COUNT; + return REMOTEDIRMODEL_COLUMN_COUNT; } QString RetroshareDirModel::getFlagsString(FileStorageFlags flags) @@ -416,7 +425,7 @@ QVariant RetroshareDirModel::filterRole(const DirDetails& details, int /*coln*/) QVariant RetroshareDirModel::decorationRole(const DirDetails& details,int coln) const { - if(coln == COLUMN_FRIEND_ACCESS) + if(coln == REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS) { if(details.type == DIR_TYPE_PERSON) return QVariant() ; @@ -484,7 +493,7 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const { switch(coln) { - case COLUMN_NAME: { + case REMOTEDIRMODEL_COLUMN_NAME: { //SharedDirStats stats ; QString res ; @@ -497,7 +506,7 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const return res ; } - case COLUMN_FILENB: { + case REMOTEDIRMODEL_COLUMN_FILENB: { SharedDirStats stats ; if(RemoteMode) @@ -516,7 +525,7 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const } return tr("Empty"); } - case COLUMN_SIZE: { + case REMOTEDIRMODEL_COLUMN_SIZE: { SharedDirStats stats ; if(RemoteMode) @@ -531,7 +540,7 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const return QString(); } - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: if(!isNewerThanEpoque(details.max_mtime)) return QString(); else if(details.id != rsPeers->getOwnId()) @@ -547,13 +556,13 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const { switch(coln) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); - case COLUMN_FILENB: + case REMOTEDIRMODEL_COLUMN_FILENB: return QVariant(); - case COLUMN_SIZE: + case REMOTEDIRMODEL_COLUMN_SIZE: return misc::friendlyUnit(details.size); - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: { if(details.type == DIR_TYPE_FILE) return misc::timeRelativeToNow(details.max_mtime); @@ -567,9 +576,9 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const else return QString(); } - case COLUMN_FRIEND_ACCESS: + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: return QVariant(); - case COLUMN_WN_VISU_DIR: + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: return getGroupsString(details.flags,details.parent_groups) ; default: @@ -580,22 +589,22 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const { switch(coln) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); break; - case COLUMN_FILENB: + case REMOTEDIRMODEL_COLUMN_FILENB: if (details.children.size() > 1) { return QString::number(details.children.size()) + " " + tr("Files"); } return QString::number(details.children.size()) + " " + tr("File"); - case COLUMN_SIZE: + case REMOTEDIRMODEL_COLUMN_SIZE: return misc::friendlyUnit(details.size); - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: return misc::timeRelativeToNow(details.max_mtime); - case COLUMN_FRIEND_ACCESS: + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: return QVariant(); - case COLUMN_WN_VISU_DIR: + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: return getGroupsString(details.flags,details.parent_groups) ; default: @@ -650,12 +659,12 @@ QVariant FlatStyle_RDM::displayRole(const DirDetails& details,int coln) const if (details.type == DIR_TYPE_FILE || details.type == DIR_TYPE_EXTRA_FILE) /* File */ switch(coln) { - case COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); - case COLUMN_FILENB: return QString(); - case COLUMN_SIZE: return misc::friendlyUnit(details.size); - case COLUMN_AGE: return misc::timeRelativeToNow(details.max_mtime); - case COLUMN_FRIEND_ACCESS: return QString::fromUtf8(rsPeers->getPeerName(details.id).c_str()); - case COLUMN_WN_VISU_DIR: return computeDirectoryPath(details); + case REMOTEDIRMODEL_COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); + case REMOTEDIRMODEL_COLUMN_FILENB: return QString(); + case REMOTEDIRMODEL_COLUMN_SIZE: return misc::friendlyUnit(details.size); + case REMOTEDIRMODEL_COLUMN_AGE: return misc::timeRelativeToNow(details.max_mtime); + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: return QString::fromUtf8(rsPeers->getPeerName(details.id).c_str()); + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: return computeDirectoryPath(details); default: return QVariant() ; } @@ -675,9 +684,9 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& { switch(coln) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: return (RemoteMode)?(QString::fromUtf8(rsPeers->getPeerName(details.id).c_str())):tr("My files"); - case COLUMN_FILENB: { + case REMOTEDIRMODEL_COLUMN_FILENB: { SharedDirStats stats ; if(RemoteMode) @@ -687,7 +696,7 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& return (qulonglong) stats.total_number_of_files; } - case COLUMN_SIZE: { + case REMOTEDIRMODEL_COLUMN_SIZE: { SharedDirStats stats ; if(RemoteMode) @@ -697,7 +706,7 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& return (qulonglong) stats.total_shared_size; } - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: return details.max_mtime; default: return QString(); @@ -707,17 +716,17 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& { switch(coln) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); - case COLUMN_FILENB: + case REMOTEDIRMODEL_COLUMN_FILENB: return (qulonglong) 0; - case COLUMN_SIZE: + case REMOTEDIRMODEL_COLUMN_SIZE: return (qulonglong) details.size; - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: return details.max_mtime; - case COLUMN_FRIEND_ACCESS: + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: return getFlagsString(details.flags); - case COLUMN_WN_VISU_DIR: + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: { QString ind(""); if (ageIndicator != IND_ALWAYS) @@ -732,15 +741,15 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& { switch(coln) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); - case COLUMN_FILENB: + case REMOTEDIRMODEL_COLUMN_FILENB: return (qulonglong) details.children.size(); - case COLUMN_SIZE: + case REMOTEDIRMODEL_COLUMN_SIZE: return (qulonglong) 0; - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: return details.max_mtime; - case COLUMN_FRIEND_ACCESS: + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: return getFlagsString(details.flags); default: return tr("DIR"); @@ -760,12 +769,12 @@ QVariant FlatStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& { switch(coln) { - case COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); - case COLUMN_FILENB: return (qulonglong) 0; - case COLUMN_SIZE: return (qulonglong) details.size; - case COLUMN_AGE: return details.max_mtime; - case COLUMN_FRIEND_ACCESS: return QString::fromUtf8(rsPeers->getPeerName(details.id).c_str()); - case COLUMN_WN_VISU_DIR: { + case REMOTEDIRMODEL_COLUMN_NAME: return QString::fromUtf8(details.name.c_str()); + case REMOTEDIRMODEL_COLUMN_FILENB: return (qulonglong) 0; + case REMOTEDIRMODEL_COLUMN_SIZE: return (qulonglong) details.size; + case REMOTEDIRMODEL_COLUMN_AGE: return details.max_mtime; + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: return QString::fromUtf8(rsPeers->getPeerName(details.id).c_str()); + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: { RS_STACK_MUTEX(_ref_mutex) ; return computeDirectoryPath(details); @@ -793,7 +802,7 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const if (role == Qt::TextAlignmentRole) { - if((coln == COLUMN_FILENB) || (coln == COLUMN_SIZE)) + if((coln == REMOTEDIRMODEL_COLUMN_FILENB) || (coln == REMOTEDIRMODEL_COLUMN_SIZE)) return int( Qt::AlignRight | Qt::AlignVCenter); else return QVariant(); @@ -895,7 +904,7 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int int defw = QFontMetricsF(QWidget().font()).width(headerData(section,Qt::Horizontal,Qt::DisplayRole).toString()) ; int defh = QFontMetricsF(QWidget().font()).height(); - if (section < COLUMN_AGE) + if (section < REMOTEDIRMODEL_COLUMN_AGE) { defw = 200/16.0*defh; } @@ -909,7 +918,7 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int { switch(section) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: if (RemoteMode) if(mUpdating) return tr("Friends Directories [updating...]"); @@ -920,18 +929,18 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int return tr("My Directories [updating...]"); else return tr("My Directories"); - case COLUMN_FILENB: + case REMOTEDIRMODEL_COLUMN_FILENB: return tr("# Files"); - case COLUMN_SIZE: + case REMOTEDIRMODEL_COLUMN_SIZE: return tr("Size"); - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: return tr("Age"); - case COLUMN_FRIEND_ACCESS: + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: if (RemoteMode) return tr("Friend"); else return tr("Access"); - case COLUMN_WN_VISU_DIR: + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: if (RemoteMode) return tr("What's new"); else @@ -949,7 +958,7 @@ QVariant FlatStyle_RDM::headerData(int section, Qt::Orientation orientation, int int defw = QFontMetricsF(QWidget().font()).width(headerData(section,Qt::Horizontal,Qt::DisplayRole).toString()) ; int defh = QFontMetricsF(QWidget().font()).height(); - if (section < COLUMN_AGE) + if (section < REMOTEDIRMODEL_COLUMN_AGE) { defw = defh*200/16.0; } @@ -963,24 +972,24 @@ QVariant FlatStyle_RDM::headerData(int section, Qt::Orientation orientation, int { switch(section) { - case COLUMN_NAME: + case REMOTEDIRMODEL_COLUMN_NAME: if (RemoteMode) { return tr("Friends Directories"); } return tr("My Directories"); - case COLUMN_FILENB: + case REMOTEDIRMODEL_COLUMN_FILENB: return tr("# Files"); - case COLUMN_SIZE: + case REMOTEDIRMODEL_COLUMN_SIZE: return tr("Size"); - case COLUMN_AGE: + case REMOTEDIRMODEL_COLUMN_AGE: return tr("Age"); - case COLUMN_FRIEND_ACCESS: + case REMOTEDIRMODEL_COLUMN_FRIEND_ACCESS: if(RemoteMode) return tr("Friend"); else return tr("Share Flags"); - case COLUMN_WN_VISU_DIR: + case REMOTEDIRMODEL_COLUMN_WN_VISU_DIR: return tr("Directory"); } return tr("Column %1").arg(section); @@ -1096,7 +1105,7 @@ QModelIndex TreeStyle_RDM::parent( const QModelIndex & index ) const std::cerr << "Creating index 3 row=" << details.prow << ", column=" << 0 << ", ref=" << (void*)details.parent << std::endl; #endif - return createIndex(details.prow, COLUMN_NAME, details.parent); + return createIndex(details.prow, REMOTEDIRMODEL_COLUMN_NAME, details.parent); } QModelIndex FlatStyle_RDM::parent( const QModelIndex & index ) const { @@ -1167,7 +1176,7 @@ void RetroshareDirModel::postMods() endResetModel(); - emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,COLUMN_COUNT-1,(void*)NULL)); + emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,REMOTEDIRMODEL_COLUMN_COUNT-1,(void*)NULL)); } void FlatStyle_RDM::postMods() @@ -1340,7 +1349,7 @@ void RetroshareDirModel::getDirDetailsFromSelect (const QModelIndexList &list, s QModelIndexList::const_iterator it; for(it = list.begin(); it != list.end(); ++it) { - if(it->column()==COLUMN_FILENB) + if(it->column()==REMOTEDIRMODEL_COLUMN_FILENB) { void *ref = it -> internalPointer(); @@ -1377,7 +1386,7 @@ void RetroshareDirModel::getFileInfoFromIndexList(const QModelIndexList& list, s std::set already_in ; for(QModelIndexList::const_iterator it(list.begin()); it != list.end(); ++it) - if(it->column()==COLUMN_NAME) + if(it->column()==REMOTEDIRMODEL_COLUMN_NAME) { void *ref = it -> internalPointer(); @@ -1458,7 +1467,7 @@ void RetroshareDirModel::openSelected(const QModelIndexList &qmil, bool openDir) void RetroshareDirModel::getFilePath(const QModelIndex& index, std::string& fullpath) { - void *ref = index.sibling(index.row(),COLUMN_FILENB).internalPointer(); + void *ref = index.sibling(index.row(),REMOTEDIRMODEL_COLUMN_FILENB).internalPointer(); DirDetails details ; diff --git a/retroshare-gui/src/gui/RemoteDirModel.h b/retroshare-gui/src/gui/RemoteDirModel.h index 9d94abf32..83028dd48 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.h +++ b/retroshare-gui/src/gui/RemoteDirModel.h @@ -32,15 +32,6 @@ #include #include -#define COLUMN_NAME 0 -#define COLUMN_FILENB 1 -#define COLUMN_SIZE 2 -#define COLUMN_AGE 3 -#define COLUMN_FRIEND_ACCESS 4 -#define COLUMN_WN_VISU_DIR 5 -#define COLUMN_COUNT 6 -#define RETROSHARE_DIR_MODEL_FILTER_STRING "filtered" - struct DirDetails; class DirDetailsVector : public DirDetails From 8daa4dbf214c31228520ac5e1857052985fa381c Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 26 Mar 2022 20:55:38 +0100 Subject: [PATCH 06/10] fixed include --- retroshare-gui/src/gui/AboutWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/AboutWidget.cpp b/retroshare-gui/src/gui/AboutWidget.cpp index 7dccb1693..b468550b1 100644 --- a/retroshare-gui/src/gui/AboutWidget.cpp +++ b/retroshare-gui/src/gui/AboutWidget.cpp @@ -21,7 +21,7 @@ #include "AboutDialog.h" #include "HelpDialog.h" -#include "qmake_info.h" +#include "include/qmake_info.h" #include "rshare.h" #ifdef RS_JSONAPI From dc32b10ed651d0631fb1d31aa6c132c38e385c57 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 27 Mar 2022 19:34:09 +0200 Subject: [PATCH 07/10] added needed flags for GXS --- retroshare-gui/CMakeLists.txt | 29 ++++++++++++++++++++++------- retroshare-gui/src/CMakeLists.txt | 17 ++++------------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/retroshare-gui/CMakeLists.txt b/retroshare-gui/CMakeLists.txt index 0a44cfa82..fdd204005 100644 --- a/retroshare-gui/CMakeLists.txt +++ b/retroshare-gui/CMakeLists.txt @@ -31,12 +31,12 @@ option( RS_DEVELOPMENT_BUILD "Disable optimization to speed up build, enable verbose build log. \ just for development purposes, not suitable for library usage" - OFF ) + ON ) option( RS_JSON_API "Use restbed to expose libretroshare as JSON API via HTTP" - ON ) + OFF ) option( RS_SERVICE_DESKTOP @@ -48,6 +48,12 @@ option( "Enable RetroShare login via terminal" ON ) +option( RS_GXSGUI "Enable GXS services in GUI" ON ) +option( RS_GXSCHANNELS "Enable GXS channels in GUI" ON ) +option( RS_GXSFORUMS "Enable GXS forums in GUI" ON ) +option( RS_GXSPOSTED "Enable GXS posted in GUI" ON ) +option( RS_GXSCIRCLES "Enable GXS circles in GUI" ON ) + cmake_dependent_option( RS_SERVICE_TERMINAL_WEBUI_PASSWORD "Enable settin Web UI password via terminal in retroshare-service" @@ -71,9 +77,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -find_package( Qt5 COMPONENTS Widgets REQUIRED) -find_package( Qt5 COMPONENTS Xml REQUIRED) -find_package( Qt5 COMPONENTS Network REQUIRED) +find_package( Qt5 COMPONENTS Core REQUIRED) +find_package( Qt5 COMPONENTS Widgets REQUIRED) +find_package( Qt5 COMPONENTS Xml REQUIRED) +find_package( Qt5 COMPONENTS Network REQUIRED) +find_package( Qt5 COMPONENTS Multimedia REQUIRED) find_package( Qt5 COMPONENTS PrintSupport REQUIRED) list( APPEND RS_LINK_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Network Qt5::PrintSupport) @@ -96,9 +104,13 @@ endif(RS_DEVELOPMENT_BUILD) include(src/CMakeLists.txt) -add_executable(${PROJECT_NAME} ${RS_GUI_SOURCES} ${RS_GUI_FORMS} ${RS_GUI_QTRESOURCES}) +qt5_wrap_ui(RS_UI_HEADERS ${RS_GUI_FORMS}) + +add_executable(${PROJECT_NAME} ${RS_GUI_SOURCES} ${RS_UI_HEADERS} ${RS_GUI_QTRESOURCES}) install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) +include_directories( ${CMAKE_BINARY_DIR} ) + ################################################################################ if(RS_DEVELOPMENT_BUILD) @@ -452,8 +464,11 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/s set( CMAKE_CXX_FLAGS "-Wno-deprecated-declarations" ) target_compile_definitions(${PROJECT_NAME} PUBLIC RS_NO_WARN_DEPRECATED ) +target_compile_definitions(${PROJECT_NAME} PRIVATE TARGET=\"retroshare\") - +if(RS_GXS_CIRCLES) + target_compile_definitions(${PROJECT_NAME} PRIVATE RS_USE_CIRCLES ) +endif(RS_GXS_CIRCLES) #add_dependencies(${PROJECT_NAME} libretroshare) diff --git a/retroshare-gui/src/CMakeLists.txt b/retroshare-gui/src/CMakeLists.txt index 540363ea2..b936552ed 100644 --- a/retroshare-gui/src/CMakeLists.txt +++ b/retroshare-gui/src/CMakeLists.txt @@ -29,9 +29,6 @@ list( src/gui/QuickStartWizard.cpp src/gui/StartDialog.cpp src/gui/HomePage.cpp - src/gui/PluginsPage.cpp - src/gui/PluginManagerWidget.cpp - src/gui/PluginManager.cpp src/gui/ChatLobbyWidget.cpp src/gui/GetStartedDialog.cpp src/gui/GenCertDialog.cpp @@ -438,9 +435,6 @@ list( src/gui/FriendsDialog.h src/gui/ServicePermissionDialog.h src/gui/RemoteDirModel.h - src/gui/PluginsPage.h - src/gui/PluginManagerWidget.h - src/gui/PluginManager.h src/gui/RetroShareLink.h src/gui/SearchTreeWidget.h src/gui/ShareManager.h @@ -778,9 +772,7 @@ endif(RS_UNFINISHED_TRANSLATIONS) if(RS_MESSENGER) - target_compile_definitions( - ${PROJECT_NAME} PUBLIC MESSENGER_WINDOW - ) + target_compile_definitions( ${PROJECT_NAME} PUBLIC MESSENGER_WINDOW ) list( APPEND RS_GUI_SOURCES @@ -1068,11 +1060,8 @@ if(RS_GXSIDENTITIES) endif(RS_GXSIDENTITIES) if(RS_GXSCIRCLES) - target_compile_definitions( - ${PROJECT_NAME} PUBLIC RS_USE_CIRCLES - ) - list( + APPEND RS_IMPLEMENTATION_HEADERS src/gui/Circles/CirclesDialog.h src/gui/Circles/CreateCircleDialog.h src/gui/People/PeopleDialog.h @@ -1081,6 +1070,7 @@ if(RS_GXSCIRCLES) ) list( + APPEND RS_GUI_FORMS src/gui/Circles/CirclesDialog.ui src/gui/Circles/CreateCircleDialog.ui src/gui/People/PeopleDialog.ui @@ -1089,6 +1079,7 @@ if(RS_GXSCIRCLES) ) list( + APPEND RS_GUI_SOURCES src/gui/Circles/CirclesDialog.cpp src/gui/Circles/CreateCircleDialog.cpp src/gui/People/PeopleDialog.cpp From 0cc813d093e66b7cd3657e137e3da92abb6c61db Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 27 Mar 2022 19:35:23 +0200 Subject: [PATCH 08/10] fixed naming of columns that colided because of common names --- .../src/gui/FileTransfer/DLListDelegate.cpp | 43 +- .../src/gui/FileTransfer/DLListDelegate.h | 44 +- .../gui/FileTransfer/SharedFilesDialog.cpp | 70 +-- .../src/gui/FileTransfer/TransfersDialog.cpp | 406 +++++++++--------- .../src/gui/FileTransfer/ULListDelegate.cpp | 28 +- .../src/gui/FileTransfer/ULListDelegate.h | 35 +- retroshare-gui/src/gui/MainWindow.cpp | 2 - retroshare-gui/src/gui/NetworkDialog.cpp | 20 +- .../gui/NetworkDialog/pgpid_item_model.cpp | 8 - .../src/gui/NetworkDialog/pgpid_item_model.h | 7 + .../gui/NetworkDialog/pgpid_item_proxy.cpp | 20 +- .../src/gui/NetworkDialog/pgpid_item_proxy.h | 9 +- 12 files changed, 331 insertions(+), 361 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp index 0b8588f76..3fc982012 100644 --- a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp +++ b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.cpp @@ -32,27 +32,6 @@ Q_DECLARE_METATYPE(FileProgressInfo) -// Defines for download list list columns -#define DLLISTDELEGATE_COLUMN_NAME 0 -#define DLLISTDELEGATE_COLUMN_SIZE 1 -#define DLLISTDELEGATE_COLUMN_COMPLETED 2 -#define DLLISTDELEGATE_COLUMN_DLSPEED 3 -#define DLLISTDELEGATE_COLUMN_PROGRESS 4 -#define DLLISTDELEGATE_COLUMN_SOURCES 5 -#define DLLISTDELEGATE_COLUMN_STATUS 6 -#define DLLISTDELEGATE_COLUMN_PRIORITY 7 -#define DLLISTDELEGATE_COLUMN_REMAINING 8 -#define DLLISTDELEGATE_COLUMN_DOWNLOADTIME 9 -#define DLLISTDELEGATE_COLUMN_ID 10 -#define DLLISTDELEGATE_COLUMN_LASTDL 11 -#define DLLISTDELEGATE_COLUMN_PATH 12 -#define DLLISTDELEGATE_COLUMN_COUNT 13 - -#define PRIORITY_NULL 0.0 -#define PRIORITY_FASTER 0.1 -#define PRIORITY_AVERAGE 0.2 -#define PRIORITY_SLOWER 0.3 - #define MAX_CHAR_TMP 128 DLListDelegate::DLListDelegate(QObject *parent) : QAbstractItemDelegate(parent) @@ -92,7 +71,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } // draw the background color if not the progress column or if progress is not displayed - if(index.column() != DLLISTDELEGATE_COLUMN_PROGRESS) { + if(index.column() != COLUMN_PROGRESS) { if(option.showDecorationSelected && (option.state & QStyle::State_Selected)) { if(cg == QPalette::Normal && !(option.state & QStyle::State_Active)) { cg = QPalette::Inactive; @@ -106,7 +85,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } } switch(index.column()) { - case DLLISTDELEGATE_COLUMN_SIZE: + case COLUMN_SIZE: fileSize = index.data().toLongLong(); if(fileSize <= 0){ temp = ""; @@ -125,7 +104,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case DLLISTDELEGATE_COLUMN_REMAINING: + case COLUMN_REMAINING: remaining = index.data().toLongLong(); if(remaining <= 0){ temp = ""; @@ -144,7 +123,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case DLLISTDELEGATE_COLUMN_COMPLETED: + case COLUMN_COMPLETED: completed = index.data().toLongLong(); if(completed <= 0){ temp = ""; @@ -163,7 +142,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case DLLISTDELEGATE_COLUMN_DLSPEED: + case COLUMN_DLSPEED: dlspeed = index.data().toDouble(); if (dlspeed <= 0) { temp = ""; @@ -174,7 +153,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case DLLISTDELEGATE_COLUMN_PROGRESS: + case COLUMN_PROGRESS: { // create a xProgressBar FileProgressInfo pinfo = index.data(Qt::UserRole).value() ; @@ -203,7 +182,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignCenter, newopt.text); break; - case DLLISTDELEGATE_COLUMN_SOURCES: + case COLUMN_SOURCES: { double dblValue = index.data().toDouble(); @@ -211,7 +190,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->drawText(option.rect, Qt::AlignCenter, temp); } break; - case DLLISTDELEGATE_COLUMN_PRIORITY: + case COLUMN_PRIORITY: { double dblValue = index.data().toDouble(); if (dblValue == PRIORITY_NULL) @@ -228,7 +207,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->drawText(option.rect, Qt::AlignCenter, temp); } break; - case DLLISTDELEGATE_COLUMN_DOWNLOADTIME: + case COLUMN_DOWNLOADTIME: downloadtime = index.data().toLongLong(); minutes = downloadtime / 60; seconds = downloadtime % 60; @@ -248,7 +227,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti temp = "" ; painter->drawText(option.rect, Qt::AlignCenter, temp); break; - case DLLISTDELEGATE_COLUMN_NAME: + case COLUMN_NAME: { // decoration int pixOffset = 0; @@ -277,7 +256,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->drawText(option.rect.translated(pixOffset, 0), Qt::AlignLeft, temp); } break; - case DLLISTDELEGATE_COLUMN_LASTDL: + case COLUMN_LASTDL: if (index.data().value().isEmpty()) break; qi64Value = index.data().value(); diff --git a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h index ab11ad461..109d16ed3 100644 --- a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h +++ b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h @@ -18,31 +18,41 @@ * * *******************************************************************************/ -#ifndef DLLISTDELEGATE_H -#define DLLISTDELEGATE_H +#pragma once #include #include "xprogressbar.h" +#include "FTListDelegate.h" class QModelIndex; class QPainter; +class DLListDelegate: public QAbstractItemDelegate +{ +public: + DLListDelegate(QObject *parent=0); + virtual ~DLListDelegate(){} + void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const; + QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const; -class DLListDelegate: public QAbstractItemDelegate { + static constexpr int COLUMN_NAME = 0; + static constexpr int COLUMN_SIZE = 1; + static constexpr int COLUMN_COMPLETED = 2; + static constexpr int COLUMN_DLSPEED = 3; + static constexpr int COLUMN_PROGRESS = 4; + static constexpr int COLUMN_SOURCES = 5; + static constexpr int COLUMN_STATUS = 6; + static constexpr int COLUMN_PRIORITY = 7; + static constexpr int COLUMN_REMAINING = 8; + static constexpr int COLUMN_DOWNLOADTIME= 9; + static constexpr int COLUMN_ID = 10; + static constexpr int COLUMN_LASTDL = 11; + static constexpr int COLUMN_PATH = 12; + static constexpr int COLUMN_COUNT = 13; - Q_OBJECT - - public: - DLListDelegate(QObject *parent=0); - virtual ~DLListDelegate(){} - void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const; - QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const; - - private: - - public slots: - - signals: + static constexpr float PRIORITY_NULL = 0.0; + static constexpr float PRIORITY_FASTER = 0.1; + static constexpr float PRIORITY_AVERAGE = 0.2; + static constexpr float PRIORITY_SLOWER = 0.3; }; -#endif diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp index a7d61489a..a88784c12 100644 --- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp @@ -55,6 +55,16 @@ #include +#define SHARED_FILES_DIALOG_COLUMN_NAME 0 +#define SHARED_FILES_DIALOG_COLUMN_FILENB 1 +#define SHARED_FILES_DIALOG_COLUMN_SIZE 2 +#define SHARED_FILES_DIALOG_COLUMN_AGE 3 +#define SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS 4 +#define SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR 5 +#define SHARED_FILES_DIALOG_COLUMN_COUNT 6 + +#define SHARED_FILES_DIALOG_FILTER_STRING "filtered" + /* Images for context menu icons */ #define IMAGE_DOWNLOAD ":/icons/png/download.png" #define IMAGE_PLAY ":/images/start.png" @@ -187,17 +197,17 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent) tree_proxyModel->setSourceModel(tree_model); tree_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); tree_proxyModel->setSortRole(RetroshareDirModel::SortRole); - tree_proxyModel->sort(COLUMN_NAME); + tree_proxyModel->sort(SHARED_FILES_DIALOG_COLUMN_NAME); tree_proxyModel->setFilterRole(RetroshareDirModel::FilterRole); - tree_proxyModel->setFilterRegExp(QRegExp(QString(RETROSHARE_DIR_MODEL_FILTER_STRING))) ; + tree_proxyModel->setFilterRegExp(QRegExp(QString(SHARED_FILES_DIALOG_FILTER_STRING))) ; flat_proxyModel = new SFDSortFilterProxyModel(flat_model, this); flat_proxyModel->setSourceModel(flat_model); flat_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); flat_proxyModel->setSortRole(RetroshareDirModel::SortRole); - flat_proxyModel->sort(COLUMN_NAME); + flat_proxyModel->sort(SHARED_FILES_DIALOG_COLUMN_NAME); flat_proxyModel->setFilterRole(RetroshareDirModel::FilterRole); - flat_proxyModel->setFilterRegExp(QRegExp(QString(RETROSHARE_DIR_MODEL_FILTER_STRING))) ; + flat_proxyModel->setFilterRegExp(QRegExp(QString(SHARED_FILES_DIALOG_FILTER_STRING))) ; connect(ui.filterClearButton, SIGNAL(clicked()), this, SLOT(clearFilter())); connect(ui.filterStartButton, SIGNAL(clicked()), this, SLOT(startFilter())); @@ -219,12 +229,12 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent) int charWidth = ui.dirTreeView->fontMetrics().horizontalAdvance("_"); #endif - header->resizeSection ( COLUMN_NAME , charWidth*100 ); - header->resizeSection ( COLUMN_FILENB , charWidth*15 ); - header->resizeSection ( COLUMN_SIZE , charWidth*10 ); - header->resizeSection ( COLUMN_AGE , charWidth*6 ); - header->resizeSection ( COLUMN_FRIEND_ACCESS, charWidth*10 ); - header->resizeSection ( COLUMN_WN_VISU_DIR , charWidth*20 ); + header->resizeSection ( SHARED_FILES_DIALOG_COLUMN_NAME , charWidth*100 ); + header->resizeSection ( SHARED_FILES_DIALOG_COLUMN_FILENB , charWidth*15 ); + header->resizeSection ( SHARED_FILES_DIALOG_COLUMN_SIZE , charWidth*10 ); + header->resizeSection ( SHARED_FILES_DIALOG_COLUMN_AGE , charWidth*6 ); + header->resizeSection ( SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS, charWidth*10 ); + header->resizeSection ( SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR , charWidth*20 ); header->setStretchLastSection(true); @@ -260,7 +270,7 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent) : SharedFilesDialog(false,parent) { // Hide columns after loading the settings - ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR, false) ; ui.downloadButton->hide() ; // load settings @@ -279,14 +289,14 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent) ui.titleBarPixmap->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_MYFILES)) ; - ui.dirTreeView->setItemDelegateForColumn(COLUMN_FRIEND_ACCESS,new ShareFlagsItemDelegate()) ; + ui.dirTreeView->setItemDelegateForColumn(SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS,new ShareFlagsItemDelegate()) ; } RemoteSharedFilesDialog::RemoteSharedFilesDialog(QWidget *parent) : SharedFilesDialog(true,parent) { - ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, false) ; - ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, true) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR, true) ; ui.checkButton->hide() ; connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadRemoteSelected())); @@ -440,9 +450,9 @@ void SharedFilesDialog::changeCurrentViewModel(int viewTypeIndex) restoreExpandedPathsAndSelection(expanded_indexes,hidden_indexes,selected_indexes); QHeaderView * header = ui.dirTreeView->header () ; - QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(header, SHARED_FILES_DIALOG_COLUMN_NAME, QHeaderView::Interactive); - ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, COLUMN_NAME, COLUMN_WN_VISU_DIR) ; + ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, SHARED_FILES_DIALOG_COLUMN_NAME, SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR) ; // recursRestoreExpandedItems(ui.dirTreeView->rootIndex(),expanded_indexes); FilterItems(); @@ -452,9 +462,9 @@ void LocalSharedFilesDialog::showProperColumns() { if(model == tree_model) { - ui.dirTreeView->setColumnHidden(COLUMN_FILENB, false) ; - ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, false) ; - ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FILENB, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR, false) ; #ifdef DONT_USE_SEARCH_IN_TREE_VIEW ui.filterLabel->hide(); ui.filterPatternLineEdit->hide(); @@ -464,9 +474,9 @@ void LocalSharedFilesDialog::showProperColumns() } else { - ui.dirTreeView->setColumnHidden(COLUMN_FILENB, true) ; - ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, true) ; - ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FILENB, true) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS, true) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR, false) ; #ifdef DONT_USE_SEARCH_IN_TREE_VIEW ui.filterLabel->show(); ui.filterPatternLineEdit->show(); @@ -477,9 +487,9 @@ void RemoteSharedFilesDialog::showProperColumns() { if(model == tree_model) { - ui.dirTreeView->setColumnHidden(COLUMN_FILENB, false) ; - ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, true) ; - ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, true) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FILENB, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS, true) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR, true) ; #ifdef DONT_USE_SEARCH_IN_TREE_VIEW ui.filterLabel->hide(); ui.filterPatternLineEdit->hide(); @@ -489,9 +499,9 @@ void RemoteSharedFilesDialog::showProperColumns() } else { - ui.dirTreeView->setColumnHidden(COLUMN_FILENB, true) ; - ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, false) ; - ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FILENB, true) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_FRIEND_ACCESS, false) ; + ui.dirTreeView->setColumnHidden(SHARED_FILES_DIALOG_COLUMN_WN_VISU_DIR, false) ; #ifdef DONT_USE_SEARCH_IN_TREE_VIEW ui.filterLabel->show(); ui.filterPatternLineEdit->show(); @@ -1337,9 +1347,9 @@ void SharedFilesDialog::indicatorChanged(int index) ui.dirTreeView->update(ui.dirTreeView->rootIndex()); if (correct_indicator[index] != IND_ALWAYS) - ui.dirTreeView->sortByColumn(COLUMN_AGE, Qt::AscendingOrder); + ui.dirTreeView->sortByColumn(SHARED_FILES_DIALOG_COLUMN_AGE, Qt::AscendingOrder); else - ui.dirTreeView->sortByColumn(COLUMN_NAME, Qt::AscendingOrder); + ui.dirTreeView->sortByColumn(SHARED_FILES_DIALOG_COLUMN_NAME, Qt::AscendingOrder); updateDisplay() ; } diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp index 035ed2ca6..ba5fc017d 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp @@ -144,7 +144,7 @@ public: } int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { - return COLUMN_COUNT ; + return DLListDelegate::COLUMN_COUNT ; } bool hasChildren(const QModelIndex &parent = QModelIndex()) const { @@ -176,7 +176,7 @@ public: QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const { - if(row < 0 || column < 0 || column >= COLUMN_COUNT) + if(row < 0 || column < 0 || column >= DLListDelegate::COLUMN_COUNT) return QModelIndex(); void *parent_ref = (parent.isValid())?parent.internalPointer():NULL ; @@ -258,19 +258,19 @@ public: switch(section) { default: - case COLUMN_NAME: return tr("Name", "i.e: file name"); - case COLUMN_SIZE: return tr("Size", "i.e: file size"); - case COLUMN_COMPLETED: return tr("Completed", ""); - case COLUMN_DLSPEED: return tr("Speed", "i.e: Download speed"); - case COLUMN_PROGRESS: return tr("Progress / Availability", "i.e: % downloaded"); - case COLUMN_SOURCES: return tr("Sources", "i.e: Sources"); - case COLUMN_STATUS: return tr("Status"); - case COLUMN_PRIORITY: return tr("Speed / Queue position"); - case COLUMN_REMAINING: return tr("Remaining"); - case COLUMN_DOWNLOADTIME: return tr("Download time", "i.e: Estimated Time of Arrival / Time left"); - case COLUMN_ID: return tr("Hash"); - case COLUMN_LASTDL: return tr("Last Time Seen", "i.e: Last Time Receiced Data"); - case COLUMN_PATH: return tr("Path", "i.e: Where file is saved"); + case DLListDelegate::COLUMN_NAME: return tr("Name", "i.e: file name"); + case DLListDelegate::COLUMN_SIZE: return tr("Size", "i.e: file size"); + case DLListDelegate::COLUMN_COMPLETED: return tr("Completed", ""); + case DLListDelegate::COLUMN_DLSPEED: return tr("Speed", "i.e: Download speed"); + case DLListDelegate::COLUMN_PROGRESS: return tr("Progress / Availability", "i.e: % downloaded"); + case DLListDelegate::COLUMN_SOURCES: return tr("Sources", "i.e: Sources"); + case DLListDelegate::COLUMN_STATUS: return tr("Status"); + case DLListDelegate::COLUMN_PRIORITY: return tr("Speed / Queue position"); + case DLListDelegate::COLUMN_REMAINING: return tr("Remaining"); + case DLListDelegate::COLUMN_DOWNLOADTIME: return tr("Download time", "i.e: Estimated Time of Arrival / Time left"); + case DLListDelegate::COLUMN_ID: return tr("Hash"); + case DLListDelegate::COLUMN_LASTDL: return tr("Last Time Seen", "i.e: Last Time Receiced Data"); + case DLListDelegate::COLUMN_PATH: return tr("Path", "i.e: Where file is saved"); } } @@ -352,19 +352,19 @@ public: switch(col) { default: - case COLUMN_NAME: return QVariant( QSize(factor * 170, factor*14.0f )); - case COLUMN_SIZE: return QVariant( QSize(factor * 70 , factor*14.0f )); - case COLUMN_COMPLETED: return QVariant( QSize(factor * 75 , factor*14.0f )); - case COLUMN_DLSPEED: return QVariant( QSize(factor * 75 , factor*14.0f )); - case COLUMN_PROGRESS: return QVariant( QSize(factor * 170, factor*14.0f )); - case COLUMN_SOURCES: return QVariant( QSize(factor * 90 , factor*14.0f )); - case COLUMN_STATUS: return QVariant( QSize(factor * 100, factor*14.0f )); - case COLUMN_PRIORITY: return QVariant( QSize(factor * 100, factor*14.0f )); - case COLUMN_REMAINING: return QVariant( QSize(factor * 100, factor*14.0f )); - case COLUMN_DOWNLOADTIME: return QVariant( QSize(factor * 100, factor*14.0f )); - case COLUMN_ID: return QVariant( QSize(factor * 100, factor*14.0f )); - case COLUMN_LASTDL: return QVariant( QSize(factor * 100, factor*14.0f )); - case COLUMN_PATH: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_NAME: return QVariant( QSize(factor * 170, factor*14.0f )); + case DLListDelegate::COLUMN_SIZE: return QVariant( QSize(factor * 70 , factor*14.0f )); + case DLListDelegate::COLUMN_COMPLETED: return QVariant( QSize(factor * 75 , factor*14.0f )); + case DLListDelegate::COLUMN_DLSPEED: return QVariant( QSize(factor * 75 , factor*14.0f )); + case DLListDelegate::COLUMN_PROGRESS: return QVariant( QSize(factor * 170, factor*14.0f )); + case DLListDelegate::COLUMN_SOURCES: return QVariant( QSize(factor * 90 , factor*14.0f )); + case DLListDelegate::COLUMN_STATUS: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_PRIORITY: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_REMAINING: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_DOWNLOADTIME: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_ID: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_LASTDL: return QVariant( QSize(factor * 100, factor*14.0f )); + case DLListDelegate::COLUMN_PATH: return QVariant( QSize(factor * 100, factor*14.0f )); } } @@ -374,11 +374,11 @@ public: if(source_id == -1) // toplevel switch(col) { - case COLUMN_NAME: return QVariant(QString::fromUtf8(fileInfo.fname.c_str())); - case COLUMN_COMPLETED: return QVariant((qlonglong)fileInfo.transfered); - case COLUMN_DLSPEED: return QVariant((double)((fileInfo.downloadStatus == FT_STATE_DOWNLOADING) ? (fileInfo.tfRate * 1024.0) : 0.0)); - case COLUMN_PROGRESS: return QVariant((float)((fileInfo.size == 0) ? 0 : (fileInfo.transfered * 100.0 / (float)fileInfo.size))); - case COLUMN_STATUS: + case DLListDelegate::COLUMN_NAME: return QVariant(QString::fromUtf8(fileInfo.fname.c_str())); + case DLListDelegate::COLUMN_COMPLETED: return QVariant((qlonglong)fileInfo.transfered); + case DLListDelegate::COLUMN_DLSPEED: return QVariant((double)((fileInfo.downloadStatus == FT_STATE_DOWNLOADING) ? (fileInfo.tfRate * 1024.0) : 0.0)); + case DLListDelegate::COLUMN_PROGRESS: return QVariant((float)((fileInfo.size == 0) ? 0 : (fileInfo.transfered * 100.0 / (float)fileInfo.size))); + case DLListDelegate::COLUMN_STATUS: { QString status; switch (fileInfo.downloadStatus) @@ -396,9 +396,9 @@ public: return QVariant(status); } - case COLUMN_PRIORITY: + case DLListDelegate::COLUMN_PRIORITY: { - double priority = PRIORITY_NULL; + double priority = DLListDelegate::PRIORITY_NULL; if (fileInfo.downloadStatus == FT_STATE_QUEUED) priority = fileInfo.queue_position; @@ -407,18 +407,18 @@ public: else switch (fileInfo.priority) { - case SPEED_LOW: priority = PRIORITY_SLOWER; break; - case SPEED_NORMAL: priority = PRIORITY_AVERAGE; break; - case SPEED_HIGH: priority = PRIORITY_FASTER; break; - default: priority = PRIORITY_AVERAGE; break; + case SPEED_LOW: priority = DLListDelegate::PRIORITY_SLOWER; break; + case SPEED_NORMAL: priority = DLListDelegate::PRIORITY_AVERAGE; break; + case SPEED_HIGH: priority = DLListDelegate::PRIORITY_FASTER; break; + default: priority = DLListDelegate::PRIORITY_AVERAGE; break; } return QVariant(priority); } - case COLUMN_REMAINING: return QVariant((qlonglong)(fileInfo.size - fileInfo.transfered)); - case COLUMN_DOWNLOADTIME: return QVariant((qlonglong)(fileInfo.tfRate > 0)?( (fileInfo.size - fileInfo.transfered) / (fileInfo.tfRate * 1024.0) ) : 0); - case COLUMN_LASTDL: + case DLListDelegate::COLUMN_REMAINING: return QVariant((qlonglong)(fileInfo.size - fileInfo.transfered)); + case DLListDelegate::COLUMN_DOWNLOADTIME: return QVariant((qlonglong)(fileInfo.tfRate > 0)?( (fileInfo.size - fileInfo.transfered) / (fileInfo.tfRate * 1024.0) ) : 0); + case DLListDelegate::COLUMN_LASTDL: { qint64 qi64LastDL = fileInfo.lastTS ; @@ -437,7 +437,7 @@ public: } return QVariant(qi64LastDL) ; } - case COLUMN_PATH: + case DLListDelegate::COLUMN_PATH: { QString strPath = QString::fromUtf8(fileInfo.path.c_str()); QString strPathAfterDL = strPath; @@ -446,7 +446,7 @@ public: return QVariant(strPathAfterDL); } - case COLUMN_SOURCES: + case DLListDelegate::COLUMN_SOURCES: { int active = 0; //QString fileHash = QString::fromStdString(fileInfo.hash.toStdString()); @@ -478,9 +478,9 @@ public: } - case COLUMN_SIZE: return QVariant((qlonglong) fileInfo.size); + case DLListDelegate::COLUMN_SIZE: return QVariant((qlonglong) fileInfo.size); - case COLUMN_ID: return QVariant(QString::fromStdString(fileInfo.hash.toStdString())); + case DLListDelegate::COLUMN_ID: return QVariant(QString::fromStdString(fileInfo.hash.toStdString())); default: return QVariant("[ TODO ]"); @@ -492,16 +492,16 @@ public: switch(col) { default: - case COLUMN_SOURCES: - case COLUMN_COMPLETED: - case COLUMN_REMAINING: - case COLUMN_LASTDL: - case COLUMN_ID: - case COLUMN_PATH: - case COLUMN_DOWNLOADTIME: - case COLUMN_SIZE: return QVariant(); - case COLUMN_PROGRESS: return QVariant( (fileInfo.size>0)?((fileInfo.peers[source_id].transfered % chunk_size)*100.0/fileInfo.size):0.0) ; - case COLUMN_DLSPEED: + case DLListDelegate::COLUMN_SOURCES: + case DLListDelegate::COLUMN_COMPLETED: + case DLListDelegate::COLUMN_REMAINING: + case DLListDelegate::COLUMN_LASTDL: + case DLListDelegate::COLUMN_ID: + case DLListDelegate::COLUMN_PATH: + case DLListDelegate::COLUMN_DOWNLOADTIME: + case DLListDelegate::COLUMN_SIZE: return QVariant(); + case DLListDelegate::COLUMN_PROGRESS: return QVariant( (fileInfo.size>0)?((fileInfo.peers[source_id].transfered % chunk_size)*100.0/fileInfo.size):0.0) ; + case DLListDelegate::COLUMN_DLSPEED: { double peerDlspeed = 0; if((uint32_t)fileInfo.peers[source_id].status == FT_STATE_DOWNLOADING && fileInfo.downloadStatus != FT_STATE_PAUSED && fileInfo.downloadStatus != FT_STATE_COMPLETE) @@ -509,13 +509,13 @@ public: return QVariant((double)peerDlspeed) ; } - case COLUMN_NAME: + case DLListDelegate::COLUMN_NAME: { QString iconName,tooltip; return QVariant(TransfersDialog::getPeerName(fileInfo.peers[source_id].peerId, iconName, tooltip)); } - case COLUMN_PRIORITY: return QVariant((double)PRIORITY_NULL); + case DLListDelegate::COLUMN_PRIORITY: return QVariant((double)DLListDelegate::PRIORITY_NULL); } } @@ -527,7 +527,7 @@ public: if(source_id == -1) switch(col) { - case COLUMN_PROGRESS: + case DLListDelegate::COLUMN_PROGRESS: { FileChunksInfo fcinfo; if (!rsFiles->FileDownloadChunksDetails(fileInfo.hash, fcinfo)) @@ -554,7 +554,7 @@ public: return QVariant::fromValue(pinfo); } - case COLUMN_ID: return QVariant(QString::fromStdString(fileInfo.hash.toStdString())); + case DLListDelegate::COLUMN_ID: return QVariant(QString::fromStdString(fileInfo.hash.toStdString())); default: @@ -563,7 +563,7 @@ public: else switch(col) { - case COLUMN_PROGRESS: + case DLListDelegate::COLUMN_PROGRESS: { FileChunksInfo fcinfo; if (!rsFiles->FileDownloadChunksDetails(fileInfo.hash, fcinfo)) @@ -582,7 +582,7 @@ public: return QVariant::fromValue(pinfo); } - case COLUMN_ID: return QVariant(QString::fromStdString(fileInfo.hash.toStdString()) + QString::fromStdString(fileInfo.peers[source_id].peerId.toStdString())); + case DLListDelegate::COLUMN_ID: return QVariant(QString::fromStdString(fileInfo.hash.toStdString()) + QString::fromStdString(fileInfo.peers[source_id].peerId.toStdString())); default: return QVariant(); @@ -592,7 +592,7 @@ public: QVariant decorationRole(const FileInfo& fileInfo,int source_id,int col) const { - if(col == COLUMN_NAME) + if(col == DLListDelegate::COLUMN_NAME) { if(source_id == -1) return QVariant(FilesDefs::getIconFromFileType(QString::fromUtf8(fileInfo.fname.c_str()))); @@ -666,7 +666,7 @@ public: if(fileInfo.downloadStatus == FT_STATE_DOWNLOADING || old_status != fileInfo.downloadStatus) { - QModelIndex topLeft = createIndex(i,0), bottomRight = createIndex(i, COLUMN_COUNT-1); + QModelIndex topLeft = createIndex(i,0), bottomRight = createIndex(i, DLListDelegate::COLUMN_COUNT-1); emit dataChanged(topLeft, bottomRight); } @@ -674,7 +674,7 @@ public: // // if(!mDownloads.empty()) // { - // QModelIndex topLeft = createIndex(0,0), bottomRight = createIndex(mDownloads.size()-1, COLUMN_COUNT-1); + // QModelIndex topLeft = createIndex(0,0), bottomRight = createIndex(mDownloads.size()-1, DLListDelegate::COLUMN_COUNT-1); // emit dataChanged(topLeft, bottomRight); // mDownloads[i] = fileInfo ; // } @@ -761,8 +761,8 @@ public: return QStandardItem::operator<(other); } - QStandardItem *myName = myParent->child(index().row(), COLUMN_NAME); - QStandardItem *otherName = otherParent->child(other.index().row(), COLUMN_NAME); + QStandardItem *myName = myParent->child(index().row(), DLListDelegate::COLUMN_NAME); + QStandardItem *otherName = otherParent->child(other.index().row(), DLListDelegate::COLUMN_NAME); if (header == NULL || header->sortIndicatorOrder() == Qt::AscendingOrder) { /* Ascending */ @@ -847,41 +847,41 @@ TransfersDialog::TransfersDialog(QWidget *parent) // /* Set header resize modes and initial section sizes Downloads TreeView*/ QHeaderView * dlheader = ui.downloadList->header () ; - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_NAME, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_SIZE, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_COMPLETED, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_DLSPEED, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_PROGRESS, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_SOURCES, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_STATUS, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_PRIORITY, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_REMAINING, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_DOWNLOADTIME, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_ID, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_LASTDL, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(dlheader, COLUMN_PATH, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_NAME, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_SIZE, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_COMPLETED, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_DLSPEED, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_PROGRESS, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_SOURCES, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_STATUS, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_PRIORITY, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_REMAINING, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_DOWNLOADTIME, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_ID, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_LASTDL, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(dlheader, DLListDelegate::COLUMN_PATH, QHeaderView::Interactive); // set default column and sort order for download - ui.downloadList->sortByColumn(COLUMN_NAME, Qt::AscendingOrder); + ui.downloadList->sortByColumn(DLListDelegate::COLUMN_NAME, Qt::AscendingOrder); connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString))); /* Add filter actions */ - QString headerName = DLListModel->headerData(COLUMN_NAME, Qt::Horizontal).toString(); - ui.filterLineEdit->addFilter(QIcon(), headerName, COLUMN_NAME , QString("%1 %2").arg(tr("Search"), headerName)); - QString headerID = DLListModel->headerData(COLUMN_ID, Qt::Horizontal).toString(); - ui.filterLineEdit->addFilter(QIcon(), headerID, COLUMN_ID , QString("%1 %2").arg(tr("Search"), headerID)); + QString headerName = DLListModel->headerData(DLListDelegate::COLUMN_NAME, Qt::Horizontal).toString(); + ui.filterLineEdit->addFilter(QIcon(), headerName, DLListDelegate::COLUMN_NAME , QString("%1 %2").arg(tr("Search"), headerName)); + QString headerID = DLListModel->headerData(DLListDelegate::COLUMN_ID, Qt::Horizontal).toString(); + ui.filterLineEdit->addFilter(QIcon(), headerID, DLListDelegate::COLUMN_ID , QString("%1 %2").arg(tr("Search"), headerID)); connect( ui.uploadsList, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( uploadsListCustomPopupMenu( QPoint ) ) ); // Set Upload list model - ULListModel = new QStandardItemModel(0,COLUMN_UCOUNT); - ULListModel->setHeaderData(COLUMN_UNAME, Qt::Horizontal, tr("Name", "i.e: file name")); - ULListModel->setHeaderData(COLUMN_UPEER, Qt::Horizontal, tr("Peer", "i.e: user name / tunnel id")); - ULListModel->setHeaderData(COLUMN_USIZE, Qt::Horizontal, tr("Size", "i.e: file size")); - ULListModel->setHeaderData(COLUMN_UTRANSFERRED, Qt::Horizontal, tr("Transferred", "")); - ULListModel->setHeaderData(COLUMN_ULSPEED, Qt::Horizontal, tr("Speed", "i.e: upload speed")); - ULListModel->setHeaderData(COLUMN_UPROGRESS, Qt::Horizontal, tr("Progress", "i.e: % uploaded")); - ULListModel->setHeaderData(COLUMN_UHASH, Qt::Horizontal, tr("Hash", "")); + ULListModel = new QStandardItemModel(0,ULListDelegate::COLUMN_UCOUNT); + ULListModel->setHeaderData(ULListDelegate::COLUMN_UNAME, Qt::Horizontal, tr("Name", "i.e: file name")); + ULListModel->setHeaderData(ULListDelegate::COLUMN_UPEER, Qt::Horizontal, tr("Peer", "i.e: user name / tunnel id")); + ULListModel->setHeaderData(ULListDelegate::COLUMN_USIZE, Qt::Horizontal, tr("Size", "i.e: file size")); + ULListModel->setHeaderData(ULListDelegate::COLUMN_UTRANSFERRED, Qt::Horizontal, tr("Transferred", "")); + ULListModel->setHeaderData(ULListDelegate::COLUMN_ULSPEED, Qt::Horizontal, tr("Speed", "i.e: upload speed")); + ULListModel->setHeaderData(ULListDelegate::COLUMN_UPROGRESS, Qt::Horizontal, tr("Progress", "i.e: % uploaded")); + ULListModel->setHeaderData(ULListDelegate::COLUMN_UHASH, Qt::Horizontal, tr("Hash", "")); ui.uploadsList->setModel(ULListModel); @@ -901,22 +901,22 @@ TransfersDialog::TransfersDialog(QWidget *parent) /* Set header resize modes and initial section sizes Uploads TreeView*/ QHeaderView * upheader = ui.uploadsList->header () ; - QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UNAME, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UPEER, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_USIZE, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UTRANSFERRED, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_ULSPEED, QHeaderView::Interactive); - QHeaderView_setSectionResizeModeColumn(upheader, COLUMN_UPROGRESS, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(upheader, ULListDelegate::COLUMN_UNAME, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(upheader, ULListDelegate::COLUMN_UPEER, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(upheader, ULListDelegate::COLUMN_USIZE, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(upheader, ULListDelegate::COLUMN_UTRANSFERRED, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(upheader, ULListDelegate::COLUMN_ULSPEED, QHeaderView::Interactive); + QHeaderView_setSectionResizeModeColumn(upheader, ULListDelegate::COLUMN_UPROGRESS, QHeaderView::Interactive); - upheader->resizeSection ( COLUMN_UNAME, 260 ); - upheader->resizeSection ( COLUMN_UPEER, 120 ); - upheader->resizeSection ( COLUMN_USIZE, 70 ); - upheader->resizeSection ( COLUMN_UTRANSFERRED, 75 ); - upheader->resizeSection ( COLUMN_ULSPEED, 75 ); - upheader->resizeSection ( COLUMN_UPROGRESS, 170 ); + upheader->resizeSection ( ULListDelegate::COLUMN_UNAME, 260 ); + upheader->resizeSection ( ULListDelegate::COLUMN_UPEER, 120 ); + upheader->resizeSection ( ULListDelegate::COLUMN_USIZE, 70 ); + upheader->resizeSection ( ULListDelegate::COLUMN_UTRANSFERRED, 75 ); + upheader->resizeSection ( ULListDelegate::COLUMN_ULSPEED, 75 ); + upheader->resizeSection ( ULListDelegate::COLUMN_UPROGRESS, 170 ); // set default column and sort order for upload - ui.uploadsList->sortByColumn(COLUMN_UNAME, Qt::AscendingOrder); + ui.uploadsList->sortByColumn(ULListDelegate::COLUMN_UNAME, Qt::AscendingOrder); QObject::connect(ui.downloadList->selectionModel(),SIGNAL(selectionChanged (const QItemSelection&, const QItemSelection&)),this,SLOT(showFileDetails())) ; @@ -1174,18 +1174,18 @@ void TransfersDialog::processSettings(bool bLoad) // state of splitter ui.splitter->restoreState(Settings->value("Splitter").toByteArray()); - setShowDLSizeColumn(Settings->value("showDLSizeColumn", !ui.downloadList->isColumnHidden(COLUMN_SIZE)).toBool()); - setShowDLCompleteColumn(Settings->value("showDLCompleteColumn", !ui.downloadList->isColumnHidden(COLUMN_COMPLETED)).toBool()); - setShowDLDLSpeedColumn(Settings->value("showDLDLSpeedColumn", !ui.downloadList->isColumnHidden(COLUMN_DLSPEED)).toBool()); - setShowDLProgressColumn(Settings->value("showDLProgressColumn", !ui.downloadList->isColumnHidden(COLUMN_PROGRESS)).toBool()); - setShowDLSourcesColumn(Settings->value("showDLSourcesColumn", !ui.downloadList->isColumnHidden(COLUMN_SOURCES)).toBool()); - setShowDLStatusColumn(Settings->value("showDLStatusColumn", !ui.downloadList->isColumnHidden(COLUMN_STATUS)).toBool()); - setShowDLPriorityColumn(Settings->value("showDLPriorityColumn", !ui.downloadList->isColumnHidden(COLUMN_PRIORITY)).toBool()); - setShowDLRemainingColumn(Settings->value("showDLRemainingColumn", !ui.downloadList->isColumnHidden(COLUMN_REMAINING)).toBool()); - setShowDLDownloadTimeColumn(Settings->value("showDLDownloadTimeColumn", !ui.downloadList->isColumnHidden(COLUMN_DOWNLOADTIME)).toBool()); - setShowDLIDColumn(Settings->value("showDLIDColumn", !ui.downloadList->isColumnHidden(COLUMN_ID)).toBool()); - setShowDLLastDLColumn(Settings->value("showDLLastDLColumn", !ui.downloadList->isColumnHidden(COLUMN_LASTDL)).toBool()); - setShowDLPath(Settings->value("showDLPath", !ui.downloadList->isColumnHidden(COLUMN_PATH)).toBool()); + setShowDLSizeColumn(Settings->value("showDLSizeColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_SIZE)).toBool()); + setShowDLCompleteColumn(Settings->value("showDLCompleteColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_COMPLETED)).toBool()); + setShowDLDLSpeedColumn(Settings->value("showDLDLSpeedColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_DLSPEED)).toBool()); + setShowDLProgressColumn(Settings->value("showDLProgressColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PROGRESS)).toBool()); + setShowDLSourcesColumn(Settings->value("showDLSourcesColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_SOURCES)).toBool()); + setShowDLStatusColumn(Settings->value("showDLStatusColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_STATUS)).toBool()); + setShowDLPriorityColumn(Settings->value("showDLPriorityColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PRIORITY)).toBool()); + setShowDLRemainingColumn(Settings->value("showDLRemainingColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_REMAINING)).toBool()); + setShowDLDownloadTimeColumn(Settings->value("showDLDownloadTimeColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_DOWNLOADTIME)).toBool()); + setShowDLIDColumn(Settings->value("showDLIDColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_ID)).toBool()); + setShowDLLastDLColumn(Settings->value("showDLLastDLColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_LASTDL)).toBool()); + setShowDLPath(Settings->value("showDLPath", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PATH)).toBool()); // selected tab ui.tabWidget->setCurrentIndex(Settings->value("selectedTab").toInt()); @@ -1199,18 +1199,18 @@ void TransfersDialog::processSettings(bool bLoad) // state of splitter Settings->setValue("Splitter", ui.splitter->saveState()); - Settings->setValue("showDLSizeColumn", !ui.downloadList->isColumnHidden(COLUMN_SIZE)); - Settings->setValue("showDLCompleteColumn", !ui.downloadList->isColumnHidden(COLUMN_COMPLETED)); - Settings->setValue("showDLDLSpeedColumn", !ui.downloadList->isColumnHidden(COLUMN_DLSPEED)); - Settings->setValue("showDLProgressColumn", !ui.downloadList->isColumnHidden(COLUMN_PROGRESS)); - Settings->setValue("showDLSourcesColumn", !ui.downloadList->isColumnHidden(COLUMN_SOURCES)); - Settings->setValue("showDLStatusColumn", !ui.downloadList->isColumnHidden(COLUMN_STATUS)); - Settings->setValue("showDLPriorityColumn", !ui.downloadList->isColumnHidden(COLUMN_PRIORITY)); - Settings->setValue("showDLRemainingColumn", !ui.downloadList->isColumnHidden(COLUMN_REMAINING)); - Settings->setValue("showDLDownloadTimeColumn", !ui.downloadList->isColumnHidden(COLUMN_DOWNLOADTIME)); - Settings->setValue("showDLIDColumn", !ui.downloadList->isColumnHidden(COLUMN_ID)); - Settings->setValue("showDLLastDLColumn", !ui.downloadList->isColumnHidden(COLUMN_LASTDL)); - Settings->setValue("showDLPath", !ui.downloadList->isColumnHidden(COLUMN_PATH)); + Settings->setValue("showDLSizeColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_SIZE)); + Settings->setValue("showDLCompleteColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_COMPLETED)); + Settings->setValue("showDLDLSpeedColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_DLSPEED)); + Settings->setValue("showDLProgressColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PROGRESS)); + Settings->setValue("showDLSourcesColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_SOURCES)); + Settings->setValue("showDLStatusColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_STATUS)); + Settings->setValue("showDLPriorityColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PRIORITY)); + Settings->setValue("showDLRemainingColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_REMAINING)); + Settings->setValue("showDLDownloadTimeColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_DOWNLOADTIME)); + Settings->setValue("showDLIDColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_ID)); + Settings->setValue("showDLLastDLColumn", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_LASTDL)); + Settings->setValue("showDLPath", !ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PATH)); // selected tab Settings->setValue("selectedTab", ui.tabWidget->currentIndex()); @@ -1423,18 +1423,18 @@ void TransfersDialog::downloadListHeaderCustomPopupMenu( QPoint /*point*/ ) std::cerr << "TransfersDialog::downloadListHeaderCustomPopupMenu()" << std::endl; QMenu contextMnu( this ); - showDLSizeAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_SIZE)); - showDLCompleteAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_COMPLETED)); - showDLDLSpeedAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_DLSPEED)); - showDLProgressAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_PROGRESS)); - showDLSourcesAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_SOURCES)); - showDLStatusAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_STATUS)); - showDLPriorityAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_PRIORITY)); - showDLRemainingAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_REMAINING)); - showDLDownloadTimeAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_DOWNLOADTIME)); - showDLIDAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_ID)); - showDLLastDLAct->setChecked(!ui.downloadList->isColumnHidden(COLUMN_LASTDL)); - showDLPath->setChecked(!ui.downloadList->isColumnHidden(COLUMN_PATH)); + showDLSizeAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_SIZE)); + showDLCompleteAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_COMPLETED)); + showDLDLSpeedAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_DLSPEED)); + showDLProgressAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PROGRESS)); + showDLSourcesAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_SOURCES)); + showDLStatusAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_STATUS)); + showDLPriorityAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PRIORITY)); + showDLRemainingAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_REMAINING)); + showDLDownloadTimeAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_DOWNLOADTIME)); + showDLIDAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_ID)); + showDLLastDLAct->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_LASTDL)); + showDLPath->setChecked(!ui.downloadList->isColumnHidden(DLListDelegate::COLUMN_PATH)); QMenu *menu = contextMnu.addMenu(tr("Columns")); menu->addAction(showDLSizeAct); @@ -1486,12 +1486,12 @@ void TransfersDialog::uploadsListHeaderCustomPopupMenu( QPoint /*point*/ ) std::cerr << "TransfersDialog::uploadsListHeaderCustomPopupMenu()" << std::endl; QMenu contextMnu( this ); - showULPeerAct->setChecked(!ui.uploadsList->isColumnHidden(COLUMN_UPEER)); - showULSizeAct->setChecked(!ui.uploadsList->isColumnHidden(COLUMN_USIZE)); - showULTransferredAct->setChecked(!ui.uploadsList->isColumnHidden(COLUMN_UTRANSFERRED)); - showULSpeedAct->setChecked(!ui.uploadsList->isColumnHidden(COLUMN_ULSPEED)); - showULProgressAct->setChecked(!ui.uploadsList->isColumnHidden(COLUMN_UPROGRESS)); - showULHashAct->setChecked(!ui.uploadsList->isColumnHidden(COLUMN_UHASH)); + showULPeerAct->setChecked(!ui.uploadsList->isColumnHidden(ULListDelegate::COLUMN_UPEER)); + showULSizeAct->setChecked(!ui.uploadsList->isColumnHidden(ULListDelegate::COLUMN_USIZE)); + showULTransferredAct->setChecked(!ui.uploadsList->isColumnHidden(ULListDelegate::COLUMN_UTRANSFERRED)); + showULSpeedAct->setChecked(!ui.uploadsList->isColumnHidden(ULListDelegate::COLUMN_ULSPEED)); + showULProgressAct->setChecked(!ui.uploadsList->isColumnHidden(ULListDelegate::COLUMN_UPROGRESS)); + showULHashAct->setChecked(!ui.uploadsList->isColumnHidden(ULListDelegate::COLUMN_UHASH)); QMenu *menu = contextMnu.addMenu(tr("Columns")); menu->addAction(showULPeerAct); @@ -1554,20 +1554,20 @@ int TransfersDialog::addULItem(int row, const FileInfo &fileInfo) // change progress column to own class for sorting //ULListModel->setItem(row, COLUMN_UPROGRESS, new ProgressItem(NULL)); - ULListModel->setData(ULListModel->index(row, COLUMN_UNAME), fileName); - ULListModel->setData(ULListModel->index(row, COLUMN_UNAME), FilesDefs::getIconFromFileType(fileName), Qt::DecorationRole); - ULListModel->setData(ULListModel->index(row, COLUMN_UHASH), fileHash); - ULListModel->setData(ULListModel->index(row, COLUMN_UHASH), fileHash, Qt::UserRole); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UNAME), fileName); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UNAME), FilesDefs::getIconFromFileType(fileName), Qt::DecorationRole); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UHASH), fileHash); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UHASH), fileHash, Qt::UserRole); } - ULListModel->setData(ULListModel->index(row, COLUMN_USIZE), QVariant((qlonglong)fileSize)); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_USIZE), QVariant((qlonglong)fileSize)); //Reset Parent info if child present - ULListModel->setData(ULListModel->index(row, COLUMN_UPEER), QVariant(QString(tr("%1 tunnels").arg(fileInfo.peers.size()))) ); - ULListModel->setData(ULListModel->index(row, COLUMN_UPEER), QIcon(), Qt::DecorationRole); - ULListModel->setData(ULListModel->index(row, COLUMN_UPEER), QVariant(), Qt::ToolTipRole); - ULListModel->setData(ULListModel->index(row, COLUMN_UTRANSFERRED), QVariant()); - ULListModel->setData(ULListModel->index(row, COLUMN_UPROGRESS), QVariant()); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPEER), QVariant(QString(tr("%1 tunnels").arg(fileInfo.peers.size()))) ); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPEER), QIcon(), Qt::DecorationRole); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPEER), QVariant(), Qt::ToolTipRole); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UTRANSFERRED), QVariant()); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPROGRESS), QVariant()); QStandardItem *ulItem = ULListModel->item(row); std::set used_rows ; @@ -1617,11 +1617,11 @@ int TransfersDialog::addULItem(int row, const FileInfo &fileInfo) //Only one peer so update parent QString iconName; QString tooltip; - ULListModel->setData(ULListModel->index(row, COLUMN_UPEER), QVariant(getPeerName(transferInfo.peerId, iconName, tooltip))); - ULListModel->setData(ULListModel->index(row, COLUMN_UPEER), QIcon(iconName), Qt::DecorationRole); - ULListModel->setData(ULListModel->index(row, COLUMN_UPEER), QVariant(tooltip), Qt::ToolTipRole); - ULListModel->setData(ULListModel->index(row, COLUMN_UTRANSFERRED), QVariant(completed)); - ULListModel->setData(ULListModel->index(row, COLUMN_UPROGRESS), QVariant::fromValue(peerpinfo)); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPEER), QVariant(getPeerName(transferInfo.peerId, iconName, tooltip))); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPEER), QIcon(iconName), Qt::DecorationRole); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPEER), QVariant(tooltip), Qt::ToolTipRole); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UTRANSFERRED), QVariant(completed)); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_UPROGRESS), QVariant::fromValue(peerpinfo)); } else { int row_id = addPeerToULItem(ulItem, transferInfo.peerId, hashFileAndPeerId, completed, peerULSpeed, peerpinfo); @@ -1632,7 +1632,7 @@ int TransfersDialog::addULItem(int row, const FileInfo &fileInfo) } // Update Parent UpLoad Speed - ULListModel->setData(ULListModel->index(row, COLUMN_ULSPEED), QVariant((double)peerULSpeedTotal)); + ULListModel->setData(ULListModel->index(row, ULListDelegate::COLUMN_ULSPEED), QVariant((double)peerULSpeedTotal)); // This is not optimal, but we deal with a small number of elements. The reverse order is really important, @@ -1653,7 +1653,7 @@ int TransfersDialog::addPeerToULItem(QStandardItem *ulItem, const RsPeerId& peer int childRow = -1; QStandardItem *childId = NULL; - for (int count = 0; (childId = ulItem->child(count, COLUMN_UHASH)) != NULL; ++count) { + for (int count = 0; (childId = ulItem->child(count, ULListDelegate::COLUMN_UHASH)) != NULL; ++count) { if (childId->data(Qt::UserRole).toString() == coreID) { childRow = count; break; @@ -1700,9 +1700,9 @@ int TransfersDialog::addPeerToULItem(QStandardItem *ulItem, const RsPeerId& peer childRow = ulItem->rowCount() - 1; } else { // just update the child (peer) - ulItem->child(childRow, COLUMN_ULSPEED)->setData(QVariant((double)ulspeed), Qt::DisplayRole); - ulItem->child(childRow, COLUMN_UTRANSFERRED)->setData(QVariant((qlonglong)completed), Qt::DisplayRole); - ulItem->child(childRow, COLUMN_UPROGRESS)->setData(QVariant::fromValue(peerInfo), Qt::DisplayRole); + ulItem->child(childRow, ULListDelegate::COLUMN_ULSPEED)->setData(QVariant((double)ulspeed), Qt::DisplayRole); + ulItem->child(childRow, ULListDelegate::COLUMN_UTRANSFERRED)->setData(QVariant((qlonglong)completed), Qt::DisplayRole); + ulItem->child(childRow, ULListDelegate::COLUMN_UPROGRESS)->setData(QVariant::fromValue(peerInfo), Qt::DisplayRole); } return childRow; @@ -1743,7 +1743,7 @@ void TransfersDialog::insertTransfers() int rowCount = ULListModel->rowCount(); for (int row = 0; row < rowCount; ) { - RsFileHash hash ( ULListModel->item(row, COLUMN_UHASH)->data(Qt::UserRole).toString().toStdString()); + RsFileHash hash ( ULListModel->item(row, ULListDelegate::COLUMN_UHASH)->data(Qt::UserRole).toString().toStdString()); std::set::iterator hashIt = hashs.find(hash); if (hashIt == hashs.end()) { @@ -1976,13 +1976,13 @@ void TransfersDialog::getDLSelectedItems(std::set *ids, std::setclear(); if (rows) rows->clear(); - QModelIndexList selectedRows = selection->selectedRows(COLUMN_ID); + QModelIndexList selectedRows = selection->selectedRows(DLListDelegate::COLUMN_ID); int i, imax = selectedRows.count(); for (i = 0; i < imax; ++i) { QModelIndex index = selectedRows.at(i); if (index.parent().isValid() && index.model()) - index = index.model()->index(index.parent().row(), COLUMN_ID); + index = index.model()->index(index.parent().row(), DLListDelegate::COLUMN_ID); if (ids) { ids->insert(RsFileHash(index.data(Qt::DisplayRole).toString().toStdString())); @@ -2010,7 +2010,7 @@ void TransfersDialog::getULSelectedItems(std::set *ids, std::setitem(index.row(), COLUMN_UHASH); + QStandardItem *id = ULListModel->item(index.row(), ULListDelegate::COLUMN_UHASH); ids->insert(RsFileHash(id->data(Qt::DisplayRole).toString().toStdString())); } if (rows) { @@ -2383,72 +2383,72 @@ return 0.0 ; double TransfersDialog::getSpeed(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_DLSPEED), Qt::DisplayRole).toDouble(); + return model->data(model->index(row, DLListDelegate::COLUMN_DLSPEED), Qt::DisplayRole).toDouble(); } QString TransfersDialog::getFileName(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_NAME), Qt::DisplayRole).toString(); + return model->data(model->index(row, DLListDelegate::COLUMN_NAME), Qt::DisplayRole).toString(); } QString TransfersDialog::getStatus(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_STATUS), Qt::DisplayRole).toString(); + return model->data(model->index(row, DLListDelegate::COLUMN_STATUS), Qt::DisplayRole).toString(); } QString TransfersDialog::getID(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_ID), Qt::UserRole).toString().left(40); // gets only the "hash" part of the name + return model->data(model->index(row, DLListDelegate::COLUMN_ID), Qt::UserRole).toString().left(40); // gets only the "hash" part of the name } QString TransfersDialog::getID(int row, QSortFilterProxyModel *filter) { - QModelIndex index = filter->mapToSource(filter->index(row, COLUMN_ID)); + QModelIndex index = filter->mapToSource(filter->index(row, DLListDelegate::COLUMN_ID)); return filter->sourceModel()->data(index, Qt::UserRole).toString().left(40); // gets only the "hash" part of the name } QString TransfersDialog::getPriority(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_PRIORITY), Qt::DisplayRole).toString(); + return model->data(model->index(row, DLListDelegate::COLUMN_PRIORITY), Qt::DisplayRole).toString(); } qlonglong TransfersDialog::getFileSize(int row, QStandardItemModel *model) { bool ok = false; - return model->data(model->index(row, COLUMN_SIZE), Qt::DisplayRole).toULongLong(&ok); + return model->data(model->index(row, DLListDelegate::COLUMN_SIZE), Qt::DisplayRole).toULongLong(&ok); } qlonglong TransfersDialog::getTransfered(int row, QStandardItemModel *model) { bool ok = false; - return model->data(model->index(row, COLUMN_COMPLETED), Qt::DisplayRole).toULongLong(&ok); + return model->data(model->index(row, DLListDelegate::COLUMN_COMPLETED), Qt::DisplayRole).toULongLong(&ok); } qlonglong TransfersDialog::getRemainingTime(int row, QStandardItemModel *model) { bool ok = false; - return model->data(model->index(row, COLUMN_REMAINING), Qt::DisplayRole).toULongLong(&ok); + return model->data(model->index(row, DLListDelegate::COLUMN_REMAINING), Qt::DisplayRole).toULongLong(&ok); } qlonglong TransfersDialog::getDownloadTime(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_DOWNLOADTIME), Qt::DisplayRole).toULongLong(); + return model->data(model->index(row, DLListDelegate::COLUMN_DOWNLOADTIME), Qt::DisplayRole).toULongLong(); } qlonglong TransfersDialog::getLastDL(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_LASTDL), Qt::DisplayRole).toULongLong(); + return model->data(model->index(row, DLListDelegate::COLUMN_LASTDL), Qt::DisplayRole).toULongLong(); } qlonglong TransfersDialog::getPath(int row, QStandardItemModel *model) { - return model->data(model->index(row, COLUMN_PATH), Qt::DisplayRole).toULongLong(); + return model->data(model->index(row, DLListDelegate::COLUMN_PATH), Qt::DisplayRole).toULongLong(); } QString TransfersDialog::getSources(int row, QStandardItemModel *model) { - double dblValue = model->data(model->index(row, COLUMN_SOURCES), Qt::DisplayRole).toDouble(); + double dblValue = model->data(model->index(row, DLListDelegate::COLUMN_SOURCES), Qt::DisplayRole).toDouble(); QString temp = QString("%1 (%2)").arg((int)dblValue).arg((int)((fmod(dblValue,1)*1000)+0.5)); return temp; @@ -2608,25 +2608,25 @@ void TransfersDialog::collAutoOpen(const QString &fileHash) } } -void TransfersDialog::setShowDLSizeColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_SIZE, !show); } -void TransfersDialog::setShowDLCompleteColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_COMPLETED, !show); } -void TransfersDialog::setShowDLDLSpeedColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_DLSPEED, !show); } -void TransfersDialog::setShowDLProgressColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_PROGRESS, !show); } -void TransfersDialog::setShowDLSourcesColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_SOURCES, !show); } -void TransfersDialog::setShowDLStatusColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_STATUS, !show); } -void TransfersDialog::setShowDLPriorityColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_PRIORITY, !show); } -void TransfersDialog::setShowDLRemainingColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_REMAINING, !show); } -void TransfersDialog::setShowDLDownloadTimeColumn(bool show) { ui.downloadList->setColumnHidden(COLUMN_DOWNLOADTIME, !show); } -void TransfersDialog::setShowDLIDColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_ID, !show); } -void TransfersDialog::setShowDLLastDLColumn (bool show) { ui.downloadList->setColumnHidden(COLUMN_LASTDL, !show); } -void TransfersDialog::setShowDLPath (bool show) { ui.downloadList->setColumnHidden(COLUMN_PATH, !show); } +void TransfersDialog::setShowDLSizeColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_SIZE, !show); } +void TransfersDialog::setShowDLCompleteColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_COMPLETED, !show); } +void TransfersDialog::setShowDLDLSpeedColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_DLSPEED, !show); } +void TransfersDialog::setShowDLProgressColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_PROGRESS, !show); } +void TransfersDialog::setShowDLSourcesColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_SOURCES, !show); } +void TransfersDialog::setShowDLStatusColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_STATUS, !show); } +void TransfersDialog::setShowDLPriorityColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_PRIORITY, !show); } +void TransfersDialog::setShowDLRemainingColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_REMAINING, !show); } +void TransfersDialog::setShowDLDownloadTimeColumn(bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_DOWNLOADTIME, !show); } +void TransfersDialog::setShowDLIDColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_ID, !show); } +void TransfersDialog::setShowDLLastDLColumn (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_LASTDL, !show); } +void TransfersDialog::setShowDLPath (bool show) { ui.downloadList->setColumnHidden(DLListDelegate::COLUMN_PATH, !show); } -void TransfersDialog::setShowULPeerColumn (bool show) { ui.uploadsList->setColumnHidden(COLUMN_UPEER, !show); } -void TransfersDialog::setShowULSizeColumn (bool show) { ui.uploadsList->setColumnHidden(COLUMN_USIZE, !show); } -void TransfersDialog::setShowULTransferredColumn(bool show) { ui.uploadsList->setColumnHidden(COLUMN_UTRANSFERRED, !show); } -void TransfersDialog::setShowULSpeedColumn (bool show) { ui.uploadsList->setColumnHidden(COLUMN_ULSPEED, !show); } -void TransfersDialog::setShowULProgressColumn (bool show) { ui.uploadsList->setColumnHidden(COLUMN_UPROGRESS, !show); } -void TransfersDialog::setShowULHashColumn (bool show) { ui.uploadsList->setColumnHidden(COLUMN_UHASH, !show); } +void TransfersDialog::setShowULPeerColumn (bool show) { ui.uploadsList->setColumnHidden(ULListDelegate::COLUMN_UPEER, !show); } +void TransfersDialog::setShowULSizeColumn (bool show) { ui.uploadsList->setColumnHidden(ULListDelegate::COLUMN_USIZE, !show); } +void TransfersDialog::setShowULTransferredColumn(bool show) { ui.uploadsList->setColumnHidden(ULListDelegate::COLUMN_UTRANSFERRED, !show); } +void TransfersDialog::setShowULSpeedColumn (bool show) { ui.uploadsList->setColumnHidden(ULListDelegate::COLUMN_ULSPEED, !show); } +void TransfersDialog::setShowULProgressColumn (bool show) { ui.uploadsList->setColumnHidden(ULListDelegate::COLUMN_UPROGRESS, !show); } +void TransfersDialog::setShowULHashColumn (bool show) { ui.uploadsList->setColumnHidden(ULListDelegate::COLUMN_UHASH, !show); } void TransfersDialog::expandAllDL() { diff --git a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp index 8b379d780..6bad045e0 100644 --- a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp +++ b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.cpp @@ -25,26 +25,14 @@ Q_DECLARE_METATYPE(FileProgressInfo) -// Defines for upload list list columns -#define ULLISTDELEGATE_COLUMN_UNAME 0 -#define ULLISTDELEGATE_COLUMN_UPEER 1 -#define ULLISTDELEGATE_COLUMN_USIZE 2 -#define ULLISTDELEGATE_COLUMN_UTRANSFERRED 3 -#define ULLISTDELEGATE_COLUMN_ULSPEED 4 -#define ULLISTDELEGATE_COLUMN_UPROGRESS 5 -#define ULLISTDELEGATE_COLUMN_UHASH 6 -#define ULLISTDELEGATE_COLUMN_UCOUNT 7 - #define MAX_CHAR_TMP 128 ULListDelegate::ULListDelegate(QObject *parent) : QAbstractItemDelegate(parent) { - ; } ULListDelegate::~ULListDelegate(void) { - ; } void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const @@ -77,7 +65,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti // draw the background color bool bDrawBackground = true; - if(index.column() == ULLISTDELEGATE_COLUMN_UPROGRESS) { + if(index.column() == COLUMN_UPROGRESS) { FileProgressInfo pinfo = index.data().value() ; bDrawBackground = (pinfo.type == FileProgressInfo::UNINIT); } @@ -96,7 +84,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } switch(index.column()) { - case ULLISTDELEGATE_COLUMN_USIZE: + case COLUMN_USIZE: fileSize = index.data().toLongLong(); if(fileSize <= 0){ temp = ""; @@ -115,7 +103,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case ULLISTDELEGATE_COLUMN_UTRANSFERRED: + case COLUMN_UTRANSFERRED: transferred = index.data().toLongLong(); if(transferred <= 0){ temp = ""; @@ -134,7 +122,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case ULLISTDELEGATE_COLUMN_ULSPEED: + case COLUMN_ULSPEED: ulspeed = index.data().toDouble(); if (ulspeed <= 0) { temp = ""; @@ -145,7 +133,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignRight, temp); break; - case ULLISTDELEGATE_COLUMN_UPROGRESS: + case COLUMN_UPROGRESS: { FileProgressInfo pinfo = index.data().value() ; if (pinfo.type == FileProgressInfo::UNINIT) @@ -155,7 +143,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti painter->save() ; xProgressBar progressBar(pinfo,option.rect,painter,0);// the 3rd param is the color schema (0 is the default value) - QString ext = QFileInfo(QString::fromStdString(index.sibling(index.row(), ULLISTDELEGATE_COLUMN_UNAME).data().toString().toStdString())).suffix();; + QString ext = QFileInfo(QString::fromStdString(index.sibling(index.row(), COLUMN_UNAME).data().toString().toStdString())).suffix();; if (ext == "rsfc" || ext == "rsrl" || ext == "dist" || ext == "rsfb") progressBar.setColorSchema( 9); else @@ -169,8 +157,8 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti } painter->drawText(option.rect, Qt::AlignCenter, newopt.text); break; - case ULLISTDELEGATE_COLUMN_UNAME: - case ULLISTDELEGATE_COLUMN_UPEER: + case COLUMN_UNAME: + case COLUMN_UPEER: // decoration value = index.data(Qt::DecorationRole); pixmap = qvariant_cast(value).pixmap(option.decorationSize, option.state & QStyle::State_Enabled ? QIcon::Normal : QIcon::Disabled, option.state & QStyle::State_Open ? QIcon::On : QIcon::Off); diff --git a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h index 2f3aa4139..fc65c3a8f 100644 --- a/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h +++ b/retroshare-gui/src/gui/FileTransfer/ULListDelegate.h @@ -18,30 +18,27 @@ * * *******************************************************************************/ -#ifndef ULLISTDELEGATE_H -#define ULLISTDELEGATE_H +#pragma once #include class QModelIndex; class QPainter; +class ULListDelegate: public QAbstractItemDelegate +{ +public: + ULListDelegate(QObject *parent=0); + ~ULListDelegate(); + void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const; + QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; -class ULListDelegate: public QAbstractItemDelegate { - - Q_OBJECT - - public: - ULListDelegate(QObject *parent=0); - ~ULListDelegate(); - void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const; - QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; - - private: - - public slots: - - signals: + static constexpr int COLUMN_UNAME = 0; + static constexpr int COLUMN_UPEER = 1; + static constexpr int COLUMN_USIZE = 2; + static constexpr int COLUMN_UTRANSFERRED = 3; + static constexpr int COLUMN_ULSPEED = 4; + static constexpr int COLUMN_UPROGRESS = 5; + static constexpr int COLUMN_UHASH = 6; + static constexpr int COLUMN_UCOUNT = 7; }; -#endif - diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 974715d63..de2ca8baf 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -466,10 +466,8 @@ void MainWindow::initStackedPage() } #ifndef RS_RELEASE_VERSION -#ifdef PLUGINMGR addPage(pluginsPage = new gui::PluginsPage(ui->stackPages), grp, NULL); #endif -#endif #undef GETSTARTED_GUI #ifdef GETSTARTED_GUI diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp index 1b02cbc7c..216117f67 100644 --- a/retroshare-gui/src/gui/NetworkDialog.cpp +++ b/retroshare-gui/src/gui/NetworkDialog.cpp @@ -73,7 +73,7 @@ NetworkDialog::NetworkDialog(QWidget */*parent*/) PGPIdItemProxy = new pgpid_item_proxy(this); connect(ui.onlyTrustedKeys, SIGNAL(toggled(bool)), PGPIdItemProxy, SLOT(use_only_trusted_keys(bool))); PGPIdItemProxy->setSourceModel(PGPIdItemModel); - PGPIdItemProxy->setFilterKeyColumn(COLUMN_PEERNAME); + PGPIdItemProxy->setFilterKeyColumn(pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERNAME); PGPIdItemProxy->setFilterCaseSensitivity(Qt::CaseInsensitive); PGPIdItemProxy->setSortRole(Qt::EditRole); //use edit role to get raw data since we do not have edit for this model. ui.connectTreeWidget->setModel(PGPIdItemProxy); @@ -90,9 +90,9 @@ NetworkDialog::NetworkDialog(QWidget */*parent*/) ui.onlyTrustedKeys->setMinimumWidth(20*f); /* add filter actions */ - ui.filterLineEdit->addFilter(QIcon(), tr("Name"), COLUMN_PEERNAME, tr("Search name")); - ui.filterLineEdit->addFilter(QIcon(), tr("Peer ID"), COLUMN_PEERID, tr("Search peer ID")); - ui.filterLineEdit->setCurrentFilter(COLUMN_PEERNAME); + ui.filterLineEdit->addFilter(QIcon(), tr("Name"), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERNAME, tr("Search name")); + ui.filterLineEdit->addFilter(QIcon(), tr("Peer ID"), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID, tr("Search peer ID")); + ui.filterLineEdit->setCurrentFilter(pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERNAME); connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), PGPIdItemProxy, SLOT(setFilterWildcard(QString))); } @@ -120,7 +120,7 @@ void NetworkDialog::connectTreeWidgetCostumPopupMenu( QPoint /*point*/ ) QMenu *contextMnu = new QMenu; - RsPgpId peer_id(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()) ; + RsPgpId peer_id(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID)).toString().toStdString()) ; // That's what context menus are made for RsPeerDetails detail; @@ -179,7 +179,7 @@ void NetworkDialog::removeSelectedKeys() return; std::set selected; - selected.insert(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString())); + selected.insert(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID)).toString().toStdString())); removeKeys(selected); } @@ -228,7 +228,7 @@ void NetworkDialog::denyFriend() if(l.empty()) return; - RsPgpId peer_id(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()); + RsPgpId peer_id(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID)).toString().toStdString()); rsPeers->removeFriend(peer_id) ; securedUpdateDisplay(); @@ -241,7 +241,7 @@ void NetworkDialog::makeFriend() if(l.empty()) return; - PGPKeyDialog::showIt(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()), PGPKeyDialog::PageDetails); + PGPKeyDialog::showIt(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID)).toString().toStdString()), PGPKeyDialog::PageDetails); } /** Shows Peer Information/Auth Dialog */ @@ -251,7 +251,7 @@ void NetworkDialog::peerdetails() if(l.empty()) return; - PGPKeyDialog::showIt(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()), PGPKeyDialog::PageDetails); + PGPKeyDialog::showIt(RsPgpId(ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID)).toString().toStdString()), PGPKeyDialog::PageDetails); } void NetworkDialog::copyLink() @@ -261,7 +261,7 @@ void NetworkDialog::copyLink() return; - RsPgpId peer_id (ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), COLUMN_PEERID)).toString().toStdString()) ; + RsPgpId peer_id (ui.connectTreeWidget->model()->data(ui.connectTreeWidget->model()->index(l.begin()->row(), pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID)).toString().toStdString()) ; QList urls; RetroShareLink link = RetroShareLink::createPerson(peer_id); diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp index 58a349514..016692092 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.cpp @@ -28,14 +28,6 @@ #define IMAGE_DENIED ":/images/denied16.png" #define IMAGE_TRUSTED ":/images/rs-2.png" -#define PGP_ITEM_MODEL_COLUMN_CHECK 0 -#define PGP_ITEM_MODEL_COLUMN_PEERNAME 1 -#define PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER 2 -#define PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME 3 -#define PGP_ITEM_MODEL_COLUMN_PEERID 4 -#define PGP_ITEM_MODEL_COLUMN_LAST_USED 5 -#define PGP_ITEM_MODEL_COLUMN_COUNT 6 - /*TODO: * using list here for internal data storage is not best option */ diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h index e33987acd..7a17f48cb 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_model.h @@ -48,6 +48,13 @@ public: void setBackgroundColorDenied(QColor color) { mBackgroundColorDenied = color; } void setTextColor(QColor color) { mTextColor = color; } + static constexpr int PGP_ITEM_MODEL_COLUMN_CHECK = 0; + static constexpr int PGP_ITEM_MODEL_COLUMN_PEERNAME = 1; + static constexpr int PGP_ITEM_MODEL_COLUMN_I_AUTH_PEER = 2; + static constexpr int PGP_ITEM_MODEL_COLUMN_PEER_AUTH_ME = 3; + static constexpr int PGP_ITEM_MODEL_COLUMN_PEERID = 4; + static constexpr int PGP_ITEM_MODEL_COLUMN_LAST_USED = 5; + static constexpr int PGP_ITEM_MODEL_COLUMN_COUNT = 6; public slots: void data_updated(std::list &new_neighs); diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.cpp b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.cpp index 29acee273..e7b81ef2b 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.cpp +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.cpp @@ -26,17 +26,13 @@ #include #include - -//TODO: set this defines in one place -// Defines for key list columns -#define COLUMN_CHECK 0 -#define COLUMN_PEERNAME 1 -#define COLUMN_I_AUTH_PEER 2 -#define COLUMN_PEER_AUTH_ME 3 -#define COLUMN_PEERID 4 -#define COLUMN_LAST_USED 5 -#define COLUMN_COUNT 6 - +bool pgpid_item_proxy::lessThan(const QModelIndex &left, const QModelIndex &right) const +{ + if(left.column() == pgpid_item_model::PGP_ITEM_MODEL_COLUMN_LAST_USED) + return left.data(Qt::EditRole).toUInt() < right.data(Qt::EditRole).toUInt(); + else + return left.data(Qt::DisplayRole).toString().toUpper() < right.data(Qt::DisplayRole).toString().toUpper(); +} pgpid_item_proxy::pgpid_item_proxy(QObject *parent) : @@ -57,7 +53,7 @@ bool pgpid_item_proxy::filterAcceptsRow(int sourceRow, const QModelIndex &source { if(!rsPeers) return false; - RsPgpId peer_id (sourceModel()->data(sourceModel()->index(sourceRow, COLUMN_PEERID, sourceParent)).toString().toStdString()); + RsPgpId peer_id (sourceModel()->data(sourceModel()->index(sourceRow, pgpid_item_model::PGP_ITEM_MODEL_COLUMN_PEERID, sourceParent)).toString().toStdString()); RsPeerDetails details; if(!rsPeers->getGPGDetails(peer_id, details)) return false; diff --git a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h index b892e093e..5608862a2 100644 --- a/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h +++ b/retroshare-gui/src/gui/NetworkDialog/pgpid_item_proxy.h @@ -34,14 +34,7 @@ class pgpid_item_proxy : public: pgpid_item_proxy(QObject *parent = nullptr); bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; - - bool lessThan(const QModelIndex &left, const QModelIndex &right) const override - { - if(left.column() == COLUMN_LAST_USED) - return left.data(Qt::EditRole).toUInt() < right.data(Qt::EditRole).toUInt(); - else - return left.data(Qt::DisplayRole).toString().toUpper() < right.data(Qt::DisplayRole).toString().toUpper(); - } + bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; public slots: void use_only_trusted_keys(bool val); From b3e6d96f3ba4d353e1767508ed75784fc0878247 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 27 Mar 2022 21:45:27 +0200 Subject: [PATCH 09/10] attempt to add samv3 to compilaiton --- retroshare-gui/CMakeLists.txt | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/CMakeLists.txt b/retroshare-gui/CMakeLists.txt index fdd204005..314edf1ab 100644 --- a/retroshare-gui/CMakeLists.txt +++ b/retroshare-gui/CMakeLists.txt @@ -84,7 +84,7 @@ find_package( Qt5 COMPONENTS Network REQUIRED) find_package( Qt5 COMPONENTS Multimedia REQUIRED) find_package( Qt5 COMPONENTS PrintSupport REQUIRED) -list( APPEND RS_LINK_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Network Qt5::PrintSupport) +list( APPEND RS_LINK_LIBRARIES Qt5::Multimedia Qt5::Widgets Qt5::Xml Qt5::Network Qt5::PrintSupport) ################################################################################ @@ -188,13 +188,13 @@ if(RS_JSON_API) target_compile_definitions(${PROJECT_NAME} PUBLIC RS_JSONAPI) endif(RS_JSON_API) -################################################################################ +################################# CMark ######################################## if(RS_GUI_CMARK) set(CMARK_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../supportlibs/cmark/") if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) message( STATUS "cmark submodule found at ${LIBRETROSHARE_DEVEL_DIR} using it" ) - add_subdirectory( "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" ) + add_subdirectory( "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/cmark" ) else() FetchContent_Declare( cmark @@ -208,6 +208,23 @@ if(RS_GUI_CMARK) endif() endif(RS_GUI_CMARK) +################################# LibSam v3 #################################### + +set(SAM3_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../supportlibs/libsam3/") +if(EXISTS "${SAM3_DEVEL_DIR}/.git" ) + message( STATUS "libsam3 submodule found at ${SAM3_DEVEL_DIR} using it" ) + add_subdirectory( "${SAM3_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libsam3" ) +else() + FetchContent_Declare( + libsam3 + GIT_REPOSITORY "https://github.com/i2p/libsam3.git" + GIT_TAG "origin/master" + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + TIMEOUT 10 + ) + FetchContent_MakeAvailable(libsam3) +endif() ################################################################################ # TODO # @@ -463,7 +480,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ${RS_LINK_LIBRARIES}) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/) set( CMAKE_CXX_FLAGS "-Wno-deprecated-declarations" ) -target_compile_definitions(${PROJECT_NAME} PUBLIC RS_NO_WARN_DEPRECATED ) +target_compile_definitions(${PROJECT_NAME} PUBLIC RS_NO_WARN_DEPRECATED ) +target_compile_definitions(${PROJECT_NAME} PRIVATE RS_RELEASE_VERSION ) target_compile_definitions(${PROJECT_NAME} PRIVATE TARGET=\"retroshare\") if(RS_GXS_CIRCLES) From 2cff9c8eb2ca8269397a78ca5ca937f3992498b5 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 30 Mar 2022 17:06:49 +0200 Subject: [PATCH 10/10] fixed compilation --- retroshare-gui/src/gui/FileTransfer/DLListDelegate.h | 1 - 1 file changed, 1 deletion(-) diff --git a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h index 109d16ed3..19b9306a5 100644 --- a/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h +++ b/retroshare-gui/src/gui/FileTransfer/DLListDelegate.h @@ -22,7 +22,6 @@ #include #include "xprogressbar.h" -#include "FTListDelegate.h" class QModelIndex; class QPainter;