Skip to content

Commit 91f87ce

Browse files
author
Ilia Platone
committed
Add findVLBI
1 parent 4a81173 commit 91f87ce

20 files changed

Lines changed: 142 additions & 17 deletions

app.rc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
IDI_ICON1 ICON DISCARDABLE "icon.ico"
2+
IDI_DATA1 TEXT DISCARDABLE "xc10.json"
3+
IDI_DATA2 TEXT DISCARDABLE "xc12.json"
4+
IDI_DATA3 TEXT DISCARDABLE "xc14.json"
5+
IDI_DATA4 TEXT DISCARDABLE "xc16.json"
6+
IDI_DATA5 TEXT DISCARDABLE "xc18.json"
7+
IDI_DATA6 TEXT DISCARDABLE "xc1.json"
8+
IDI_DATA7 TEXT DISCARDABLE "xc20.json"
9+
IDI_DATA8 TEXT DISCARDABLE "xc22.json"
10+
IDI_DATA9 TEXT DISCARDABLE "xc24.json"
11+
IDI_DATA10 TEXT DISCARDABLE "xc26.json"
12+
IDI_DATA11 TEXT DISCARDABLE "xc28.json"
13+
IDI_DATA12 TEXT DISCARDABLE "xc2.json"
14+
IDI_DATA13 TEXT DISCARDABLE "xc30.json"
15+
IDI_DATA14 TEXT DISCARDABLE "xc32.json"
16+
IDI_DATA15 TEXT DISCARDABLE "xc4.json"
17+
IDI_DATA16 TEXT DISCARDABLE "xc6.json"
18+
IDI_DATA17 TEXT DISCARDABLE "xc8.json"

cmake_modules/FindVLBI.cmake

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# - Try to find libopenvlbi
2+
# Once done this will define
3+
#
4+
# VLBI_FOUND - system has libopenvlbi
5+
# VLBI_INCLUDE_DIRS - the libopenvlbi include directories
6+
# VLBI_LIBRARIES - Link these to use libopenvlbi
7+
# VLBI_DEFINITIONS - Compiler switches required for using libopenvlbi
8+
#
9+
# VLBI_HAS_VLBI_VERSION - defined when libopenvlbi has vlbi_get_version()
10+
11+
#=============================================================================
12+
# Copyright (c) 2022 Ilia Platone <info@iliaplatone.com>
13+
#
14+
# Redistribution and use in source and binary forms, with or without
15+
# modification, are permitted provided that the following conditions
16+
# are met:
17+
#
18+
# 1. Redistributions of source code must retain the copyright
19+
# notice, this list of conditions and the following disclaimer.
20+
# 2. Redistributions in binary form must reproduce the copyright
21+
# notice, this list of conditions and the following disclaimer in the
22+
# documentation and/or other materials provided with the distribution.
23+
# 3. The name of the author may not be used to endorse or promote products
24+
# derived from this software without specific prior written permission.
25+
#
26+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27+
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28+
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29+
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31+
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35+
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
#=============================================================================
37+
38+
find_path(VLBI_INCLUDE_DIRS
39+
NAMES
40+
vlbi.h
41+
HINTS
42+
${VLBI_INCLUDE_DIRS}
43+
PATH_SUFFIXES
44+
OpenVLBI
45+
)
46+
47+
find_library(VLBI_LIBRARIES
48+
NAMES
49+
openvlbi
50+
HINTS
51+
${VLBI_LIBRARY_DIRS}
52+
)
53+
54+
set(VLBI_INCLUDE_DIRS ${VLBI_INCLUDE_DIR})
55+
set(VLBI_LIBRARIES ${VLBI_LIBRARY})
56+
57+
include(FindPackageHandleStandardArgs)
58+
find_package_handle_standard_args(VLBI
59+
FOUND_VAR
60+
VLBI_FOUND
61+
REQUIRED_VARS
62+
VLBI_LIBRARIES
63+
VLBI_INCLUDE_DIRS
64+
VERSION_VAR
65+
VLBI_VERSION
66+
)
67+
68+
mark_as_advanced(VLBI_INCLUDE_DIRS VLBI_LIBRARIES)
69+
70+
if(VLBI_FOUND)
71+
include(CheckCXXSourceCompiles)
72+
include(CMakePushCheckState)
73+
cmake_push_check_state(RESET)
74+
set(CMAKE_REQUIRED_INCLUDES ${VLBI_INCLUDE_DIRS})
75+
set(CMAKE_REQUIRED_LIBRARIES ${VLBI_LIBRARIES})
76+
check_cxx_source_compiles("#include <vlbi.h>
77+
int main() { vlbi_get_version(); return 0; }" VLBI_HAS_VLBI_VERSION)
78+
cmake_pop_check_state()
79+
endif()

mainwindow.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,10 @@ MainWindow::MainWindow(QWidget *parent)
684684
connect(getHistogram(), static_cast<void (Graph::*)()>(&Graph::Refresh), this, [ = ]()
685685
{
686686
});
687-
connect(this, static_cast<void (MainWindow::*)()>(&MainWindow::repaint), [ = ]()
687+
connect(this, static_cast<void (MainWindow::*)()>(&MainWindow::repaint), this, [ = ]()
688688
{
689+
for(Line *line : Lines)
690+
line->paint();
689691
getGraph()->paint();
690692
});
691693
connect(this, static_cast<void (MainWindow::*)(ahp_xc_packet*)>(&MainWindow::newPacket), this, [ = ](ahp_xc_packet *packet)

resource.qrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<RCC>
2+
<qresource prefix="/icons">
3+
<file>icon.ico</file>
4+
</qresource>
5+
<qresource prefix="/data">
6+
<file>xc10.json</file>
7+
<file>xc12.json</file>
8+
<file>xc14.json</file>
9+
<file>xc16.json</file>
10+
<file>xc18.json</file>
11+
<file>xc1.json</file>
12+
<file>xc20.json</file>
13+
<file>xc22.json</file>
14+
<file>xc24.json</file>
15+
<file>xc26.json</file>
16+
<file>xc28.json</file>
17+
<file>xc2.json</file>
18+
<file>xc30.json</file>
19+
<file>xc32.json</file>
20+
<file>xc4.json</file>
21+
<file>xc6.json</file>
22+
<file>xc8.json</file>
23+
24+
</qresource>
25+
</RCC>
26+

xc1.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

xc10.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

xc12.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

xc14.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

xc16.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

xc18.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)