-QT += core gui xml opengl sql
+QT += core gui xml opengl sql webkit
INCLUDEPATH += engine/layer1 engine/layer2 visualizer visualizer/component visualizer/toolwindow visualizer/component/shape treeview codeeditor receptoreditor axoneditor axonterminaleditor
dccontainersaver.h \
visualizer/toolwindow/dccelltypecombobox.h \
visualizer/toolwindow/dccellcodetypecombobox.h \
- dialog/dcrenamecelldialog.h
+ dialog/dcrenamecelldialog.h \
+ uieditor/dcuieditor.h \
+ uieditor/dcuitexteditor.h
SOURCES = main.cpp \
mainwindow.cpp \
dccontainersaver.cpp \
visualizer/toolwindow/dccelltypecombobox.cpp \
visualizer/toolwindow/dccellcodetypecombobox.cpp \
- dialog/dcrenamecelldialog.cpp
+ dialog/dcrenamecelldialog.cpp \
+ uieditor/dcuieditor.cpp \
+ uieditor/dcuitexteditor.cpp
RESOURCES = denncoCreator.qrc
#include "dialog/dcaddcellcodeclassdialog.h"
#include "dialog/dcaddcelldialog.h"
+#include "uieditor/dcuieditor.h"
+
#include <QList>
#include <QItemSelectionModel>
#include <QModelIndexList>
{
bool isDir = d_fileSystemModel.isDir(index);
bool isPage = false;
- if (!isDir && d_fileSystemModel.fileInfo(index).completeSuffix() == "xhtml")
+ bool isHtml = false;
+ if (!isDir)
{
- isPage = true;
+ if (d_fileSystemModel.fileInfo(index).completeSuffix() == "xhtml")
+ {
+ isPage = true;
+ isHtml = true;
+ }
+ else if (d_fileSystemModel.fileInfo(index).completeSuffix() == "htm")
+ {
+ isHtml = true;
+ }
+ else if (d_fileSystemModel.fileInfo(index).completeSuffix() == "html")
+ {
+ isHtml = true;
+ }
}
if (!IsIndexUnderContainer(&d_fileSystemModel, index))
{
+ if (isHtml)
+ {
+ DCUIEditor *editor = DCUIEditor::getEditor();
+ editor->startEditing(d_fileSystemModel.filePath(index));
+ }
event->accept();
return;
}
nameFilters << "*.xhtml";
nameFilters << "property.xml";
nameFilters << "data.db";
+ nameFilters << "*.html";
+ nameFilters << "*.htm";
d_fileSystemModel.setNameFilters(nameFilters);
d_fileSystemModel.setNameFilterDisables(false);
setRootIndex(idx);
--- /dev/null
+// Copyright (c) 2012 Dennco Project
+//
+// 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 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+//
+// Created by tkawata on Oct-20, 2012.
+//
+#include "dcuitexteditor.h"
+
+DCUITextEditor::DCUITextEditor(QWidget *parent) :
+ QPlainTextEdit(parent)
+{
+ QFont font;
+ font.setFamily("Courier");
+ font.setFixedPitch(true);
+ font.setPointSize(10);
+ setFont(font);
+ QFontMetrics fontMetrics(font);
+ setTabStopWidth(fontMetrics.width(" ") * 4);
+
+}
--- /dev/null
+// Copyright (c) 2012 Dennco Project
+//
+// 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 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+//
+// Created by tkawata on Oct-20, 2012.
+//
+#ifndef DCUITEXTEDITOR_H
+#define DCUITEXTEDITOR_H
+
+#include <QPlainTextEdit>
+
+class DCUITextEditor : public QPlainTextEdit
+{
+ Q_OBJECT
+public:
+ explicit DCUITextEditor(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // DCUITEXTEDITOR_H