-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: IonutMuthi <[email protected]>
- Loading branch information
1 parent
72ef3a8
commit dee6a2d
Showing
7 changed files
with
404 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# | ||
# Copyright (c) 2024 Analog Devices Inc. | ||
# | ||
# This file is part of Scopy | ||
# (see https://www.github.com/analogdevicesinc/scopy). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 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 General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
# | ||
|
||
if(DEFINED __INCLUDED_SCOPY_WHATS_NEW_CMAKE) | ||
return() | ||
endif() | ||
set(__INCLUDED_SCOPY_WHATS_NEW_CMAKE TRUE) | ||
|
||
function(generate_whats_new RESOURCE_FILE FOLDER) | ||
# Specify the folder containing resources Create the list of HTML files recursively | ||
|
||
file(GLOB_RECURSE HTML_FILES "${FOLDER}*.html") | ||
|
||
# Start writing to the resource file | ||
file(WRITE "${RESOURCE_FILE}" "<RCC>\n <qresource prefix=\"/whatsnew/\">\n") | ||
|
||
# Loop through each HTML file and add it to the resource file | ||
foreach(HTML_FILE ${HTML_FILES}) | ||
# Convert the file path to a resource path | ||
file(RELATIVE_PATH relative ${FOLDER} ${HTML_FILE}) | ||
|
||
# Write the file to the resource file | ||
file(APPEND "${RESOURCE_FILE}" " <file>${relative}</file>\n") | ||
endforeach() | ||
|
||
# End the resource file | ||
file(APPEND "${RESOURCE_FILE}" " </qresource>\n</RCC>\n") | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (c) 2024 Analog Devices Inc. | ||
* | ||
* This file is part of Scopy | ||
* (see https://www.github.com/analogdevicesinc/scopy). | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 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 General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef WHATSNEWOVERLAY_H | ||
#define WHATSNEWOVERLAY_H | ||
|
||
#include <QLabel> | ||
#include <QWidget> | ||
#include <popupwidget.h> | ||
#include "scopy-core_export.h" | ||
#include <QButtonGroup> | ||
#include <QComboBox> | ||
#include <QStackedWidget> | ||
|
||
namespace scopy { | ||
class SCOPY_CORE_EXPORT WhatsNewOverlay : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit WhatsNewOverlay(QWidget *parent = nullptr); | ||
~WhatsNewOverlay(); | ||
|
||
void showOverlay(); | ||
void enableTintedOverlay(bool enable = true); | ||
|
||
private: | ||
PopupWidget *m_popupWidget; | ||
QString getHtmlPageContent(QString fileName); | ||
void initCarousel(); | ||
void generateVersionPage(QString filePath); | ||
|
||
QStackedWidget *m_carouselWidget; | ||
QComboBox *m_versionCb; | ||
gui::TintedOverlay *m_tintedOverlay; | ||
}; | ||
} // namespace scopy | ||
#endif // WHATSNEWOVERLAY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.