Browse Source

Split header file: fb2tree.hpp => fb2tree.hpp + fb2tree.h

Kandrashin Denis 13 năm trước cách đây
mục cha
commit
d899a920b5
4 tập tin đã thay đổi với 91 bổ sung83 xóa
  1. 68 67
      fb2edit.pro
  2. 17 0
      source/fb2tree.h
  3. 5 15
      source/fb2tree.hpp
  4. 1 1
      source/fb2view.cpp

+ 68 - 67
fb2edit.pro

@@ -1,67 +1,68 @@
-HEADERS = \
-    source/fb2xml.h \
-    source/fb2xml2.h \
-    source/fb2app.hpp \
-    source/fb2code.hpp \
-    source/fb2head.hpp \
-    source/fb2main.hpp \
-    source/fb2read.hpp \
-    source/fb2temp.hpp \
-    source/fb2tree.hpp \
-    source/fb2view.hpp \
-    source/fb2utils.h \
-    source/fb2save.hpp \
-    source/fb2dlgs.hpp
-
-SOURCES = \
-    source/fb2app.cpp \
-    source/fb2code.cpp \
-    source/fb2head.cpp \
-    source/fb2main.cpp \
-    source/fb2read.cpp \
-    source/fb2save.cpp \
-    source/fb2temp.cpp \
-    source/fb2tree.cpp \
-    source/fb2view.cpp \
-    source/fb2xml.cpp \
-    source/fb2xml2.cpp \
-    source/fb2utils.cpp \
-    source/fb2dlgs.cpp
-
-RESOURCES = \
-    3rdparty/gnome/gnome.qrc \
-    source/res/fb2edit.qrc \
-    source/js/javascript.qrc \
-    3rdparty/fb2/fb2.qrc
-
-TARGET = fb2edit
-
-TRANSLATIONS = source/ts/ru.ts
-
-VERSION = 0.01.1
-
-QT += xml
-QT += webkit
-QT += network
-
-OTHER_FILES += \
-    source/res/style.css \
-    source/res/blank.fb2 \
-    source/js/export.js \
-    source/js/set_cursor.js \
-    source/js/get_status.js \
-    source/js/get_location.js \
-    source/js/insert_title.js \
-    CMakeLists.txt
-
-if (unix) {
-
-    DEFINES += FB2_USE_LIBXML2
-    INCLUDEPATH += /usr/include/libxml2
-    LIBS += -lxml2
-
-}
-
-FORMS += \
-    source/fb2note.ui \
-    source/fb2find.ui
+HEADERS = \
+    source/fb2xml.h \
+    source/fb2xml2.h \
+    source/fb2app.hpp \
+    source/fb2code.hpp \
+    source/fb2head.hpp \
+    source/fb2main.hpp \
+    source/fb2read.hpp \
+    source/fb2temp.hpp \
+    source/fb2tree.hpp \
+    source/fb2view.hpp \
+    source/fb2utils.h \
+    source/fb2save.hpp \
+    source/fb2dlgs.hpp \
+    source/fb2tree.h
+
+SOURCES = \
+    source/fb2app.cpp \
+    source/fb2code.cpp \
+    source/fb2head.cpp \
+    source/fb2main.cpp \
+    source/fb2read.cpp \
+    source/fb2save.cpp \
+    source/fb2temp.cpp \
+    source/fb2tree.cpp \
+    source/fb2view.cpp \
+    source/fb2xml.cpp \
+    source/fb2xml2.cpp \
+    source/fb2utils.cpp \
+    source/fb2dlgs.cpp
+
+RESOURCES = \
+    3rdparty/gnome/gnome.qrc \
+    source/res/fb2edit.qrc \
+    source/js/javascript.qrc \
+    3rdparty/fb2/fb2.qrc
+
+TARGET = fb2edit
+
+TRANSLATIONS = source/ts/ru.ts
+
+VERSION = 0.01.1
+
+QT += xml
+QT += webkit
+QT += network
+
+OTHER_FILES += \
+    source/res/style.css \
+    source/res/blank.fb2 \
+    source/js/export.js \
+    source/js/set_cursor.js \
+    source/js/get_status.js \
+    source/js/get_location.js \
+    source/js/insert_title.js \
+    CMakeLists.txt
+
+if (unix) {
+
+    DEFINES += FB2_USE_LIBXML2
+    INCLUDEPATH += /usr/include/libxml2
+    LIBS += -lxml2
+
+}
+
+FORMS += \
+    source/fb2note.ui \
+    source/fb2find.ui

+ 17 - 0
source/fb2tree.h

@@ -0,0 +1,17 @@
+#ifndef FB2TREE_H
+#define FB2TREE_H
+
+#include <QWebElement>
+
+class Fb2WebElement : public QWebElement
+{
+public:
+    Fb2WebElement() {}
+    Fb2WebElement(const QWebElement &x) : QWebElement(x) {}
+    Fb2WebElement &operator=(const QWebElement &x) { QWebElement::operator=(x); return *this; }
+
+public:
+    void select();
+};
+
+#endif // FB2TREE_H

+ 5 - 15
source/fb2tree.hpp

@@ -1,27 +1,17 @@
-#ifndef FB2TREE_H
-#define FB2TREE_H
+#ifndef FB2TREE_HPP
+#define FB2TREE_HPP
 
 #include <QAbstractItemModel>
 #include <QTreeView>
 #include <QTimer>
 #include <QToolBar>
-#include <QWebElement>
+
+#include "fb2tree.h"
 
 class Fb2WebView;
 
 class Fb2TreeModel;
 
-class Fb2WebElement : public QWebElement
-{
-public:
-    Fb2WebElement() {}
-    Fb2WebElement(const QWebElement &x) : QWebElement(x) {}
-    Fb2WebElement &operator=(const QWebElement &x) { QWebElement::operator=(x); return *this; }
-
-public:
-    void select();
-};
-
 class Fb2TreeItem: public QObject
 {
     Q_OBJECT
@@ -147,4 +137,4 @@ protected:
     Fb2TreeView * m_tree;
 };
 
-#endif // FB2TREE_H
+#endif // FB2TREE_HPP

+ 1 - 1
source/fb2view.cpp

@@ -1,9 +1,9 @@
 #include "fb2view.hpp"
 #include "fb2dlgs.hpp"
 #include "fb2read.hpp"
-#include "fb2tree.hpp"
 #include "fb2save.hpp"
 #include "fb2utils.h"
+#include "fb2tree.h"
 #include "fb2xml2.h"
 
 #include <QAction>