]> git.lyx.org Git - features.git/commitdiff
Transfer FileDialog.h to qt4/
authorAbdelrazak Younes <younes@lyx.org>
Thu, 7 Feb 2008 00:05:18 +0000 (00:05 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 7 Feb 2008 00:05:18 +0000 (00:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22821 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/FileDialog.h [deleted file]
src/frontends/Makefile.am
src/frontends/qt4/FileDialog.cpp
src/frontends/qt4/FileDialog.h [new file with mode: 0644]
src/frontends/qt4/GuiClipboard.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/LyXFileDialog.h
src/frontends/qt4/Makefile.am
src/frontends/qt4/qt_helpers.cpp

diff --git a/src/frontends/FileDialog.h b/src/frontends/FileDialog.h
deleted file mode 100644 (file)
index a4e69da..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-// -*- C++ -*-
-/**
- * \file FileDialog.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author unknown
- * \author John Levon
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef FILEDIALOG_H
-#define FILEDIALOG_H
-
-#include "lfuns.h"
-#include "support/docstring.h"
-
-#include <string>
-
-
-namespace lyx {
-
-namespace support { class FileFilterList; }
-
-
-/**
- * \class FileDialog
- * \brief GUI-I definition of file dialog interface
- */
-class FileDialog
-{
-public:
-       /// label, directory path button
-       typedef std::pair<docstring, docstring> Button;
-
-       /// result type
-       enum ResultType {
-               Later, /**< modeless chooser, no result */
-               Chosen /**< string contains filename */
-       };
-
-       /// result return
-       typedef std::pair<FileDialog::ResultType, docstring> Result;
-
-       /**
-        * Constructs a file dialog with title \param title.
-        * If \param a is \const LFUN_SELECT_FILE_SYNC then a value
-        * will be returned immediately upon performing a open(),
-        * otherwise a callback Dispatch() will be invoked with the filename as
-        * argument, of action \param a.
-        *
-        * Up to two optional extra buttons are allowed for specifying
-        * additional directories in the navigation (an empty
-        * directory is interpreted as FileName::getcwd())
-        */
-       FileDialog(docstring const & title, kb_action a = LFUN_SELECT_FILE_SYNC);
-
-       ~FileDialog();
-
-       void setButton1(docstring const & label, docstring const & dir);
-       void setButton2(docstring const & label, docstring const & dir);
-
-       /// Choose a file for opening, starting in directory \c path.
-       Result const open(docstring const & path,
-                         support::FileFilterList const & filters,
-                         docstring const & suggested);
-
-       /// Choose a directory, starting in directory \c path.
-       Result const opendir(docstring const & path = docstring(),
-                            docstring const & suggested = docstring());
-
-       /// Choose a file for saving, starting in directory \c  path.
-       Result const save(docstring const & path,
-                         support::FileFilterList const & filters,
-                         docstring const & suggested);
-
-private:
-       class Private;
-       friend class Private;
-       Private * private_;
-
-       /// the dialog title
-       docstring title_;
-
-       /// success action to perform if not synchronous
-       kb_action success_;
-};
-
-} // namespace lyx
-
-#endif // FILEDIALOG_H
index cb17040b123fc231cb3140c06255e7a9b6c31d00..adda793d944fbe4cd527995ce4b58f18f59e149a 100644 (file)
@@ -13,7 +13,6 @@ liblyxfrontends_la_SOURCES = \
        Application.h \
        NoGuiFontLoader.h \
        NoGuiFontMetrics.h \
-       FileDialog.h \
        FontLoader.h \
        FontMetrics.h \
        KeyModifier.h \
index eb956cdf374aa05754f2ac20f8900786acb8d356..50d98c59eb5407fb848229f33e3ba53d9d8be984 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <config.h>
 
-#include "frontends/FileDialog.h"
+#include "FileDialog.h"
 
 #include "LyXFileDialog.h"
 #include "qt_helpers.h"
diff --git a/src/frontends/qt4/FileDialog.h b/src/frontends/qt4/FileDialog.h
new file mode 100644 (file)
index 0000000..a4e69da
--- /dev/null
@@ -0,0 +1,92 @@
+// -*- C++ -*-
+/**
+ * \file FileDialog.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author unknown
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef FILEDIALOG_H
+#define FILEDIALOG_H
+
+#include "lfuns.h"
+#include "support/docstring.h"
+
+#include <string>
+
+
+namespace lyx {
+
+namespace support { class FileFilterList; }
+
+
+/**
+ * \class FileDialog
+ * \brief GUI-I definition of file dialog interface
+ */
+class FileDialog
+{
+public:
+       /// label, directory path button
+       typedef std::pair<docstring, docstring> Button;
+
+       /// result type
+       enum ResultType {
+               Later, /**< modeless chooser, no result */
+               Chosen /**< string contains filename */
+       };
+
+       /// result return
+       typedef std::pair<FileDialog::ResultType, docstring> Result;
+
+       /**
+        * Constructs a file dialog with title \param title.
+        * If \param a is \const LFUN_SELECT_FILE_SYNC then a value
+        * will be returned immediately upon performing a open(),
+        * otherwise a callback Dispatch() will be invoked with the filename as
+        * argument, of action \param a.
+        *
+        * Up to two optional extra buttons are allowed for specifying
+        * additional directories in the navigation (an empty
+        * directory is interpreted as FileName::getcwd())
+        */
+       FileDialog(docstring const & title, kb_action a = LFUN_SELECT_FILE_SYNC);
+
+       ~FileDialog();
+
+       void setButton1(docstring const & label, docstring const & dir);
+       void setButton2(docstring const & label, docstring const & dir);
+
+       /// Choose a file for opening, starting in directory \c path.
+       Result const open(docstring const & path,
+                         support::FileFilterList const & filters,
+                         docstring const & suggested);
+
+       /// Choose a directory, starting in directory \c path.
+       Result const opendir(docstring const & path = docstring(),
+                            docstring const & suggested = docstring());
+
+       /// Choose a file for saving, starting in directory \c  path.
+       Result const save(docstring const & path,
+                         support::FileFilterList const & filters,
+                         docstring const & suggested);
+
+private:
+       class Private;
+       friend class Private;
+       Private * private_;
+
+       /// the dialog title
+       docstring title_;
+
+       /// success action to perform if not synchronous
+       kb_action success_;
+};
+
+} // namespace lyx
+
+#endif // FILEDIALOG_H
index 4b056ec018ab45577ef9f298f7a04967ab49c747..4a05c6bba0d6df2de6de1e3c3d1e6fd326c8be5d 100644 (file)
 
 #include <config.h>
 
