Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PrefixSettings.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2002 by Yann Hodique                                    *
00003  *   Yann.Hodique@lifl.fr                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #include "PrefixSettings.h"
00012 
00013 #include <qlistbox.h>
00014 #include <qlineedit.h>
00015 
00016 PrefixSettings::PrefixSettings(QWidget *parent, const char *name)
00017         : PrefixSettingsBase(parent, name) {}
00018 
00019 
00020 PrefixSettings::~PrefixSettings() {}
00021 
00022 void PrefixSettings::addPrefixItem(PrefixItem & it) {
00023     map.insert(it.name,it);
00024     prefix_box->insertItem(it.name);
00025 }
00026 
00027 void PrefixSettings::delPrefixItem(const QString& name) {
00028     map.remove(name);
00029 }
00030 
00031 void PrefixSettings::slotAdd() {
00032     if (name_edit->text().length()) {
00033         PrefixItem it(name_edit->text());
00034         addPrefixItem(it);
00035     }
00036 }
00037 
00038 void PrefixSettings::slotDel() {
00039     delPrefixItem(QString(prefix_box->currentText()));
00040     prefix_box->removeItem(prefix_box->currentItem());
00041 }

Generated on Sat May 10 15:09:27 2003 for qnet by doxygen1.3