File indexing completed on 2024-03-24 05:48:37
0001 /*************************************************************************** 0002 * Copyright (C) 2004 by Juanjo Álvarez Martinez <juanjo@juanjoalvarez.net> * 0003 * Copyright (C) 2004 by Mario Bensi <nef@ipsquad.net> * 0004 * Copyright (C) 2008 by Pino Toscano <pino@kde.org> * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 * This program is distributed in the hope that it will be useful, * 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0014 * GNU General Public License for more details. * 0015 * * 0016 * You should have received a copy of the GNU General Public License * 0017 * along with this program; if not, write to the * 0018 * Free Software Foundation, Inc., * 0019 * 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * 0020 ***************************************************************************/ 0021 0022 #ifndef _KALTERNATIVES_H_ 0023 #define _KALTERNATIVES_H_ 0024 0025 #include <kcmodule.h> 0026 0027 #include "ui_mainwindow.h" 0028 0029 class AlternativeItemProxyModel; 0030 class AlternativeAltModel; 0031 0032 class Kalternatives : public KCModule 0033 { 0034 Q_OBJECT 0035 0036 bool m_bisRoot; 0037 Ui::MainWindow m_ui; 0038 AlternativeItemProxyModel* m_itemProxyModel; 0039 AlternativeAltModel* m_altModel; 0040 0041 public: 0042 Kalternatives(QWidget *parent=Q_NULLPTR, const QVariantList& = QVariantList() ); 0043 ~Kalternatives() Q_DECL_OVERRIDE; 0044 bool isBisRoot() const {return m_bisRoot;} 0045 0046 void load() Q_DECL_OVERRIDE; 0047 void save() Q_DECL_OVERRIDE; 0048 QString quickHelp() const Q_DECL_OVERRIDE; 0049 0050 public slots: 0051 void configChanged(); 0052 0053 private slots: 0054 void slotSelectAlternativesActivated(const QModelIndex &); 0055 void slotHideAlternativesClicked(); 0056 void slotAddClicked(); 0057 void slotDeleteClicked(); 0058 void slotPropertiesClicked(); 0059 void slotUpdateStatusCombo(); 0060 void slotUpdateButtons(); 0061 }; 0062 0063 #endif // _KALTERNATIVES_H_