• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_QtDlg_FileOpenSaveAs.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* 
00004  * Copyright (C) 2013 Serhat Kiyak <serhatkiyak91@gmail.com>
00005  * 
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef XAP_QTDIALOG_FILEOPENSAVEAS_H
00023 #define XAP_QTDIALOG_FILEOPENSAVEAS_H
00024 
00025 #include <QPixmap>
00026 #include <QWidget>
00027 #include <QMainWindow>
00028 #include <QFileDialog>
00029 #include <QString>
00030 #include <QStringList>
00031 #include <QtDebug>
00032 
00033 #include "xap_Dlg_FileOpenSaveAs.h"
00034 #include "xap_Strings.h"
00035 #include "ut_vector.h"
00036 
00037 class XAP_Frame;
00038 class UT_ByteBuf;
00039 /*****************************************************************/
00040 
00041 class XAP_QtDialog_FileOpenSaveAs : public XAP_Dialog_FileOpenSaveAs
00042 {
00043 public:
00044     XAP_QtDialog_FileOpenSaveAs(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00045     virtual ~XAP_QtDialog_FileOpenSaveAs(void);
00046 
00047     virtual void            runModal(XAP_Frame * pFrame);
00048 
00049     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00050     gint previewPicture ();
00051 
00052     void fileTypeChanged(QWidget * w);
00053     void onDeleteCancel (void);
00054 
00055 protected:
00056     QPixmap *               pixmapForByteBuf (UT_ByteBuf * pBB);
00057     QPixmap *               _loadXPM(UT_ByteBuf * pBB);
00058 
00059     bool                    _run_gtk_main(XAP_Frame * pFrame,
00060                                           QWidget * filetypes_pulldown);
00061     void                    _notifyError_OKOnly(XAP_Frame * pFrame,
00062                                                 XAP_String_Id sid);
00063     void                    _notifyError_OKOnly(XAP_Frame * pFrame,
00064                                                 XAP_String_Id sid,
00065                                                 const char * sz1);
00066     bool                    _askOverwrite_YesNo(XAP_Frame * pFrame,
00067                                                 const char * fileName);
00068 
00069     QFileDialog *           m_fileDialog;
00070     QWidget *           m_preview;
00071 private:
00072     bool                m_bSave;
00073 protected:
00074     XAP_Frame *         m_pFrame;
00075     char *              m_szFinalPathnameCandidate;
00076 private:
00077     QWidget *           m_wFileTypes_PullDown;
00078 
00079 };
00080 
00081 #endif /* XAP_QTDIALOG_FILEOPENSAVEAS_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1