File indexing completed on 2024-04-21 05:45:45

0001 /***************************************************************************
0002  *   Copyright (C) 2004 by Mario Bensi <nef@ipsquad.net>                   *
0003  *   Copyright (C) 2004, 2008 by Pino Toscano <pino@kde.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  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU General Public License     *
0016  *   along with this program; if not, write to the                         *
0017  *   Free Software Foundation, Inc.,                                       *
0018  *   51 Franklin Steet, Fifth Floor, Boston, MA  02111-1307, USA.          *
0019  ***************************************************************************/
0020 
0021 #ifndef _ADDALTERNATIVES_H_
0022 #define _ADDALTERNATIVES_H_
0023 
0024 #include "ui_addalternativesui.h"
0025 
0026 #include <qdialog.h>
0027 #include <qlist.h>
0028 
0029 class QDialogButtonBox;
0030 
0031 class Alternative;
0032 class Item;
0033 class SlaveWidget;
0034 
0035 class AddAlternatives : public QDialog, private Ui::AddAlternatives
0036 {
0037     Q_OBJECT
0038     
0039     QDialogButtonBox* m_buttons;
0040     Item* m_item;
0041     Alternative* m_alternative;
0042     QList<SlaveWidget *> m_slaveWidgets;
0043     
0044 public:
0045     AddAlternatives(Item* item, QWidget *parent = Q_NULLPTR);
0046     ~AddAlternatives() Q_DECL_OVERRIDE;
0047     
0048     QSize sizeHint() const Q_DECL_OVERRIDE;
0049     
0050     Alternative* alternative() const { return m_alternative; }
0051     
0052 private slots:
0053     void slotCheckSlaves();
0054     void slotOkClicked();
0055 };
0056 
0057 #endif //ADDALTERNATIVES_H_