Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerGPUMemoryComboBox.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4  Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16  and was supported through CANARIE's Research Software Program, and Cancer
17  Care Ontario.
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerGPUMemoryComboBox_h
22 #define __qSlicerGPUMemoryComboBox_h
23 
24 // Qt includes
25 #include <QComboBox>
26 
27 // Slicer includes
28 #include "qSlicerVolumeRenderingModuleWidgetsExport.h"
29 
30 class qSlicerGPUMemoryComboBoxPrivate;
31 
32 class Q_SLICER_MODULE_VOLUMERENDERING_WIDGETS_EXPORT qSlicerGPUMemoryComboBox
33  : public QComboBox
34 {
35  Q_OBJECT
36  Q_PROPERTY(double currentGPUMemory READ currentGPUMemory WRITE setCurrentGPUMemory)
37  Q_PROPERTY(QString currentGPUMemoryString READ currentGPUMemoryAsString WRITE setCurrentGPUMemoryFromString DESIGNABLE false)
38 
39 public:
41  typedef QComboBox Superclass;
42  explicit qSlicerGPUMemoryComboBox(QWidget* parent=nullptr);
43  ~qSlicerGPUMemoryComboBox() override;
44 
46  Q_INVOKABLE int totalGPUMemoryInMB()const;
48  Q_INVOKABLE double currentGPUMemory()const;
50  Q_INVOKABLE int currentGPUMemoryInMB()const;
52  Q_INVOKABLE QString currentGPUMemoryAsString()const;
53 
54 public slots:
56  void setCurrentGPUMemory(double memory);
59  void setCurrentGPUMemoryFromString(const QString& memoryString);
60 
61 protected:
62  QScopedPointer<qSlicerGPUMemoryComboBoxPrivate> d_ptr;
63 
64 private:
65  Q_DECLARE_PRIVATE(qSlicerGPUMemoryComboBox);
66  Q_DISABLE_COPY(qSlicerGPUMemoryComboBox);
67 };
68 
69 #endif
QComboBox Superclass
Constructors.