diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/dialogs/settings/filemasks.cpp | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/dialogs/settings/filemasks.cpp')
-rw-r--r-- | quanta/dialogs/settings/filemasks.cpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/quanta/dialogs/settings/filemasks.cpp b/quanta/dialogs/settings/filemasks.cpp new file mode 100644 index 00000000..14e824c1 --- /dev/null +++ b/quanta/dialogs/settings/filemasks.cpp @@ -0,0 +1,67 @@ +/*************************************************************************** + filesmask.cpp - description + ------------------- + begin : Fri May 19 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua> + (C) 2002 Andras Mantia <amantia@kde.org> + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "filemasks.h" +#include "filemasks.moc" +// qt includes +#include <qlineedit.h> +#include <qpushbutton.h> + +//kde includes +#include <kmimetype.h> + +FileMasks::FileMasks(QWidget *parent, const char *name) + :FileMasksS(parent,name) +{ + connect(buttonDefault, SIGNAL(clicked()), this, SLOT(setToDefault())); +} + +FileMasks::~FileMasks(){ +} +/** set masks to default */ +void FileMasks::setToDefault() +{ + KMimeType::List list = KMimeType::allMimeTypes(); + KMimeType::List::iterator it; + QString markup, script, image, text; + markup = "text/css; text/html; text/sgml; text/xml; "; + script = "text/x-perl; text/x-python; text/x-php; text/x-java; text/x-asp; "; + QString name; + for ( it = list.begin(); it != list.end(); ++it ) + { + name = (*it)->name(); + if (name.contains("text")) + { + if (!markup.contains(name) && !script.contains(name)) + text += name+"; "; + } + if (name.contains("image")) + { + image += name +"; "; + } + } + lineMarkup->setText(markup); + lineScript->setText(script); + lineImage->setText(image); + lineText->setText(text); + +/* + lineHTML->setText("*.*html *.*htm *.php* *.asp *.cfm *.css *.inc* *.*HTML *.*HTM *.PHP* *.ASP *.CFM *.CSS *.INC* "); + linePHP->setText( "*.php* *.PHP*" ); + lineImages->setText("*.gif *.jpg *.png *.jpeg *.bmp *.GIF *.JPG *.PNG *.JPEG *.BMP "); + lineText->setText( "*.txt *.TXT " ); + */ +} |