+#include "FileDialog.h"
+
+#include "frontends/alert.h"
+
 #include "Buffer.h"
 #include "BufferView.h"
 #include "Cursor.h"
 #include "GuiClipboard.h"
 #include "qt_helpers.h"
 
-#include "boost/assert.hpp"
+#include "support/convert.h"
+#include "support/debug.h"
+#include "support/filetools.h"
+#include "support/FileFilterList.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
 
 #include <QApplication>
 #include <QBuffer>
 #include <QString>
 #include <QStringList>
 
-#include "support/convert.h"
-#include "support/debug.h"
-#include "support/filetools.h"
-#include "support/FileFilterList.h"
-#include "support/gettext.h"
-#include "support/lstrings.h"
-
-#include "frontends/alert.h"
-#include "frontends/FileDialog.h"
+#include "boost/assert.hpp"
 
 #include <map>
 
index 2789220d97eb459c5b52e4b4045ecf1a9f822da7..62d4905faca9054c4c26c033b1d55e510d34369c 100644 (file)
@@ -16,7 +16,7 @@
 #include "GuiView.h"
 
 #include "Dialog.h"
-#include "frontends/FileDialog.h"
+#include "FileDialog.h"
 #include "GuiApplication.h"
 #include "GuiWorkArea.h"
 #include "GuiKeySymbol.h"
index 66e22a9758107c24ad766ccdf5e8f4e7bb712d1a..f04bfe459090dbc25737120f520282d9b5c604da 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef LYXFILEDIALOG_H
 #define LYXFILEDIALOG_H
 
-#include "frontends/FileDialog.h"
+#include "FileDialog.h"
 
 #include <QFileDialog>
 
index 7a78757000d80d9729dd2aeb5b6911ea3f235ac0..576ce535bbad37857e4b63bf22fb23d25732f13c 100644 (file)
@@ -136,6 +136,7 @@ SOURCEFILES = \
 
 NOMOCHEADER = \
        ButtonController.h \
+       FileDialog.h \
        GuiFontLoader.h \
        GuiFontMetrics.h \
        GuiImage.h \
index 3b09d9a941b6a3b25fde97c44535f23d9ad5a632..9072b81fb0f45b2f1165c9b9bcbefbd7d30f4e52 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "qt_helpers.h"
 
+#include "FileDialog.h"
 #include "LengthCombo.h"
 
 #include "support/debug.h"
@@ -21,7 +22,6 @@
 #include "Language.h"
 #include "Length.h"
 
-#include "frontends/FileDialog.h"
 #include "frontends/alert.h"
 
 #include "support/filetools.h"