From 99d509c7c65e2a898f6f238bd2893f1ab72d0102 Mon Sep 17 00:00:00 2001 From: Masayuki Satoh Date: Sat, 23 Aug 2014 20:50:29 +0900 Subject: [PATCH] =?utf8?q?=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=83=93?= =?utf8?q?=E3=83=A5=E3=83=BC=E3=82=A2=E3=82=92=E8=A9=A6=E3=81=97=E5=AE=9F?= =?utf8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Gefu.pro | 6 ++- README.md | 11 +++++- filetablemodel.cpp | 25 ++++++++++-- filetablemodel.h | 6 ++- filetableview.cpp | 110 ++++++++++++++++++++++++++++++++++++++++++++--------- filetableview.h | 6 ++- folderpanel.ui | 3 ++ main.cpp | 6 +-- mainwindow.cpp | 41 +++++++++++++++++--- mainwindow.h | 7 +++- mainwindow.ui | 101 +++++++++++++++++++++++++++++++----------------- simpletextview.cpp | 43 +++++++++++++++++++++ simpletextview.h | 23 +++++++++++ 13 files changed, 316 insertions(+), 72 deletions(-) create mode 100644 simpletextview.cpp create mode 100644 simpletextview.h diff --git a/Gefu.pro b/Gefu.pro index 9d6b7fa..bbe11af 100644 --- a/Gefu.pro +++ b/Gefu.pro @@ -33,7 +33,8 @@ SOURCES += main.cpp\ historydialog.cpp \ preferencedialog.cpp \ clickablelabel.cpp \ - colorsamplemodel.cpp + colorsamplemodel.cpp \ + simpletextview.cpp HEADERS += mainwindow.h \ folderpanel.h \ @@ -55,7 +56,8 @@ HEADERS += mainwindow.h \ historydialog.h \ preferencedialog.h \ clickablelabel.h \ - colorsamplemodel.h + colorsamplemodel.h \ + simpletextview.h FORMS += mainwindow.ui \ folderpanel.ui \ diff --git a/README.md b/README.md index 14b9a53..71f6a44 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Gefu Gefu is an Experimental File Utility. ### TODO -- コンテキストメニュー +- コンテキストメニュー ← 必要? - オプション - ファンクションキー - キーバインドカスタマイズ @@ -15,6 +15,15 @@ Gefu is an Experimental File Utility. - 簡易FTPクライアント - SNS連携(タイムライン表示とか) ← ファイラーの機能か? +#### 2014/08/23 Ver0.09 +- 左右矢印キーに機能割り当て + - 左ペインで左矢印/右ペインで右矢印 → 親フォルダに移動 + - 左ペインで右矢印/右ペインで左矢印 → 反対側のペインにフォーカス +- ファイル名をクリップボードにコピーを実装。 +- フォルダ名をクリップボードにコピーを実装。 +- 不具合修正 + - Windows版で初回起動時、タイトルバーが画面外に出ていた。→ デフォルト位置・サイズ変更。 + #### 2014/08/23 Ver0.08 公開 - 「ターミナルで開く」を実装。 - Shift+ダブルクリックで、ファイルを外部エディタで開くようにした。 diff --git a/filetablemodel.cpp b/filetablemodel.cpp index 04b8148..06d4424 100644 --- a/filetablemodel.cpp +++ b/filetablemodel.cpp @@ -149,23 +149,42 @@ void FileTableModel::setCheckStateAll(Qt::CheckState state) stateChanged(); } - +#if 0 bool FileTableModel::isDir(const QModelIndex &index) const { + if (!index.isValid()) { + qDebug() << "isDir() : index is invalid."; + return QString(); + } return m_fileInfoList[index.row()].isDir(); } const QString FileTableModel::absoluteFilePath(const QModelIndex &index) const { if (!index.isValid()) { - qDebug() << "index is invalid."; + qDebug() << "absoluteFilePath() : index is invalid."; return QString(); } - return m_dir.absoluteFilePath(m_fileInfoList[index.row()].fileName()); +// return m_dir.absoluteFilePath(m_fileInfoList[index.row()].fileName()); + return m_fileInfoList[index.row()].absoluteFilePath(); } +const QString FileTableModel::fileName(const QModelIndex &index) const +{ + if (!index.isValid()) { + qDebug() << "fileName() : index is invalid."; + return QString(); + } + return m_fileInfoList[index.row()].fileName(); +} +#endif + QFileInfo FileTableModel::fileInfo(const QModelIndex &index) const { + if (!index.isValid()) { + qDebug() << "fileInfo() : index is invalid."; + return QFileInfo(); + } return m_fileInfoList[index.row()]; } diff --git a/filetablemodel.h b/filetablemodel.h index d90d587..f21ea6e 100644 --- a/filetablemodel.h +++ b/filetablemodel.h @@ -30,10 +30,12 @@ public: Qt::CheckState checkState(const QModelIndex &index) const; void setCheckState(const QModelIndex &index, Qt::CheckState state); void setCheckStateAll(Qt::CheckState state); - - bool isDir(const QModelIndex &index) const; const QString absolutePath() const { return m_dir.absolutePath(); } +#if 0 + bool isDir(const QModelIndex &index) const; const QString absoluteFilePath(const QModelIndex &index) const; + const QString fileName(const QModelIndex &index) const; +#endif QFileInfoList checkedItems() const; QFileInfo fileInfo(const QModelIndex &index) const; diff --git a/filetableview.cpp b/filetableview.cpp index 3fcdebe..ce2cf51 100644 --- a/filetableview.cpp +++ b/filetableview.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include #define CHECK_FOCUS { \ if (!hasFocus()) { return; } \ @@ -44,7 +46,7 @@ FileTableView::FileTableView(QWidget *parent) : m_dragging(false) { // シグナル/スロットを設定する - connect(MENU_TRRIGGERED(action_Open), this, SLOT(setPath())); + connect(MENU_TRRIGGERED(action_Open), this, SLOT(openItem())); connect(MENU_TRRIGGERED(action_Exec), this, SLOT(openUrl())); connect(MENU_TRRIGGERED(action_OpenEditor), this, SLOT(openEditor())); connect(MENU_TRRIGGERED(action_OpenTerminal), this, SLOT(openTerminal())); @@ -81,11 +83,15 @@ FileTableView::FileTableView(QWidget *parent) : connect(MENU_TRRIGGERED(cmd_Rename), this, SLOT(cmdRename())); connect(MENU_TRRIGGERED(cmd_NewFile), this, SLOT(newFile())); connect(MENU_TRRIGGERED(cmd_NewFolder), this, SLOT(newFolder())); + connect(MENU_TRRIGGERED(copy_Filename), this, SLOT(copyFilenameToClipboard())); + connect(MENU_TRRIGGERED(copy_Fullpath), this, SLOT(copyFullpathToClipboard())); connect(getMainWnd(), SIGNAL(showHiddenFiles(bool)), this, SLOT(showHiddenFiles(bool))); connect(getMainWnd(), SIGNAL(showSystemFiles(bool)), this, SLOT(showSystemFiles(bool))); + connect(this, SIGNAL(openRequested(QFileInfo)), + getMainWnd(), SLOT(openRequest(QFileInfo))); connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onDoubleClick(QModelIndex))); @@ -94,6 +100,11 @@ FileTableView::FileTableView(QWidget *parent) : setDragEnabled(true); setAcceptDrops(true); setDropIndicatorShown(true); + + // Context Menu + setContextMenuPolicy(Qt::CustomContextMenu); + connect(this, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(contextMenuRequested(QPoint))); } FileTableView::~FileTableView() @@ -170,11 +181,22 @@ void FileTableView::updateMenu() } } -void FileTableView::setPath() +void FileTableView::openItem() { CHECK_FOCUS; - setRootIndex(currentIndex()); + QModelIndex index = currentIndex(); + if (!index.isValid()) { + return; + } + + FileTableModel *m = static_cast(model()); + if (m->fileInfo(index).isDir()) { + setRootIndex(index); + } + else { + emit openRequested(m->fileInfo(index)); + } } void FileTableView::openUrl(const QModelIndex &index) @@ -183,7 +205,7 @@ void FileTableView::openUrl(const QModelIndex &index) if (index.isValid()) { FileTableModel *m = static_cast(model()); - QString path = QDir::toNativeSeparators(m->absoluteFilePath(index)); + QString path = QDir::toNativeSeparators(m->fileInfo(index).absoluteFilePath()); QDesktopServices::openUrl(QUrl("file:///" + path)); } else { @@ -210,7 +232,7 @@ void FileTableView::openEditor(const QString &path) QFileInfo info; if (path.isEmpty()) { FileTableModel *m = static_cast(model()); - info.setFile(m->absoluteFilePath(currentIndex())); + info.setFile(m->fileInfo(currentIndex()).absoluteFilePath()); } else { info.setFile(path); @@ -256,7 +278,7 @@ void FileTableView::openTerminal(const QString &path) QFileInfo info; if (path.isEmpty()) { FileTableModel *m = static_cast(model()); - info.setFile(m->absoluteFilePath(currentIndex())); + info.setFile(m->fileInfo(currentIndex()).absoluteFilePath()); } else { info.setFile(path); @@ -645,9 +667,10 @@ void FileTableView::jumpToParent() FileTableModel *m = static_cast(model()); QDir dir(m->absolutePath()); - dir.cdUp(); - - setRootPath(dir.absolutePath(), true); + if (!dir.isRoot()) { + dir.cdUp(); + setRootPath(dir.absolutePath(), true); + } } void FileTableView::jumpToRoot() @@ -912,6 +935,34 @@ void FileTableView::newFolder() } } +void FileTableView::copyFilenameToClipboard() +{ + CHECK_FOCUS; + + QModelIndex index = currentIndex(); + if (!index.isValid()) { + return; + } + + FileTableModel *m = static_cast(model()); + QClipboard *clipboard = QApplication::clipboard(); + clipboard->setText(m->fileInfo(index).fileName()); +} + +void FileTableView::copyFullpathToClipboard() +{ + CHECK_FOCUS; + + QModelIndex index = currentIndex(); + if (!index.isValid()) { + return; + } + + FileTableModel *m = static_cast(model()); + QClipboard *clipboard = QApplication::clipboard(); + clipboard->setText(m->fileInfo(index).absoluteFilePath()); +} + void FileTableView::XXX() { CHECK_FOCUS; @@ -969,16 +1020,16 @@ void FileTableView::onDoubleClick(const QModelIndex &index) FileTableModel *m = static_cast(model()); - if (m->isDir(index)) { + if (m->fileInfo(index).isDir()) { if (QApplication::keyboardModifiers().testFlag(Qt::ControlModifier)) { - openTerminal(m->absoluteFilePath(index)); + openTerminal(m->fileInfo(index).absoluteFilePath()); } else { - setRootPath(m->absoluteFilePath(index), true); + setRootPath(m->fileInfo(index).absoluteFilePath(), true); } } else if (QApplication::keyboardModifiers().testFlag(Qt::ShiftModifier)){ - openEditor(m->absoluteFilePath(index)); + openEditor(m->fileInfo(index).absoluteFilePath()); } else { openUrl(index); @@ -986,6 +1037,17 @@ void FileTableView::onDoubleClick(const QModelIndex &index) } +void FileTableView::contextMenuRequested(const QPoint &pos) +{ + FileTableModel *m = static_cast(model()); + QModelIndex index = indexAt(pos); + if (!index.isValid()) { + return; + } + + Q_UNUSED(m); +} + void FileTableView::setRootIndex(const QModelIndex &index) { if (!index.isValid()) { @@ -994,8 +1056,8 @@ void FileTableView::setRootIndex(const QModelIndex &index) FileTableModel *m = static_cast(model()); - if (m->isDir(index)) { - setRootPath(m->absoluteFilePath(index), true); + if (m->fileInfo(index).isDir()) { + setRootPath(m->fileInfo(index).absoluteFilePath(), true); } } @@ -1028,6 +1090,17 @@ void FileTableView::keyPressEvent(QKeyEvent *event) } } + if (ksq == "Left" || ksq == "Right") { + if (side() == ksq) { + jumpToParent(); + } + else { + getMainWnd()->otherSideView(this)->setFocus(); + } + event->accept(); + return; + } + if (!ksq.isEmpty() && ksq != "Down" && ksq != "Up") { qDebug() << ksq; } @@ -1036,7 +1109,6 @@ void FileTableView::keyPressEvent(QKeyEvent *event) void FileTableView::focusInEvent(QFocusEvent *event) { - qDebug() << "focusInEvent();"; if (!currentIndex().isValid()) { FileTableModel *m = static_cast(model()); if (m) { @@ -1053,8 +1125,10 @@ void FileTableView::currentChanged(const QModelIndex ¤t, const QModelIndex { Q_UNUSED(previous); - FileTableModel *m = static_cast(model()); - emit indexChanged(m->absoluteFilePath(current)); + if (current.isValid()) { + FileTableModel *m = static_cast(model()); + emit indexChanged(m->fileInfo(current).absoluteFilePath()); + } QTableView::currentChanged(current, previous); } diff --git a/filetableview.h b/filetableview.h index 513db97..d3ed0e5 100644 --- a/filetableview.h +++ b/filetableview.h @@ -32,9 +32,10 @@ private: signals: void indexChanged(const QString &text); void filterChanged(); + void openRequested(const QFileInfo &info); private slots: - void setPath(); + void openItem(); void openUrl(const QModelIndex &index = QModelIndex()); void openEditor(const QString &path = QString()); void openTerminal(const QString &path = QString()); @@ -73,6 +74,8 @@ private slots: void cmdRename(); void newFile(); void newFolder(); + void copyFilenameToClipboard(); + void copyFullpathToClipboard(); void XXX(); @@ -81,6 +84,7 @@ private slots: QString *alias, const QString &srcPath, const QString &tgtPath); void onDoubleClick(const QModelIndex &index); + void contextMenuRequested(const QPoint & pos); // QAbstractItemView interface public slots: diff --git a/folderpanel.ui b/folderpanel.ui index 0c6772b..cf22040 100644 --- a/folderpanel.ui +++ b/folderpanel.ui @@ -20,6 +20,9 @@ Form + + 0 + 0 diff --git a/main.cpp b/main.cpp index 4007631..c3282c7 100644 --- a/main.cpp +++ b/main.cpp @@ -34,12 +34,12 @@ int main(int argc, char *argv[]) if (settings.value(IniKey_ConfirmExit, "").toString().isEmpty()) settings.setValue(IniKey_ConfirmExit, true); if (settings.value(IniKey_BootSizeSpec, "").toString().isEmpty()) { - settings.setValue(IniKey_BootSizeSpec, "sizeLast"); + settings.setValue(IniKey_BootSizeSpec, "sizeRelative"); settings.setValue(IniKey_BootSizeAbs, QSize(800,600)); - settings.setValue(IniKey_BootSizeRel, QSize(50,50)); + settings.setValue(IniKey_BootSizeRel, QSize(75,75)); } if (settings.value(IniKey_BootPosSpec, "").toString().isEmpty()) { - settings.setValue(IniKey_BootPosSpec, "posLast"); + settings.setValue(IniKey_BootPosSpec, "posCenter"); settings.setValue(IniKey_BootPosAbs, QPoint(0, 0)); settings.setValue(IniKey_BootPosRel, QPoint(0, 0)); } diff --git a/mainwindow.cpp b/mainwindow.cpp index b5df12f..7c7bac9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -15,7 +15,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), - ui(new Ui::MainWindow) + ui(new Ui::MainWindow), + m_focusedView(NULL) { ui->setupUi(this); ui->RPanel->setSide("Right"); @@ -61,12 +62,13 @@ MainWindow::MainWindow(QWidget *parent) : ui->help_About->setShortcuts(shortcuts); // シグナル/スロットを設定する - connect(ui->action_Setting, SIGNAL(triggered()), this, SLOT(onActionSetting())); + connect(ui->action_Setting, SIGNAL(triggered()), this, SLOT(showPreferenceDialog())); connect(ui->action_Quit, SIGNAL(triggered()), this, SLOT(close())); - connect(ui->help_About, SIGNAL(triggered()), this, SLOT(onHelpAbout())); + connect(ui->help_About, SIGNAL(triggered()), this, SLOT(about())); connect(ui->view_Hidden, SIGNAL(triggered()), this, SLOT(toggleShowHiddenFiles())); connect(ui->view_System, SIGNAL(triggered()), this, SLOT(toggleShowSystemFiles())); connect(ui->check_Update, SIGNAL(triggered()), this, SLOT(checkUpdate())); + connect(ui->plainTextEdit, SIGNAL(viewFinished(QWidget*)), this, SLOT(viewFinish(QWidget*))); // ウィンドウタイトルを設定する setWindowTitle(tr("げふぅ v%1").arg(VERSION_VALUE)); @@ -122,6 +124,9 @@ MainWindow::MainWindow(QWidget *parent) : if (settings.value(IniKey_CheckUpdates).toBool()) { checkUpdate(true); } + +// ui->splitter->setVisible(false); + ui->plainTextEdit->setVisible(false); } MainWindow::~MainWindow() @@ -143,7 +148,24 @@ FileTableView *MainWindow::otherSideView(const FileTableView *view) const return NULL; } -void MainWindow::onActionSetting() +void MainWindow::openRequest(const QFileInfo &info) +{ + m_focusedView = QApplication::focusWidget(); + + setUpdatesEnabled(false); + ui->splitter->setVisible(false); + ui->plainTextEdit->setVisible(true); + ui->plainTextEdit->setFocus(); + setUpdatesEnabled(true); + + QFile file(info.absoluteFilePath()); + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream ts(&file); + ui->plainTextEdit->setPlainText(ts.readAll()); + } +} + +void MainWindow::showPreferenceDialog() { PreferenceDialog dlg(this); @@ -244,7 +266,16 @@ void MainWindow::checkUpdateFinishedSilent(QNetworkReply *reply) checkUpdateFinished(reply, true); } -void MainWindow::onHelpAbout() +void MainWindow::viewFinish(QWidget *sender) +{ + setUpdatesEnabled(false); + sender->setVisible(false); + ui->splitter->setVisible(true); + m_focusedView->setFocus(); + setUpdatesEnabled(true); +} + +void MainWindow::about() { QMessageBox::about( this, diff --git a/mainwindow.h b/mainwindow.h index 4cb6eec..7b29346 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -26,19 +26,22 @@ signals: void showSystemFiles(bool show); public slots: - void onActionSetting(); - void onHelpAbout(); private slots: + void openRequest(const QFileInfo &info); + void showPreferenceDialog(); + void about(); void toggleShowHiddenFiles(); void toggleShowSystemFiles(); void checkUpdate(bool silent = false); void checkUpdateFinished(QNetworkReply *reply); void checkUpdateFinished(QNetworkReply *reply, bool silent); void checkUpdateFinishedSilent(QNetworkReply *reply); + void viewFinish(QWidget *sender); private: Ui::MainWindow *ui; + QWidget *m_focusedView; // QWidget interface protected: diff --git a/mainwindow.ui b/mainwindow.ui index 6b25603..e8d44b2 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -6,15 +6,15 @@ 0 0 - 662 - 324 + 665 + 337 MainWindow - + :/images/Gefu.png:/images/Gefu.png @@ -58,6 +58,9 @@ + + + 0 @@ -242,7 +245,7 @@ 0 0 - 662 + 665 22 @@ -315,6 +318,9 @@ + + + @@ -332,7 +338,7 @@ - + :/images/Exit.png:/images/Exit.png @@ -350,7 +356,7 @@ - + :/images/Open.png:/images/Open.png @@ -365,7 +371,7 @@ - + :/images/Play.png:/images/Play.png @@ -380,7 +386,7 @@ - + :/images/Synchronize.png:/images/Synchronize.png @@ -414,7 +420,7 @@ - + :/images/Ok.png:/images/Ok.png @@ -429,7 +435,7 @@ - + :/images/Check boxes.png:/images/Check boxes.png @@ -444,7 +450,7 @@ - + :/images/Cancel.png:/images/Cancel.png @@ -470,7 +476,7 @@ - + :/images/Text replace.png:/images/Text replace.png @@ -485,7 +491,7 @@ - + :/images/Settings.png:/images/Settings.png @@ -528,7 +534,7 @@ - + :/images/Go down.png:/images/Go down.png @@ -543,7 +549,7 @@ - + :/images/Go up.png:/images/Go up.png @@ -558,7 +564,7 @@ - + :/images/Back.png:/images/Back.png @@ -573,7 +579,7 @@ - + :/images/Forward.png:/images/Forward.png @@ -599,7 +605,7 @@ - + :/images/Up.png:/images/Up.png @@ -614,7 +620,7 @@ - + :/images/Monitor.png:/images/Monitor.png @@ -629,7 +635,7 @@ - + :/images/Folder.png:/images/Folder.png @@ -644,7 +650,7 @@ - + :/images/Home.png:/images/Home.png @@ -681,7 +687,7 @@ - + :/images/Edit page.png:/images/Edit page.png @@ -696,7 +702,7 @@ - + :/images/Export.png:/images/Export.png @@ -711,7 +717,7 @@ - + :/images/Copy.png:/images/Copy.png @@ -726,7 +732,7 @@ - + :/images/Paste.png:/images/Paste.png @@ -738,7 +744,7 @@ - + :/images/Delete.png:/images/Delete.png @@ -753,7 +759,7 @@ - + :/images/Rename.png:/images/Rename.png @@ -768,7 +774,7 @@ - + :/images/New file.png:/images/New file.png @@ -783,7 +789,7 @@ - + :/images/Add folder.png:/images/Add folder.png @@ -798,7 +804,7 @@ - + :/images/Help.png:/images/Help.png @@ -830,7 +836,7 @@ - + :/images/Refresh.png:/images/Refresh.png @@ -856,7 +862,7 @@ - + :/images/Funnel.png:/images/Funnel.png @@ -880,6 +886,28 @@ V + + + ファイル名をクリップボードにコピー + + + ファイル名をクリップボードにコピー + + + C + + + + + フルパス名をクリップボードにコピー + + + フルパス名をクリップボードにコピー + + + Shift+C + + @@ -889,9 +917,12 @@
folderpanel.h
1 + + SimpleTextView + QPlainTextEdit +
simpletextview.h
+
- - - + diff --git a/simpletextview.cpp b/simpletextview.cpp new file mode 100644 index 0000000..465a443 --- /dev/null +++ b/simpletextview.cpp @@ -0,0 +1,43 @@ +#include "common.h" +#include "simpletextview.h" + +#include +#include + +SimpleTextView::SimpleTextView(QWidget *parent) : + QPlainTextEdit(parent) +{ + setReadOnly(true); + + QSettings settings; + QPalette palette = this->palette(); + palette.setColor(QPalette::Base, + settings.value(IniKey_ViewColorBgNormal).value()); + palette.setColor(QPalette::Text, + settings.value(IniKey_ViewColorFgNormal).value()); + setPalette(palette); +} + + +void SimpleTextView::keyPressEvent(QKeyEvent *event) +{ + QString modifier = QString::null; + if (event->modifiers() & Qt::ShiftModifier) { modifier += "Shift+"; } + if (event->modifiers() & Qt::ControlModifier) { modifier += "Ctrl+"; } + if (event->modifiers() & Qt::AltModifier) { modifier += "Alt+"; } + if (event->modifiers() & Qt::MetaModifier) { modifier += "Meta+"; } + + QString key = QKeySequence(event->key()).toString(); + QString ksq = QKeySequence(modifier + key).toString(); + + if (ksq == "Return" || ksq == "Backspace" || ksq == "W") { + emit viewFinished(this); + event->accept(); + return; + } + + if (ksq != "Down" && ksq != "Up") { + qDebug() << ksq; + } + QPlainTextEdit::keyPressEvent(event); +} diff --git a/simpletextview.h b/simpletextview.h new file mode 100644 index 0000000..2fefd7b --- /dev/null +++ b/simpletextview.h @@ -0,0 +1,23 @@ +#ifndef SIMPLETEXTVIEW_H +#define SIMPLETEXTVIEW_H + +#include + +class SimpleTextView : public QPlainTextEdit +{ + Q_OBJECT +public: + explicit SimpleTextView(QWidget *parent = 0); + +signals: + void viewFinished(QWidget *sender); + +public slots: + + + // QWidget interface +protected: + void keyPressEvent(QKeyEvent *event); +}; + +#endif // SIMPLETEXTVIEW_H -- 2.11.0