1 /***************************************************************************
2  *   Copyright (C) 2005 by David Saxton                                    *
3  *   david@bluehaze.org                                                    *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  ***************************************************************************/
10 
11 #ifndef MICROSELECTWIDGET_H
12 #define MICROSELECTWIDGET_H
13 
14 // #include <q3groupbox.h>
15 #include <QGroupBox>
16 
17 class QVBoxLayout;
18 class QHBoxLayout;
19 class QGridLayout;
20 class QSpacerItem;
21 class QGroupBox;
22 class QLabel;
23 class KComboBox;
24 
25 /**
26 @author David Saxton
27 */
28 class MicroSelectWidget : public QGroupBox
29 {
30 	Q_OBJECT
31 
32 	public:
33 		MicroSelectWidget( QWidget* parent = nullptr, const char* name = nullptr, Qt::WindowFlags f = {} );
34 		~MicroSelectWidget() override;
35 
36 		void setMicro( const QString & id );
37 		QString micro() const;
38 
39 		/**
40 		 * @see MicroLibrary::microIDs
41 		 */
42 		void setAllowedAsmSet( unsigned allowed );
43 		/**
44 		 * @see MicroLibrary::microIDs
45 		 */
46 		void setAllowedGpsimSupport( unsigned allowed );
47 		/**
48 		 * @see MicroLibrary::microIDs
49 		 */
50 		void setAllowedFlowCodeSupport( unsigned allowed );
51 		/**
52 		 * @see MicroLibrary::microIDs
53 		 */
54 		void setAllowedMicrobeSupport( unsigned allowed );
55 
56 	protected slots:
57 		void microFamilyChanged( const QString & family );
58 
59 	protected:
60 		void updateFromAllowed();
61 
62 		unsigned int m_allowedAsmSet;
63 		unsigned int m_allowedGpsimSupport;
64 		unsigned int m_allowedFlowCodeSupport;
65 		unsigned int m_allowedMicrobeSupport;
66 
67 		QHBoxLayout * m_pWidgetLayout;
68 		QLabel * m_pMicroFamilyLabel;
69 		KComboBox * m_pMicroFamily;
70 		QLabel * m_pMicroLabel;
71 		KComboBox * m_pMicro;
72 };
73 
74 #endif
75