File indexing completed on 2024-04-21 05:43:41

0001 /***************************************************************************
0002  *   Copyright (C) 2005 by David Saxton                                    *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef MICROSELECTWIDGET_H
0012 #define MICROSELECTWIDGET_H
0013 
0014 // #include <q3groupbox.h>
0015 #include <QGroupBox>
0016 
0017 class QVBoxLayout;
0018 class QHBoxLayout;
0019 class QGridLayout;
0020 class QSpacerItem;
0021 class QGroupBox;
0022 class QLabel;
0023 class KComboBox;
0024 
0025 /**
0026 @author David Saxton
0027 */
0028 class MicroSelectWidget : public QGroupBox
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033     MicroSelectWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
0034     ~MicroSelectWidget() override;
0035 
0036     void setMicro(const QString &id);
0037     QString micro() const;
0038 
0039     /**
0040      * @see MicroLibrary::microIDs
0041      */
0042     void setAllowedAsmSet(unsigned allowed);
0043     /**
0044      * @see MicroLibrary::microIDs
0045      */
0046     void setAllowedGpsimSupport(unsigned allowed);
0047     /**
0048      * @see MicroLibrary::microIDs
0049      */
0050     void setAllowedFlowCodeSupport(unsigned allowed);
0051     /**
0052      * @see MicroLibrary::microIDs
0053      */
0054     void setAllowedMicrobeSupport(unsigned allowed);
0055 
0056 protected slots:
0057     void microFamilyChanged(const QString &family);
0058 
0059 protected:
0060     void updateFromAllowed();
0061 
0062     unsigned int m_allowedAsmSet;
0063     unsigned int m_allowedGpsimSupport;
0064     unsigned int m_allowedFlowCodeSupport;
0065     unsigned int m_allowedMicrobeSupport;
0066 
0067     QHBoxLayout *m_pWidgetLayout;
0068     QLabel *m_pMicroFamilyLabel;
0069     KComboBox *m_pMicroFamily;
0070     QLabel *m_pMicroLabel;
0071     KComboBox *m_pMicro;
0072 };
0073 
0074 #endif