parts/filecreate/filecreate_newfile.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Julian Rockey * 00003 * linux@jrockey.com * 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 #ifndef FILECREATE_NEWFILE_H 00011 #define FILECREATE_NEWFILE_H 00012 00013 #include <qptrlist.h> 00014 #include <qmap.h> 00015 #include <kurl.h> 00016 #include <kdialogbase.h> 00017 00018 #include "filecreate_filetype.h" 00019 00020 class KURLRequester; 00021 class QGridLayout; 00022 class KComboBox; 00023 class QCheckBox; 00024 class QLineEdit; 00025 00026 namespace FileCreate { 00027 class NewFileChooser : public KDialogBase { 00028 Q_OBJECT 00029 public: 00030 NewFileChooser(QWidget *parent=0); 00031 virtual ~NewFileChooser(); 00032 void setFileTypes(QPtrList<FileType> typelist); 00033 KURL url() const; 00034 bool addToProject() const; 00035 const FileType *selectedType() const; 00036 void setCurrent(const FileType *filetype); 00037 void setDirectory(const QString & url); 00038 void setName(const QString & name); 00039 private slots: 00040 void slotFileNameChanged(const QString &); 00041 protected: 00042 void addType(const FileType * filetype); 00043 00044 QGridLayout *m_grid; 00045 KURLRequester *m_urlreq; 00046 KComboBox *m_filetypes; 00047 QCheckBox *m_addToProject; 00048 QLineEdit *m_filename; 00049 00050 QMap<int,const FileType*> m_typeInCombo; 00051 00052 }; 00053 00054 } 00055 00056 #endif