File indexing completed on 2024-05-19 05:42:19
0001 // ct_lvtqtc_inspect_dependency_window.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 #ifndef DIAGRAM_SERVER_CT_LVTQTC_INSPECT_DEPENDENCY_WINDOW_H 0020 #define DIAGRAM_SERVER_CT_LVTQTC_INSPECT_DEPENDENCY_WINDOW_H 0021 0022 #include <ct_lvtqtc_lakosrelation.h> 0023 0024 #include <ct_lvtldr_lakosiannode.h> 0025 #include <ct_lvtqtc_graphicsscene.h> 0026 #include <ct_lvtqtc_lakosentity.h> 0027 0028 #include <QDialog> 0029 #include <QTableWidget> 0030 0031 #include <lvtqtc_export.h> 0032 0033 namespace Codethink::lvtprj { 0034 class ProjectFile; 0035 } 0036 0037 namespace Codethink::lvtldr { 0038 class LakosianNode; 0039 } 0040 0041 namespace Codethink::lvtqtc { 0042 0043 class LVTQTC_EXPORT InspectDependencyWindow : public QDialog { 0044 public: 0045 InspectDependencyWindow(lvtprj::ProjectFile const& projectFile, LakosRelation const& r, QDialog *parent = nullptr); 0046 0047 protected: 0048 enum ContentTableRoles { InternalNodeDataRole = Qt::UserRole + 1, MenuRole }; 0049 0050 void setupUi(); 0051 void openFile(lvtldr::LakosianNode *pkg, lvtldr::LakosianNode *component, const QString& ext); 0052 void populateContentsTable(); 0053 0054 virtual void showFileNotFoundWarning(QString const& filepath) const; 0055 0056 LakosRelation const& d_lakosRelation; 0057 lvtprj::ProjectFile const& d_projectFile; 0058 QTableWidget *d_contentsTable = nullptr; 0059 }; 0060 0061 } // namespace Codethink::lvtqtc 0062 0063 #endif // DIAGRAM_SERVER_CT_LVTQTC_INSPECT_DEPENDENCY_WINDOW_H