11 |
12 | #include "../anchor.h"
13 |
14 | namespace YAML {
15 | /**
16 | * An object that stores and retrieves values correlating to {@link anchor_t}
17 | * values.
18 | *
19 | * Efficient implementation that can make assumptions about how
20 | * {@code anchor_t} values are assigned by the {@link Parser} class.
21 | */
22 | template
23 | class AnchorDict {
24 | public:
25 | AnchorDict() : m_data{} {}
26 | void Register(anchor_t anchor, T value) {
27 | if (anchor > m_data.size()) {
28 | m_data.resize(anchor);
29 | }
30 | m_data[anchor - 1] = value;
31 | }
32 |
33 | T Get(anchor_t anchor) const { return m_data[anchor - 1]; }
34 |
35 | private:
36 | std::vector m_data;
37 | };
38 | } // namespace YAML
39 |
40 | #endif // ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
41 |
--------------------------------------------------------------------------------
/tests/testreference/testreference.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef TESTGAMSOPTION_H
21 | #define TESTGAMSOPTION_H
22 |
23 | #include
24 |
25 | class TestReference : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private slots:
30 | void testRefrenceHighlight_data();
31 | void testRefrenceHighlight();
32 |
33 | };
34 |
35 | #endif // TESTGAMSOPTION_H
36 |
--------------------------------------------------------------------------------
/extern/yaml-cpp/regex_yaml.cpp:
--------------------------------------------------------------------------------
1 | #include "regex_yaml.h"
2 |
3 | namespace YAML {
4 | // constructors
5 |
6 | RegEx::RegEx(REGEX_OP op) : m_op(op), m_a(0), m_z(0), m_params{} {}
7 | RegEx::RegEx() : RegEx(REGEX_EMPTY) {}
8 |
9 | RegEx::RegEx(char ch) : m_op(REGEX_MATCH), m_a(ch), m_z(0), m_params{} {}
10 |
11 | RegEx::RegEx(char a, char z) : m_op(REGEX_RANGE), m_a(a), m_z(z), m_params{} {}
12 |
13 | RegEx::RegEx(const std::string& str, REGEX_OP op)
14 | : m_op(op), m_a(0), m_z(0), m_params(str.begin(), str.end()) {}
15 |
16 | // combination constructors
17 | RegEx operator!(const RegEx& ex) {
18 | RegEx ret(REGEX_NOT);
19 | ret.m_params.push_back(ex);
20 | return ret;
21 | }
22 |
23 | RegEx operator|(const RegEx& ex1, const RegEx& ex2) {
24 | RegEx ret(REGEX_OR);
25 | ret.m_params.push_back(ex1);
26 | ret.m_params.push_back(ex2);
27 | return ret;
28 | }
29 |
30 | RegEx operator&(const RegEx& ex1, const RegEx& ex2) {
31 | RegEx ret(REGEX_AND);
32 | ret.m_params.push_back(ex1);
33 | ret.m_params.push_back(ex2);
34 | return ret;
35 | }
36 |
37 | RegEx operator+(const RegEx& ex1, const RegEx& ex2) {
38 | RegEx ret(REGEX_SEQ);
39 | ret.m_params.push_back(ex1);
40 | ret.m_params.push_back(ex2);
41 | return ret;
42 | }
43 | } // namespace YAML
44 |
--------------------------------------------------------------------------------
/tests/tests.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = subdirs
2 |
3 | SUBDIRS += \
4 | testreference \
5 | testabstractprocess \
6 | testblockcode \
7 | testcheckforupdate \
8 | testcommonpaths \
9 | testdialogfilefilter \
10 | testdoclocation \
11 | testeditors \
12 | testgamsaboutprocess \
13 | testgamsgetkeyprocess \
14 | testgamslicenseinfo \
15 | testgamsoption \
16 | testgamsprobeprocess \
17 | testgamsuserconfig \
18 | testgdxviewer \
19 | testmemorymapper \
20 | testmiro \
21 | testoptionapi \
22 | testoptionfile \
23 | testsearchcommon \
24 | testsettings \
25 | testcompleter \
26 | testconnect \
27 | testfilemapper \
28 | testservicelocators \
29 | testversioninfoloader
30 | # testsolverconfiginfo
31 |
--------------------------------------------------------------------------------
/src/networkmanager.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #include "networkmanager.h"
21 |
22 | namespace gams {
23 | namespace studio {
24 |
25 | QNetworkAccessManager *NetworkManager::mNetworkManager = nullptr;
26 | QNetworkAccessManager *NetworkManager::mOpenNetworkManager = nullptr;
27 | bool NetworkManager::mLock = false;
28 |
29 | NetworkManager::NetworkManager()
30 | { }
31 |
32 | } // namespace studio
33 | } // namespace gams
34 |
--------------------------------------------------------------------------------
/src/file.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef FILE_H
21 | #define FILE_H
22 |
23 | #include "file/projectcontextmenu.h"
24 | #include "file/projecttreeview.h"
25 | #include "file/treeitemdelegate.h"
26 | #include "file/projectrepo.h"
27 | #include "file/pexabstractnode.h"
28 | #include "file/pexlognode.h"
29 | #include "file/pexgroupnode.h"
30 | #include "file/filemetarepo.h"
31 | #include "file/filemeta.h"
32 |
33 | #endif // FILE_H
34 |
--------------------------------------------------------------------------------
/src/search/searchlocator.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #include "searchlocator.h"
21 | #include
22 |
23 | namespace gams {
24 | namespace studio {
25 | namespace search {
26 |
27 | search::Search* SearchLocator::mS = nullptr;
28 |
29 | void SearchLocator::provide(search::Search *s)
30 | {
31 | mS = s;
32 | }
33 |
34 | search::Search* SearchLocator::search()
35 | {
36 | return mS;
37 | }
38 |
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tests/testblockcode/testblockcode.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef TESTBLOCKCODE_H
21 | #define TESTBLOCKCODE_H
22 |
23 | #include "syntax/syntaxhighlighter.h"
24 | #include
25 |
26 | using gams::studio::syntax::BlockCode;
27 |
28 | class TestBlockCode : public QObject
29 | {
30 | Q_OBJECT
31 |
32 | private slots:
33 | void testFile();
34 | };
35 |
36 | #endif // TESTBLOCKCODE_H
37 |
--------------------------------------------------------------------------------
/ci/.gitlab-ci-5-analyze.yml:
--------------------------------------------------------------------------------
1 | codechecker-leg:
2 | stage: analyze
3 | tags: [linux]
4 | needs: [fetch-ci-scripts]
5 | image:
6 | name: $GAMS_CONTAINER_REGISTRY/qt-machines/leg/analyzer-${QT_IMAGE_VERSION}:latest
7 | entrypoint: [""] # prevent startup.sh
8 | allow_failure: false
9 | variables:
10 | DOLLAR_GAMS: $$$$GAMS_DISTRIB
11 | script:
12 | - !reference [.get-gams]
13 | - !reference [.gams-folder-leg]
14 | - echo "GAMS_DISTRIB=/cache/gams-installs/`cat gams_folder_leg.txt`" > gamsinclude.pri
15 | - echo "GAMS_DISTRIB_C_API=$DOLLAR_GAMS/apifiles/C/api" >> gamsinclude.pri
16 | - echo "GAMS_DISTRIB_CPP_API=$DOLLAR_GAMS/apifiles/C++/api" >> gamsinclude.pri
17 | - bash ci/codechecker.sh
18 | after_script:
19 | - cat gl-code-quality-report.json
20 | artifacts:
21 | reports:
22 | codequality: gl-code-quality-report.json
23 | paths: [gl-code-quality-report.json]
24 | expire_in: '2 mos'
25 |
26 | license-update-leg:
27 | stage: analyze
28 | tags: [linux]
29 | needs: []
30 | image:
31 | name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
32 | entrypoint: [""] # prevent startup.sh
33 | allow_failure: false
34 | script:
35 | - chmod +x ci/license-update.sh
36 | - ./ci/license-update.sh
37 |
--------------------------------------------------------------------------------
/tests/testservicelocators/testsysloglocator.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef TESTCOMMONPATHS_H
21 | #define TESTCOMMONPATHS_H
22 |
23 | #include
24 |
25 | class TestSysLogLocator : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private slots:
30 | void testSystemLogNull();
31 | void testSystemLogSetDefault();
32 | void testSystemLogSetNull();
33 | };
34 |
35 | #endif // TESTCOMMONPATHS_H
36 |
--------------------------------------------------------------------------------
/extern/engineapi/README.md:
--------------------------------------------------------------------------------
1 | *The source files in this folder are generated and should not be changed manually.*
2 |
3 | LICENSE (MIT)
4 |
5 | Copyright (c) 2017-2023 GAMS Software GmbH
6 | Copyright (c) 2017-2023 GAMS Development Corp.
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 |
12 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 |
--------------------------------------------------------------------------------
/src/search/searchlocator.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef SEARCHLOCATOR_H
21 | #define SEARCHLOCATOR_H
22 |
23 | namespace gams {
24 | namespace studio {
25 | namespace search {
26 |
27 | class Search;
28 |
29 | class SearchLocator
30 | {
31 | public:
32 | static search::Search* search();
33 | static void provide(Search* s);
34 |
35 | private:
36 | static search::Search* mS;
37 | };
38 |
39 | }
40 | }
41 | }
42 | #endif // SEARCHLOCATOR_H
43 |
--------------------------------------------------------------------------------
/src/connect/connecterror.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #include "connecterror.h"
21 |
22 | namespace gams {
23 | namespace studio {
24 | namespace connect {
25 |
26 |
27 | ConnectError::ConnectError()
28 | {
29 |
30 | }
31 |
32 | ConnectError::ConnectError(const YAML::Node& node)
33 | {
34 | Q_ASSERT(mRootNode.Type()==YAML::NodeType::Map);
35 | mRootNode = node;
36 | }
37 |
38 | } // namespace connect
39 | } // namespace studio
40 | } // namespace gams
41 |
--------------------------------------------------------------------------------
/extern/yaml-cpp/node/detail/memory.h:
--------------------------------------------------------------------------------
1 | #ifndef VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 | #define VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3 |
4 | #if defined(_MSC_VER) || \
5 | (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
6 | (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
7 | #pragma once
8 | #endif
9 |
10 | #include
11 |
12 | #include "yaml-cpp/dll.h"
13 | #include "yaml-cpp/node/ptr.h"
14 |
15 | namespace YAML {
16 | namespace detail {
17 | class node;
18 | } // namespace detail
19 | } // namespace YAML
20 |
21 | namespace YAML {
22 | namespace detail {
23 | class YAML_CPP_API memory {
24 | public:
25 | memory() : m_nodes{} {}
26 | node& create_node();
27 | void merge(const memory& rhs);
28 |
29 | private:
30 | using Nodes = std::set;
31 | Nodes m_nodes;
32 | };
33 |
34 | class YAML_CPP_API memory_holder {
35 | public:
36 | memory_holder() : m_pMemory(new memory) {}
37 |
38 | node& create_node() { return m_pMemory->create_node(); }
39 | void merge(memory_holder& rhs);
40 |
41 | private:
42 | shared_memory m_pMemory;
43 | };
44 | } // namespace detail
45 | } // namespace YAML
46 |
47 | #endif // VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
48 |
--------------------------------------------------------------------------------
/src/connect/connecterror.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef CONNECTERROR_H
21 | #define CONNECTERROR_H
22 |
23 | #include "connectagent.h"
24 |
25 | namespace gams {
26 | namespace studio {
27 | namespace connect {
28 |
29 | class ConnectError : public ConnectAgent
30 | {
31 | public:
32 | ConnectError();
33 | ConnectError(const YAML::Node& node);
34 | };
35 |
36 | } // namespace connect
37 | } // namespace studio
38 | } // namespace gams
39 |
40 | #endif // CONNECTERROR_H
41 |
--------------------------------------------------------------------------------
/src/editors/defaultsystemlogger.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef DEFAULTSYSTEMLOGGER_H
21 | #define DEFAULTSYSTEMLOGGER_H
22 |
23 | #include "abstractsystemlogger.h"
24 |
25 | namespace gams {
26 | namespace studio {
27 |
28 | class DefaultSystemLogger : public AbstractSystemLogger
29 | {
30 | public:
31 | DefaultSystemLogger() {}
32 |
33 | public:
34 | void append(const QString &msg, LogMsgType type) override;
35 | };
36 |
37 | }
38 | }
39 |
40 | #endif // DEFAULTSYSTEMLOGGER_H
41 |
--------------------------------------------------------------------------------
/src/reference/filereferencewidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | FileReferenceWidget
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 300
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 4
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 | -
33 |
34 |
35 | Compact View (Show file location only first time used)
36 |
37 |
38 |
39 | -
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/tests/testdialogfilefilter/testdialogfilefilter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef TESTDIALOGFILEFILTER_H
21 | #define TESTDIALOGFILEFILTER_H
22 |
23 | #include
24 | #include "viewhelper.h"
25 |
26 | using namespace gams::studio;
27 |
28 | class TestDialogFileFilter : public QObject
29 | {
30 | Q_OBJECT
31 |
32 | private slots:
33 | void testUserCreatedTypes();
34 | void testAllFileTypes();
35 | };
36 |
37 | #endif // TESTDIALOGFILEFILTER_H
38 |
--------------------------------------------------------------------------------
/src/process/gamslibprocess.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef GAMSLIBPROCESS_H
21 | #define GAMSLIBPROCESS_H
22 |
23 | #include "abstractprocess.h"
24 |
25 | namespace gams {
26 | namespace studio {
27 |
28 | class GamsLibProcess final : public AbstractGamsProcess
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | GamsLibProcess(QObject *parent = nullptr);
34 |
35 | void execute() override;
36 | };
37 |
38 | } // namespace studio
39 | } // namespace gams
40 |
41 | #endif // GAMSLIBPROCESS_H
42 |
--------------------------------------------------------------------------------
/icons/file-connect.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/extern/yaml-cpp/collectionstack.h:
--------------------------------------------------------------------------------
1 | #ifndef COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 | #define COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3 |
4 | #if defined(_MSC_VER) || \
5 | (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
6 | (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
7 | #pragma once
8 | #endif
9 |
10 | #include
11 | #include
12 |
13 | namespace YAML {
14 | struct CollectionType {
15 | enum value { NoCollection, BlockMap, BlockSeq, FlowMap, FlowSeq, CompactMap };
16 | };
17 |
18 | class CollectionStack {
19 | public:
20 | CollectionStack() : collectionStack{} {}
21 | CollectionType::value GetCurCollectionType() const {
22 | if (collectionStack.empty())
23 | return CollectionType::NoCollection;
24 | return collectionStack.top();
25 | }
26 |
27 | void PushCollectionType(CollectionType::value type) {
28 | collectionStack.push(type);
29 | }
30 | void PopCollectionType(CollectionType::value type) {
31 | assert(type == GetCurCollectionType());
32 | (void)type;
33 | collectionStack.pop();
34 | }
35 |
36 | private:
37 | std::stack collectionStack;
38 | };
39 | } // namespace YAML
40 |
41 | #endif // COLLECTIONSTACK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
42 |
--------------------------------------------------------------------------------
/tests/testeditors/testcodeedit.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef TESTCODEEDIT_H
21 | #define TESTCODEEDIT_H
22 |
23 | #include
24 |
25 | class TestCodeEdit : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private slots:
30 | void test_nextWord();
31 | void test_prevWord();
32 | void testSecondsToString();
33 | void testSecondsToString2();
34 | void testBytesToString();
35 | void testBytesToString2();
36 | };
37 |
38 | #endif // TESTCODEEDIT_H
39 |
--------------------------------------------------------------------------------
/src/editors/navigationhistorylocator.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #include "navigationhistorylocator.h"
21 | #include "navigationhistory.h"
22 |
23 | namespace gams {
24 | namespace studio {
25 |
26 | NavigationHistory* NavigationHistoryLocator::mNh = nullptr;
27 |
28 | NavigationHistory *NavigationHistoryLocator::navigationHistory()
29 | {
30 | return mNh;
31 | }
32 |
33 | void NavigationHistoryLocator::provide(NavigationHistory *navHistory)
34 | {
35 | mNh = navHistory;
36 | }
37 |
38 |
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/process/gamsprocess.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef GAMSPROCESS_H
21 | #define GAMSPROCESS_H
22 |
23 | #include "abstractprocess.h"
24 |
25 | namespace gams {
26 | namespace studio {
27 |
28 | class GamsProcess final : public AbstractGamsProcess
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | GamsProcess(QObject *parent = nullptr);
34 |
35 | void execute() override;
36 | void interrupt() override;
37 | };
38 |
39 | } // namespace studio
40 | } // namespace gams
41 |
42 | #endif // GAMSPROCESS_H
43 |
--------------------------------------------------------------------------------
/src/editors/sysloglocator.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef SYSLOGLOCATOR_H
21 | #define SYSLOGLOCATOR_H
22 |
23 | namespace gams {
24 | namespace studio {
25 |
26 | class AbstractSystemLogger;
27 |
28 | class SysLogLocator
29 | {
30 | public:
31 | static AbstractSystemLogger* systemLog();
32 | static void provide(AbstractSystemLogger* syslogEdit);
33 |
34 | private:
35 | static AbstractSystemLogger* mSysLog;
36 | static AbstractSystemLogger* mNullLog;
37 | };
38 |
39 | }
40 | }
41 | #endif // SYSLOGLOCATOR_H
42 |
--------------------------------------------------------------------------------
/ci/.gitlab-ci-4-deploy.yml:
--------------------------------------------------------------------------------
1 | deploy-cloudfront:
2 | stage: deploy
3 | tags: [linux]
4 | image:
5 | name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
6 | entrypoint: [""] # prevent startup.sh
7 | dependencies: [pack-deg, pack-dac, pack-leg, pack-wei]
8 | rules:
9 | - if: $CI_COMMIT_TAG =~ /v\d+\.\d+\.\d+.*/
10 | script:
11 | - mkdir artifacts
12 | - mv *.AppImage *.dmg *.zip artifacts
13 | - chmod +x ci/cloudfront-deploy.sh
14 | - TAG_NAME=$CI_COMMIT_TAG ./ci/cloudfront-deploy.sh
15 |
16 | deploy-github:
17 | stage: deploy
18 | tags: [linux]
19 | image:
20 | name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
21 | entrypoint: [""] # prevent startup.sh
22 | dependencies: [pack-deg, pack-dac, pack-leg, pack-wei]
23 | rules:
24 | - if: $CI_COMMIT_TAG =~ /v\d+\.\d+\.\d+.*/
25 | script:
26 | - PATH="/opt/github-release:${PATH}"
27 | - mkdir artifacts
28 | - mv *.AppImage *.dmg *.zip artifacts
29 | - chmod +x ci/github-deploy.sh
30 | - TAG_NAME=$CI_COMMIT_TAG GITHUB_TOKEN=${GITHUB_TOKEN} ./ci/github-deploy.sh
31 |
32 | deploy-qt:
33 | stage: deploy
34 | tags: [linux]
35 | needs: []
36 | image:
37 | name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
38 | entrypoint: [""] # prevent startup.sh
39 | script:
40 | - chmod +x ci/qt-deploy.sh
41 | - ./ci/qt-deploy.sh
42 |
--------------------------------------------------------------------------------
/src/editors/navigationhistorylocator.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef NAVIGATIONHISTORYLOCATOR_H
21 | #define NAVIGATIONHISTORYLOCATOR_H
22 |
23 | namespace gams {
24 | namespace studio {
25 |
26 | class NavigationHistory;
27 | class NavigationHistoryLocator
28 | {
29 |
30 | public:
31 | static NavigationHistory* navigationHistory();
32 | static void provide(NavigationHistory* navHistory);
33 |
34 | private:
35 | static NavigationHistory* mNh;
36 |
37 | };
38 |
39 | }
40 | }
41 | #endif // NAVIGATIONHISTORYLOCATOR_H
42 |
--------------------------------------------------------------------------------
/src/engine/efieditor.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | gams::studio::efi::EfiEditor
4 |
5 |
6 |
7 | 0
8 | 0
9 | 865
10 | 570
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 4
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 | -
33 |
34 |
35 |
36 |
37 |
38 |
39 | gams::studio::fs::FileSystemWidget
40 | QWidget
41 |
42 | 1
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/file/fileicon.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef GAMS_STUDIO_FILEICON_H
21 | #define GAMS_STUDIO_FILEICON_H
22 |
23 | #include
24 | #include "filetype.h"
25 |
26 | namespace gams {
27 | namespace studio {
28 |
29 | class FileIcon
30 | {
31 | FileIcon();
32 | public:
33 | static QIcon iconForFileKind(FileKind kind, bool isReadonly = false, bool isActive = false, QIcon::Mode mode = QIcon::Normal, int alpha = 100);
34 | };
35 |
36 | } // namespace studio
37 | } // namespace gams
38 |
39 | #endif // GAMS_STUDIO_FILEICON_H
40 |
--------------------------------------------------------------------------------
/tests/testcompleter/syntaxsimulator.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | */
18 | #include "syntaxsimulator.h"
19 |
20 | SyntaxSimulator::SyntaxSimulator() : QObject()
21 | {}
22 |
23 | void SyntaxSimulator::clearBlockSyntax()
24 | {
25 | mBlockSyntax.clear();
26 | }
27 |
28 | void SyntaxSimulator::addBlockSyntax(int pos, gams::studio::syntax::SyntaxKind syntax, int flavor)
29 | {
30 | mBlockSyntax.insert(pos, QPair(int(syntax), flavor));
31 | }
32 |
33 | void SyntaxSimulator::scanSyntax(QTextBlock block, QMap > &blockSyntax)
34 | {
35 | Q_UNUSED(block) // the blocks content is simulated
36 | blockSyntax = mBlockSyntax;
37 | }
38 |
--------------------------------------------------------------------------------
/tests/testcompleter/syntaxsimulator.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the GAMS Studio project.
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | */
18 | #ifndef SYNTAXSIMULATOR_H
19 | #define SYNTAXSIMULATOR_H
20 |
21 | #include
22 | #include
23 | #include "syntax/syntaxformats.h"
24 |
25 | class SyntaxSimulator : public QObject
26 | {
27 | Q_OBJECT
28 | QMap> mBlockSyntax;
29 |
30 | public:
31 | explicit SyntaxSimulator();
32 | void clearBlockSyntax();
33 | void addBlockSyntax(int pos, gams::studio::syntax::SyntaxKind syntax, int flavor);
34 |
35 | public slots:
36 | void scanSyntax(QTextBlock block, QMap> &blockSyntax);
37 |
38 | };
39 |
40 | #endif // SYNTAXSIMULATOR_H
41 |
--------------------------------------------------------------------------------
/src/lxiviewer/lxiviewer.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | gams::studio::lxiviewer::LxiViewer
4 |
5 |
6 |
7 | 0
8 | 0
9 | 739
10 | 500
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 | -
30 |
31 |
32 | Qt::Horizontal
33 |
34 |
35 |
36 | true
37 |
38 |
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/numerics/doubleFormat.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 |
21 | /* doubleFormat.h
22 | * Feb 2020: Formatting routines for displaying doubles
23 | */
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | char *x2fixed (double v, int nDecimals, int squeeze, char outBuf[], int *outLen, char decSep);
30 |
31 | char *x2efmt (double v, int nSigFigs, int squeeze, char outBuf[], int *outLen, char decSep);
32 |
33 | char *x2gfmt (double v, int nSigFigs, int squeeze, char outBuf[], int *outLen, char decSep);
34 |
35 | #ifdef __cplusplus
36 | };
37 | #endif
38 |
--------------------------------------------------------------------------------
/src/process/connectprocess.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef GAMS_STUDIO_CONNECTPROCESS_H
21 | #define GAMS_STUDIO_CONNECTPROCESS_H
22 |
23 | #include "abstractprocess.h"
24 |
25 | namespace gams {
26 | namespace studio {
27 |
28 | class ConnectProcess final : public AbstractGamsProcess
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | ConnectProcess(QObject *parent = nullptr);
34 | void execute() override;
35 | void stop(int waitMSec=0);
36 | };
37 |
38 | } // namespace studio
39 | } // namespace gams
40 |
41 | #endif // GAMS_STUDIO_CONNECTPROCESS_H
42 |
--------------------------------------------------------------------------------
/extern/yaml-cpp/tag.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "directives.h" // IWYU pragma: keep
5 | #include "tag.h"
6 | #include "token.h"
7 |
8 | namespace YAML {
9 | Tag::Tag(const Token& token)
10 | : type(static_cast(token.data)), handle{}, value{} {
11 | switch (type) {
12 | case VERBATIM:
13 | value = token.value;
14 | break;
15 | case PRIMARY_HANDLE:
16 | value = token.value;
17 | break;
18 | case SECONDARY_HANDLE:
19 | value = token.value;
20 | break;
21 | case NAMED_HANDLE:
22 | handle = token.value;
23 | value = token.params[0];
24 | break;
25 | case NON_SPECIFIC:
26 | break;
27 | default:
28 | assert(false);
29 | }
30 | }
31 |
32 | const std::string Tag::Translate(const Directives& directives) {
33 | switch (type) {
34 | case VERBATIM:
35 | return value;
36 | case PRIMARY_HANDLE:
37 | return directives.TranslateTagHandle("!") + value;
38 | case SECONDARY_HANDLE:
39 | return directives.TranslateTagHandle("!!") + value;
40 | case NAMED_HANDLE:
41 | return directives.TranslateTagHandle("!" + handle + "!") + value;
42 | case NON_SPECIFIC:
43 | // TODO:
44 | return "!";
45 | default:
46 | assert(false);
47 | }
48 | throw std::runtime_error("yaml-cpp: internal error, bad tag type");
49 | }
50 | } // namespace YAML
51 |
--------------------------------------------------------------------------------
/src/editors/abstractsystemlogger.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef ABSTRACTSYSTEMLOGGER_H
21 | #define ABSTRACTSYSTEMLOGGER_H
22 |
23 | class QString;
24 | namespace gams {
25 | namespace studio {
26 |
27 | enum class LogMsgType { Error, Warning, Info };
28 |
29 | class AbstractSystemLogger
30 | {
31 |
32 | public:
33 | virtual ~AbstractSystemLogger() {}
34 | virtual void append(const QString &msg, LogMsgType type = LogMsgType::Warning) = 0;
35 |
36 | protected:
37 | AbstractSystemLogger() {}
38 | };
39 |
40 | }
41 | }
42 |
43 | #endif // ABSTRACTSYSTEMLOGGER_H
44 |
--------------------------------------------------------------------------------
/tests/testcompleter/testcompleter.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = app
2 |
3 | include(../tests.pri)
4 |
5 | INCLUDEPATH += $$SRCPATH \
6 | $$SRCPATH/editors \
7 | $$SRCPATH/syntax
8 |
9 | HEADERS += \
10 | syntaxsimulator.h \
11 | testcompleter.h \
12 | $$SRCPATH/editors/codecompleter.h \
13 | $$SRCPATH/editors/sysloglocator.h \
14 | $$SRCPATH/editors/defaultsystemlogger.h \
15 | $$SRCPATH/syntax/syntaxformats.h \
16 | $$SRCPATH/common.h \
17 | $$SRCPATH/theme.h \
18 | $$SRCPATH/svgengine.h \
19 | $$SRCPATH/exception.h \
20 | $$SRCPATH/logger.h
21 |
22 | SOURCES += \
23 | syntaxsimulator.cpp \
24 | testcompleter.cpp \
25 | $$SRCPATH/editors/codecompleter.cpp \
26 | $$SRCPATH/editors/sysloglocator.cpp \
27 | $$SRCPATH/editors/defaultsystemlogger.cpp \
28 | $$SRCPATH/syntax/syntaxformats.cpp \
29 | $$SRCPATH/theme.cpp \
30 | $$SRCPATH/svgengine.cpp \
31 | $$SRCPATH/exception.cpp \
32 | $$SRCPATH/logger.cpp
33 |
--------------------------------------------------------------------------------
/src/editors/sysloglocator.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #include "sysloglocator.h"
21 | #include "defaultsystemlogger.h"
22 |
23 | namespace gams {
24 | namespace studio {
25 |
26 | AbstractSystemLogger* SysLogLocator::mSysLog = nullptr;
27 | AbstractSystemLogger* SysLogLocator::mNullLog = new DefaultSystemLogger;
28 |
29 | AbstractSystemLogger* SysLogLocator::systemLog()
30 | {
31 | if (!mSysLog) return mNullLog;
32 | return mSysLog;
33 | }
34 |
35 | void SysLogLocator::provide(AbstractSystemLogger *syslogEdit)
36 | {
37 | mSysLog = syslogEdit;
38 | }
39 |
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/tabdialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | TabDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 81
10 | 103
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 | 2
19 |
20 |
21 | 2
22 |
23 |
24 | 2
25 |
26 |
27 | 2
28 |
29 |
30 | 2
31 |
32 | -
33 |
34 |
35 | -
36 |
37 |
38 | QFrame::NoFrame
39 |
40 |
41 | 0
42 |
43 |
44 | Qt::ScrollBarAlwaysOn
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/process/gamslibprocess.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #include "gamslibprocess.h"
21 |
22 | #include
23 |
24 | namespace gams {
25 | namespace studio {
26 |
27 | GamsLibProcess::GamsLibProcess(QObject *parent)
28 | : AbstractGamsProcess("gamslib", parent)
29 | {
30 |
31 | }
32 |
33 | void GamsLibProcess::execute()
34 | {
35 | auto app = nativeAppPath();
36 | if (!isAppAvailable(app))
37 | return;
38 | emit newProcessCall("Running:", appCall(app, parameters()));
39 | mProcess.start(app, parameters());
40 | }
41 |
42 | } // namespace studio
43 | } // namespace gams
44 |
--------------------------------------------------------------------------------
/src/welcome/overview.h:
--------------------------------------------------------------------------------
1 | /**
2 | * GAMS Studio
3 | *
4 | * Copyright (c) 2017-2025 GAMS Software GmbH
5 | * Copyright (c) 2017-2025 GAMS Development Corp.
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 3 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program. If not, see .
19 | */
20 | #ifndef OVERVIEW_H
21 | #define OVERVIEW_H
22 |
23 | #include
24 |
25 | namespace gams {
26 | namespace studio {
27 |
28 | class HelpPage;
29 |
30 | class Overview : public QWebEngineView
31 | {
32 | Q_OBJECT
33 | public:
34 | Overview(QWidget *parent = nullptr);
35 |
36 | protected:
37 | void contextMenuEvent(QContextMenuEvent *event) override;
38 | QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
39 | };
40 |
41 | } // namespace studio
42 | } // namespace gams
43 |
44 | #endif // OVERVIEW_H
45 |
--------------------------------------------------------------------------------