File indexing completed on 2024-05-19 05:42:25

0001 // ct_lvtqtc_util.h                                                    -*-C++-*-
0002 
0003 /*
0004 // Copyright 2023 Codethink Ltd <codethink@codethink.co.uk>
0005 // SPDX-License-Identifier: Apache-2.0
0006 //
0007 // Licensed under the Apache License, Version 2.0 (the "License");
0008 // you may not use this file except in compliance with the License.
0009 // You may obtain a copy of the License at
0010 //
0011 //     http://www.apache.org/licenses/LICENSE-2.0
0012 //
0013 // Unless required by applicable law or agreed to in writing, software
0014 // distributed under the License is distributed on an "AS IS" BASIS,
0015 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0016 // See the License for the specific language governing permissions and
0017 // limitations under the License.
0018 */
0019 
0020 #ifndef DEFINED_CT_LVTQTC_UTIL
0021 #define DEFINED_CT_LVTQTC_UTIL
0022 
0023 #include <lvtqtc_export.h>
0024 
0025 #include <QGraphicsItem>
0026 
0027 namespace Codethink::lvtqtc {
0028 
0029 struct LVTQTC_EXPORT QtcUtil {
0030     constexpr static bool isDebugMode()
0031     {
0032 #ifndef NDEBUG
0033         return true;
0034 #else
0035         return false;
0036 #endif
0037     }
0038 
0039     enum {
0040         LAKOSENTITY_TYPE = QGraphicsItem::UserType + 1,
0041         LAKOSRELATION_TYPE,
0042     };
0043 
0044     enum {
0045         e_INFORMATION = 100,
0046         e_EDGE_LAYER = 10,
0047         e_NODE_LAYER = 1,
0048     };
0049 
0050     enum class CreateUndoAction : short {
0051         e_No,
0052         e_Yes,
0053     };
0054 
0055     enum class VisibilityMode : short {
0056         e_Visible,
0057         e_Hidden,
0058     };
0059 
0060     enum class UndoActionType : short { e_Add, e_Remove };
0061 };
0062 
0063 } // namespace Codethink::lvtqtc
0064 
0065 #endif // DEFINED_CT_LVTQTC_UTIL