From 0ea447b797dbc97f06ac4035147df34a12a54017 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 17:25:33 -0600 Subject: Fix FTBFS --- src/blacklistedit_Dialog.ui | 275 ------------------------------------------ src/blacklisteditdialog.cpp | 172 -------------------------- src/blacklisteditdialog.h | 95 --------------- src/blactdelistedit_Dialog.ui | 275 ++++++++++++++++++++++++++++++++++++++++++ src/blactdelisteditdialog.cpp | 172 ++++++++++++++++++++++++++ src/blactdelisteditdialog.h | 95 +++++++++++++++ 6 files changed, 542 insertions(+), 542 deletions(-) delete mode 100644 src/blacklistedit_Dialog.ui delete mode 100644 src/blacklisteditdialog.cpp delete mode 100644 src/blacklisteditdialog.h create mode 100644 src/blactdelistedit_Dialog.ui create mode 100644 src/blactdelisteditdialog.cpp create mode 100644 src/blactdelisteditdialog.h (limited to 'src') diff --git a/src/blacklistedit_Dialog.ui b/src/blacklistedit_Dialog.ui deleted file mode 100644 index 375a450..0000000 --- a/src/blacklistedit_Dialog.ui +++ /dev/null @@ -1,275 +0,0 @@ - -blacklistedit_Dialog - - - blacklistedit_Dialog - - - - 0 - 0 - 490 - 246 - - - - Autosuspend Blacklist Edit - - - true - - - - unnamed - - - - layout2 - - - - unnamed - - - - buttonOk - - - OK - - - - - - true - - - true - - - - - buttonCancel - - - - 1 - 0 - 0 - 0 - - - - Cancel - - - - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 305 - 20 - - - - - - - - bG_scheme - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - - lE_blacklist - - - - - pB_add - - - Add - - - - - pB_remove - - - Remove - - - - - - - - lB_blacklist - - - - 7 - 7 - 0 - 0 - - - - - 0 - 150 - - - - - - spacer22 - - - Vertical - - - Preferred - - - - 31 - 20 - - - - - - spacer23 - - - Vertical - - - Preferred - - - - 21 - 140 - - - - - - tLabel_info - - - - 3 - 3 - 0 - 0 - - - - - 220 - 110 - - - - - - - AlignBottom - - - - - - - - - buttonOk - released() - blacklistedit_Dialog - buttonOk_released() - - - buttonCancel - released() - blacklistedit_Dialog - buttonCancel_released() - - - pB_remove - released() - blacklistedit_Dialog - pB_remove_released() - - - pB_add - released() - blacklistedit_Dialog - pB_add_released() - - - lE_blacklist - textChanged(const TQString&) - blacklistedit_Dialog - lE_blacklist_textChanged() - - - lB_blacklist - currentChanged(TQListBoxItem*) - blacklistedit_Dialog - lB_blacklist_currentChanged() - - - - buttonOk - buttonCancel - lE_blacklist - pB_add - pB_remove - lB_blacklist - - - buttonOk_released() - buttonCancel_released() - buttonApply_released() - pB_remove_released() - pB_add_released() - lB_blacklist_selected( TQListBoxItem * ) - lE_blacklist_textChanged() - lB_blacklist_selected() - lB_blacklist_currentChanged(TQListBoxItem*) - lB_blacklist_currentChanged() - - - diff --git a/src/blacklisteditdialog.cpp b/src/blacklisteditdialog.cpp deleted file mode 100644 index d319ae5..0000000 --- a/src/blacklisteditdialog.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Danny Kukawka * - * danny.kukawka@web.de, dkukawka@suse.de * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of version 2 of the GNU General Public License * - * as published by the Free Software Foundation. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -/*! - * \file blacklisteditdialog.cpp - * \brief In this file can be found the "blacklist edit dialog" related code. - * \author Danny Kukawka, , - * \date 2005 - */ - -// own header -#include "blacklisteditdialog.h" - -// KDE headers: -#include -#include - -// QT headers: -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*! This is the default constructor of class blacklistEditDialog . */ -blacklistEditDialog::blacklistEditDialog( TQStringList blacklisted, TQString captionName, - bool initImport, TQWidget *parent, const char *name) - :blacklistedit_Dialog(parent, name, false, WDestructiveClose ) -{ - blacklist = blacklisted; - - changed = initImport; - - pB_add->setEnabled(false); - pB_remove->setEnabled(false); - - lB_blacklist->insertStringList(blacklist); - lB_blacklist->sort(); - - if (captionName.startsWith(i18n("General Blacklist"))) - this->bG_scheme->setTitle(captionName); - else - this->bG_scheme->setTitle( i18n("Scheme: ") + captionName); - this->setIcon(SmallIcon("configure", TQIconSet::Automatic)); - buttonCancel->setIconSet(SmallIconSet("cancel", TQIconSet::Automatic)); - buttonOk->setIconSet(SmallIconSet("ok", TQIconSet::Automatic)); - pB_add->setIconSet(SmallIconSet("forward", TQIconSet::Automatic)); - pB_remove->setIconSet(SmallIconSet("back", TQIconSet::Automatic)); - -} - -/*! This is the default destructor of class blacklistEditDialog . */ -blacklistEditDialog::~blacklistEditDialog() -{ - // no need to delete child widgets, TQt does it all for us -} - -/*! - * SLOT: called if the 'ok' button clicked. This TQT_SLOT emit - * \ref config_finished() and close the dialog. - */ -void blacklistEditDialog::buttonOk_released() { - - if(changed == true) { - changed = false; - emit config_finished( blacklist ); - } - close(); -} - - -/*! - * SLOT: called if the 'cancel' button clicked. This TQT_SLOT close - * the dialog. - */ -void blacklistEditDialog::buttonCancel_released(){ - changed = false; - close(); -} - - -/*! - * SLOT: called if the 'remove' button clicked. The TQT_SLOT try to remove - * the selected item from the TQListBox and the TQStringList \ref blacklist . - */ -void blacklistEditDialog::pB_remove_released(){ - - if(blacklist.remove(lB_blacklist->selectedItem()->text()) > 0) { - lB_blacklist->removeItem(lB_blacklist->currentItem()); - lB_blacklist->sort(); - changed = true; - - pB_remove->setEnabled(false); - tLabel_info->setText(i18n("Selected entry removed.")); - } - else { - tLabel_info->setText(i18n("Could not remove the selected entry.")); - } -} - - -/*! - * SLOT: called if the 'add' button clicked. The TQT_SLOT try to add the string from - * the TQLineEdit lE_blacklist to the TQListBox and the TQStringList \ref blacklist . - */ -void blacklistEditDialog::pB_add_released(){ - - TQString text = lE_blacklist->text(); - // remove the whitespaces and check if text is empty - if(text.stripWhiteSpace() != "") { - // check if the entry is already present - if(!lB_blacklist->findItem(text, TQt::ExactMatch)) { - lB_blacklist->insertItem(text); - lB_blacklist->sort(); - blacklist.append(text); - blacklist.sort(); - tLabel_info->setText(i18n("Inserted new entry.")); - changed = true; - } - else { - tLabel_info->setText(i18n("Entry exists already. Did not insert new entry.")); - } - } - else tLabel_info->setText(i18n("Empty entry was not inserted.")); - - // set the widgets back to default - lE_blacklist->setText(""); - pB_remove->setEnabled(false); - pB_add->setEnabled(false); -} - - -/*! - * SLOT: called if a item in the TQListBox lB_blacklist is selected. - * Here we enable the remove button pB_remove . - */ -void blacklistEditDialog::lB_blacklist_currentChanged(){ - // enable the remove button - pB_remove->setEnabled(true); -} - - -/*! - * SLOT: called if the input-line in the dialog is modified. Here we enable - * the add button pB_add . - */ -void blacklistEditDialog::lE_blacklist_textChanged(){ - // enable the add button - pB_add->setEnabled(true); -} - -#include "blacklisteditdialog.moc" diff --git a/src/blacklisteditdialog.h b/src/blacklisteditdialog.h deleted file mode 100644 index 8ae17db..0000000 --- a/src/blacklisteditdialog.h +++ /dev/null @@ -1,95 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Danny Kukawka * - * danny.kukawka@web.de, dkukawka@suse.de * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of version 2 of the GNU General Public License * - * as published by the Free Software Foundation. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -/*! -* \file blacklisteditdialog.h -* \brief Headerfile for blacklisteditdialog.cpp and the class \ref -* blacklistEditDialog . -*/ -/*! -* \class blacklistEditDialog -* \brief class for dialog to edit the blacklist related funtionality -* \author Danny Kukawka, , -* \date 2005 -*/ - -#ifndef BLACKLISTEDITDIALOG_H -#define BLACKLISTEDITDIALOG_H - -#include "blacklistedit_Dialog.h" - -class blacklistEditDialog: public blacklistedit_Dialog { - - Q_OBJECT - - -public: - - //! default constructor - blacklistEditDialog(TQStringList blacklisted, TQString captionName, bool initImport = false, - TQWidget *parent = 0, const char *name = 0); - //! default destructor - ~blacklistEditDialog(); - -private: - - //! TQStringList with the blacklisted processes - /*! - * This TQStringList contains the given blacklisted processes - * for edit. If the dialog changed, we change also this list. - */ - TQStringList blacklist; - - //! to tell if the blacklist was changed - /*! - * This boolean value tells if the current blacklist was changed. - * \li true: if the blacklist changed - * \li false: if the blacklist isn't changed - */ - bool changed; - - -private slots: - - //! called if the 'ok' button clicked - void buttonOk_released(); - //! called if the 'cancel' button clicked - void buttonCancel_released(); - //! called if the 'remove' button clicked - void pB_remove_released(); - //! called if the 'add' button clicked - void pB_add_released(); - //! called if a item of the listbox selected - void lB_blacklist_currentChanged(); - //! called if something input in the TQLineEdit - void lE_blacklist_textChanged(); - -signals: - - //! signal emited if the configuration finished - /*! - * This signal is emited if the configuration is finished - * and the blacklist was modified- - * \return TQStringList (the modified blacklist) - */ - void config_finished( TQStringList ); - -}; - -#endif diff --git a/src/blactdelistedit_Dialog.ui b/src/blactdelistedit_Dialog.ui new file mode 100644 index 0000000..375a450 --- /dev/null +++ b/src/blactdelistedit_Dialog.ui @@ -0,0 +1,275 @@ + +blacklistedit_Dialog + + + blacklistedit_Dialog + + + + 0 + 0 + 490 + 246 + + + + Autosuspend Blacklist Edit + + + true + + + + unnamed + + + + layout2 + + + + unnamed + + + + buttonOk + + + OK + + + + + + true + + + true + + + + + buttonCancel + + + + 1 + 0 + 0 + 0 + + + + Cancel + + + + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 305 + 20 + + + + + + + + bG_scheme + + + + 7 + 7 + 0 + 0 + + + + + + + + unnamed + + + + lE_blacklist + + + + + pB_add + + + Add + + + + + pB_remove + + + Remove + + + + + + + + lB_blacklist + + + + 7 + 7 + 0 + 0 + + + + + 0 + 150 + + + + + + spacer22 + + + Vertical + + + Preferred + + + + 31 + 20 + + + + + + spacer23 + + + Vertical + + + Preferred + + + + 21 + 140 + + + + + + tLabel_info + + + + 3 + 3 + 0 + 0 + + + + + 220 + 110 + + + + + + + AlignBottom + + + + + + + + + buttonOk + released() + blacklistedit_Dialog + buttonOk_released() + + + buttonCancel + released() + blacklistedit_Dialog + buttonCancel_released() + + + pB_remove + released() + blacklistedit_Dialog + pB_remove_released() + + + pB_add + released() + blacklistedit_Dialog + pB_add_released() + + + lE_blacklist + textChanged(const TQString&) + blacklistedit_Dialog + lE_blacklist_textChanged() + + + lB_blacklist + currentChanged(TQListBoxItem*) + blacklistedit_Dialog + lB_blacklist_currentChanged() + + + + buttonOk + buttonCancel + lE_blacklist + pB_add + pB_remove + lB_blacklist + + + buttonOk_released() + buttonCancel_released() + buttonApply_released() + pB_remove_released() + pB_add_released() + lB_blacklist_selected( TQListBoxItem * ) + lE_blacklist_textChanged() + lB_blacklist_selected() + lB_blacklist_currentChanged(TQListBoxItem*) + lB_blacklist_currentChanged() + + + diff --git a/src/blactdelisteditdialog.cpp b/src/blactdelisteditdialog.cpp new file mode 100644 index 0000000..d319ae5 --- /dev/null +++ b/src/blactdelisteditdialog.cpp @@ -0,0 +1,172 @@ +/*************************************************************************** + * Copyright (C) 2005 by Danny Kukawka * + * danny.kukawka@web.de, dkukawka@suse.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of version 2 of the GNU General Public License * + * as published by the Free Software Foundation. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +/*! + * \file blacklisteditdialog.cpp + * \brief In this file can be found the "blacklist edit dialog" related code. + * \author Danny Kukawka, , + * \date 2005 + */ + +// own header +#include "blacklisteditdialog.h" + +// KDE headers: +#include +#include + +// QT headers: +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/*! This is the default constructor of class blacklistEditDialog . */ +blacklistEditDialog::blacklistEditDialog( TQStringList blacklisted, TQString captionName, + bool initImport, TQWidget *parent, const char *name) + :blacklistedit_Dialog(parent, name, false, WDestructiveClose ) +{ + blacklist = blacklisted; + + changed = initImport; + + pB_add->setEnabled(false); + pB_remove->setEnabled(false); + + lB_blacklist->insertStringList(blacklist); + lB_blacklist->sort(); + + if (captionName.startsWith(i18n("General Blacklist"))) + this->bG_scheme->setTitle(captionName); + else + this->bG_scheme->setTitle( i18n("Scheme: ") + captionName); + this->setIcon(SmallIcon("configure", TQIconSet::Automatic)); + buttonCancel->setIconSet(SmallIconSet("cancel", TQIconSet::Automatic)); + buttonOk->setIconSet(SmallIconSet("ok", TQIconSet::Automatic)); + pB_add->setIconSet(SmallIconSet("forward", TQIconSet::Automatic)); + pB_remove->setIconSet(SmallIconSet("back", TQIconSet::Automatic)); + +} + +/*! This is the default destructor of class blacklistEditDialog . */ +blacklistEditDialog::~blacklistEditDialog() +{ + // no need to delete child widgets, TQt does it all for us +} + +/*! + * SLOT: called if the 'ok' button clicked. This TQT_SLOT emit + * \ref config_finished() and close the dialog. + */ +void blacklistEditDialog::buttonOk_released() { + + if(changed == true) { + changed = false; + emit config_finished( blacklist ); + } + close(); +} + + +/*! + * SLOT: called if the 'cancel' button clicked. This TQT_SLOT close + * the dialog. + */ +void blacklistEditDialog::buttonCancel_released(){ + changed = false; + close(); +} + + +/*! + * SLOT: called if the 'remove' button clicked. The TQT_SLOT try to remove + * the selected item from the TQListBox and the TQStringList \ref blacklist . + */ +void blacklistEditDialog::pB_remove_released(){ + + if(blacklist.remove(lB_blacklist->selectedItem()->text()) > 0) { + lB_blacklist->removeItem(lB_blacklist->currentItem()); + lB_blacklist->sort(); + changed = true; + + pB_remove->setEnabled(false); + tLabel_info->setText(i18n("Selected entry removed.")); + } + else { + tLabel_info->setText(i18n("Could not remove the selected entry.")); + } +} + + +/*! + * SLOT: called if the 'add' button clicked. The TQT_SLOT try to add the string from + * the TQLineEdit lE_blacklist to the TQListBox and the TQStringList \ref blacklist . + */ +void blacklistEditDialog::pB_add_released(){ + + TQString text = lE_blacklist->text(); + // remove the whitespaces and check if text is empty + if(text.stripWhiteSpace() != "") { + // check if the entry is already present + if(!lB_blacklist->findItem(text, TQt::ExactMatch)) { + lB_blacklist->insertItem(text); + lB_blacklist->sort(); + blacklist.append(text); + blacklist.sort(); + tLabel_info->setText(i18n("Inserted new entry.")); + changed = true; + } + else { + tLabel_info->setText(i18n("Entry exists already. Did not insert new entry.")); + } + } + else tLabel_info->setText(i18n("Empty entry was not inserted.")); + + // set the widgets back to default + lE_blacklist->setText(""); + pB_remove->setEnabled(false); + pB_add->setEnabled(false); +} + + +/*! + * SLOT: called if a item in the TQListBox lB_blacklist is selected. + * Here we enable the remove button pB_remove . + */ +void blacklistEditDialog::lB_blacklist_currentChanged(){ + // enable the remove button + pB_remove->setEnabled(true); +} + + +/*! + * SLOT: called if the input-line in the dialog is modified. Here we enable + * the add button pB_add . + */ +void blacklistEditDialog::lE_blacklist_textChanged(){ + // enable the add button + pB_add->setEnabled(true); +} + +#include "blacklisteditdialog.moc" diff --git a/src/blactdelisteditdialog.h b/src/blactdelisteditdialog.h new file mode 100644 index 0000000..8ae17db --- /dev/null +++ b/src/blactdelisteditdialog.h @@ -0,0 +1,95 @@ +/*************************************************************************** + * Copyright (C) 2005 by Danny Kukawka * + * danny.kukawka@web.de, dkukawka@suse.de * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of version 2 of the GNU General Public License * + * as published by the Free Software Foundation. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +/*! +* \file blacklisteditdialog.h +* \brief Headerfile for blacklisteditdialog.cpp and the class \ref +* blacklistEditDialog . +*/ +/*! +* \class blacklistEditDialog +* \brief class for dialog to edit the blacklist related funtionality +* \author Danny Kukawka, , +* \date 2005 +*/ + +#ifndef BLACKLISTEDITDIALOG_H +#define BLACKLISTEDITDIALOG_H + +#include "blacklistedit_Dialog.h" + +class blacklistEditDialog: public blacklistedit_Dialog { + + Q_OBJECT + + +public: + + //! default constructor + blacklistEditDialog(TQStringList blacklisted, TQString captionName, bool initImport = false, + TQWidget *parent = 0, const char *name = 0); + //! default destructor + ~blacklistEditDialog(); + +private: + + //! TQStringList with the blacklisted processes + /*! + * This TQStringList contains the given blacklisted processes + * for edit. If the dialog changed, we change also this list. + */ + TQStringList blacklist; + + //! to tell if the blacklist was changed + /*! + * This boolean value tells if the current blacklist was changed. + * \li true: if the blacklist changed + * \li false: if the blacklist isn't changed + */ + bool changed; + + +private slots: + + //! called if the 'ok' button clicked + void buttonOk_released(); + //! called if the 'cancel' button clicked + void buttonCancel_released(); + //! called if the 'remove' button clicked + void pB_remove_released(); + //! called if the 'add' button clicked + void pB_add_released(); + //! called if a item of the listbox selected + void lB_blacklist_currentChanged(); + //! called if something input in the TQLineEdit + void lE_blacklist_textChanged(); + +signals: + + //! signal emited if the configuration finished + /*! + * This signal is emited if the configuration is finished + * and the blacklist was modified- + * \return TQStringList (the modified blacklist) + */ + void config_finished( TQStringList ); + +}; + +#endif -- cgit v1.2.3