diff --git a/manualtests/bookmarks/.gitignore b/manualtests/bookmarks/.gitignore deleted file mode 100644 index 7e1f6a7..0000000 --- a/manualtests/bookmarks/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bookmarks diff --git a/manualtests/bookmarks/bookmarks.pro b/manualtests/bookmarks/bookmarks.pro deleted file mode 100644 index dcb2e21..0000000 --- a/manualtests/bookmarks/bookmarks.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) -include(../../autotests/modeltest/modeltest.pri) - -# Input -SOURCES += main_bookmarks.cpp -HEADERS += diff --git a/manualtests/bookmarks/main_bookmarks.cpp b/manualtests/bookmarks/main_bookmarks.cpp deleted file mode 100644 index bf36472..0000000 --- a/manualtests/bookmarks/main_bookmarks.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include - -#include "addbookmarkdialog.h" -#include "bookmarksdialog.h" -#include "bookmarksmanager.h" -#include "bookmarksmodel.h" -#include "browserapplication.h" -#include "modeltest.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QCoreApplication::setApplicationName(QLatin1String("endorphin")); - QCoreApplication::setApplicationVersion(QLatin1String("0.1")); - - new ModelTest(BrowserApplication::bookmarksManager()->bookmarksModel()); - BookmarksDialog *dialog = new BookmarksDialog; - dialog->show(); - - QString url("http://www.reddit.com"); - AddBookmarkDialog adddialog; - adddialog.setTitle(QString("Reddit.com: a time drain")); - adddialog.setUrl(url); - //adddialog.show(); - - QMenuBar bar; - QMenu *edit = bar.addMenu(("&Edit")); - edit->addAction(BrowserApplication::bookmarksManager()->undoRedoStack()->createUndoAction(edit)); - edit->addAction(BrowserApplication::bookmarksManager()->undoRedoStack()->createRedoAction(edit)); - return app.exec(); -} - diff --git a/manualtests/downloadmanager/.gitignore b/manualtests/downloadmanager/.gitignore deleted file mode 100644 index 45b3fdd..0000000 --- a/manualtests/downloadmanager/.gitignore +++ /dev/null @@ -1 +0,0 @@ -downloadmanager diff --git a/manualtests/downloadmanager/downloadmanager.pro b/manualtests/downloadmanager/downloadmanager.pro deleted file mode 100644 index 79f26c3..0000000 --- a/manualtests/downloadmanager/downloadmanager.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) - -# Input -RESOURCES = -SOURCES += main_downloadmanager.cpp -HEADERS += diff --git a/manualtests/downloadmanager/main_downloadmanager.cpp b/manualtests/downloadmanager/main_downloadmanager.cpp deleted file mode 100644 index e6c9a3d..0000000 --- a/manualtests/downloadmanager/main_downloadmanager.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include "downloadmanager.h" - -int main(int argc, char **argv) -{ - QApplication application(argc, argv); - - DownloadManager manager; - QUrl url("http://10.0.0.3/~ben/distccKNOPPIX-1.3-2004-08-20-gcc-3.3.iso"); - manager.download(url); - manager.show(); - - return application.exec(); -} - diff --git a/manualtests/history/.gitignore b/manualtests/history/.gitignore deleted file mode 100644 index c375d5b..0000000 --- a/manualtests/history/.gitignore +++ /dev/null @@ -1 +0,0 @@ -history diff --git a/manualtests/history/history.pro b/manualtests/history/history.pro deleted file mode 100644 index 2fa000d..0000000 --- a/manualtests/history/history.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) -include(../../autotests/modeltest/modeltest.pri) - -# Input -SOURCES += main_history.cpp -HEADERS += diff --git a/manualtests/history/main_history.cpp b/manualtests/history/main_history.cpp deleted file mode 100644 index 7da85ae..0000000 --- a/manualtests/history/main_history.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include -#include - -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - QApplication application(argc, argv); - QMainWindow w; - - QCoreApplication::setApplicationName("endorphin"); - - HistoryManager history; - - QTabWidget tabWidget; - - QTableView *historyModelView = new QTableView(&tabWidget); - historyModelView->horizontalHeader()->setStretchLastSection(true); - historyModelView->setModel(history.historyModel()); - tabWidget.addTab(historyModelView, "HistoryModel"); - - QTableView *historyFilterModelView = new QTableView(&tabWidget); - historyFilterModelView->horizontalHeader()->setStretchLastSection(true); - historyFilterModelView->setModel(history.historyFilterModel()); - tabWidget.addTab(historyFilterModelView, "HistoryFilterModel"); - - QTreeView *historyTreeModelView = new QTreeView(&tabWidget); - historyTreeModelView->header()->setStretchLastSection(true); - historyTreeModelView->setModel(history.historyTreeModel()); - new ModelTest(history.historyTreeModel()); - tabWidget.addTab(historyTreeModelView, "HistoryTreeModel"); - - QTreeView *historyMenuModelView = new QTreeView(&tabWidget); - historyMenuModelView->header()->setStretchLastSection(true); - HistoryMenuModel *menuModel = new HistoryMenuModel((HistoryTreeModel*)history.historyTreeModel(), &tabWidget); - new ModelTest(menuModel); - historyMenuModelView->setModel(menuModel); - tabWidget.addTab(historyMenuModelView, "HistoryMenuModel"); - - QTableView *historyCompletionModelView = new QTableView(&tabWidget); - historyCompletionModelView->horizontalHeader()->setStretchLastSection(true); - HistoryCompletionModel *completionModel = new HistoryCompletionModel(&tabWidget); - completionModel->setSourceModel(history.historyFilterModel()); - historyCompletionModelView->setModel(completionModel); - tabWidget.addTab(historyCompletionModelView, "HistoryCompletionModel"); - - HistoryDialog dialog(0, &history); - tabWidget.addTab(dialog.tree, "DialogModel"); - - tabWidget.setCurrentIndex(3); - tabWidget.show(); - - return application.exec(); -} - diff --git a/manualtests/locationbar/.gitignore b/manualtests/locationbar/.gitignore deleted file mode 100644 index 3c98d71..0000000 --- a/manualtests/locationbar/.gitignore +++ /dev/null @@ -1 +0,0 @@ -locationbar diff --git a/manualtests/locationbar/locationbar.pro b/manualtests/locationbar/locationbar.pro deleted file mode 100644 index 41b93df..0000000 --- a/manualtests/locationbar/locationbar.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) - -# Input -SOURCES += main_locationbar.cpp -HEADERS += - diff --git a/manualtests/locationbar/main_locationbar.cpp b/manualtests/locationbar/main_locationbar.cpp deleted file mode 100644 index bf36c19..0000000 --- a/manualtests/locationbar/main_locationbar.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include - -#include "browserapplication.h" -#include "locationbar.h" -#include "webview.h" - -int main(int argc, char **argv) -{ - BrowserApplication application(argc, argv); - QCoreApplication::setApplicationName(QLatin1String("urllineeditexample")); - QMainWindow w; - - QWidget *window = new QWidget; - QComboBox *comboBox = new QComboBox(window); - comboBox->setEditable(true); - QLineEdit *lineEdit = new QLineEdit(window); - LocationBar *s1 = new LocationBar(window); - LocationBar *s2 = new LocationBar(window); - WebView *view = new WebView(window); - view->setUrl(QUrl("http://www.google.com")); - s2->setWebView(view); - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(comboBox); - layout->addWidget(lineEdit); - layout->addWidget(s1); - layout->addWidget(s2); - layout->addWidget(view); - window->setLayout(layout); - w.show(); - w.setCentralWidget(window); - - QToolBar *bar = w.addToolBar("foo"); - QSplitter *splitter = new QSplitter(window); - splitter->addWidget(new LocationBar); - splitter->addWidget(new QLineEdit); - bar->addWidget(splitter); - return application.exec(); -} - diff --git a/manualtests/manualtests.pri b/manualtests/manualtests.pri deleted file mode 100644 index eab9f33..0000000 --- a/manualtests/manualtests.pri +++ /dev/null @@ -1,4 +0,0 @@ -win32: CONFIG += console -mac:CONFIG -= app_bundle - -include($$PWD/../src/src.pri) diff --git a/manualtests/manualtests.pro b/manualtests/manualtests.pro deleted file mode 100644 index 52817ca..0000000 --- a/manualtests/manualtests.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = \ - adblock \ - bookmarks \ - downloadmanager \ - history \ - locationbar \ - modelmenu \ - searchlineedit \ - utils \ - webviewsearch - -CONFIG += ordered diff --git a/manualtests/modelmenu/.gitignore b/manualtests/modelmenu/.gitignore deleted file mode 100644 index 2f8ac85..0000000 --- a/manualtests/modelmenu/.gitignore +++ /dev/null @@ -1 +0,0 @@ -modelmenu diff --git a/manualtests/modelmenu/main_modelmenu.cpp b/manualtests/modelmenu/main_modelmenu.cpp deleted file mode 100644 index c054c0a..0000000 --- a/manualtests/modelmenu/main_modelmenu.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) 2009, Aaron Dewes - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Endorphin nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include - -#include - -#include - -class Menu : public ModelMenu -{ - Q_OBJECT - -public: - Menu(QWidget *parent); - -protected: - bool prePopulated(); - void postPopulated(); - ModelMenu *createBaseMenu(); - -private slots: - void activated2(const QModelIndex &index); - -}; - -Menu::Menu(QWidget *parent) - : ModelMenu(parent) -{ - connect(this, SIGNAL(activated(const QModelIndex &)), - this, SLOT(activated2(const QModelIndex &))); -} - -bool Menu::prePopulated() -{ - qDebug() << __FUNCTION__; - return ModelMenu::prePopulated(); -} - -void Menu::postPopulated() -{ - qDebug() << __FUNCTION__; - return ModelMenu::postPopulated(); -} - -ModelMenu *Menu::createBaseMenu() -{ - qDebug() << __FUNCTION__; - return new Menu(this); - return ModelMenu::createBaseMenu(); -} - -void Menu::activated2(const QModelIndex &index) -{ - qDebug() << __FUNCTION__ << index.data() << this; -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - QMainWindow mainWindow; - Menu *menu = new Menu(&mainWindow); - menu->setTitle("Test"); - QDirModel *model = new QDirModel(menu); - menu->setModel(model); - menu->setRootIndex(model->index(QDir::homePath())); - mainWindow.menuBar()->addMenu(menu); - mainWindow.show(); - return app.exec(); -} - -#include "main_modelmenu.moc" - diff --git a/manualtests/modelmenu/modelmenu.pro b/manualtests/modelmenu/modelmenu.pro deleted file mode 100644 index 78a0667..0000000 --- a/manualtests/modelmenu/modelmenu.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) - -# Input -SOURCES += main_modelmenu.cpp -HEADERS += diff --git a/manualtests/searchlineedit/.gitignore b/manualtests/searchlineedit/.gitignore deleted file mode 100644 index 1713e66..0000000 --- a/manualtests/searchlineedit/.gitignore +++ /dev/null @@ -1 +0,0 @@ -searchlineedit diff --git a/manualtests/searchlineedit/main_searchlineedit.cpp b/manualtests/searchlineedit/main_searchlineedit.cpp deleted file mode 100644 index da547c8..0000000 --- a/manualtests/searchlineedit/main_searchlineedit.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include - -#include "searchlineedit.h" -#include "searchbutton.h" - -int main(int argc, char **argv) -{ - QApplication application(argc, argv); - - QDialog window; - QPushButton *button1 = new QPushButton("One"); - SearchLineEdit *s1 = new SearchLineEdit(&window); - SearchLineEdit *s2 = new SearchLineEdit(&window); - QCompleter *completer = new QCompleter(&window); - s2->setCompleter(completer); - s2->searchButton()->setShowMenuTriangle(true); - QObject::connect(s2->searchButton(), SIGNAL(clicked()), - completer, SLOT(complete())); - QStringList list; - list << "a" << "b" << "c"; - s2->completer()->setModel(new QStringListModel(list)); - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(s1); - layout->addWidget(s2); - layout->addWidget(button1); - - window.setLayout(layout); - window.show(); - return application.exec(); -} - diff --git a/manualtests/searchlineedit/searchlineedit.pro b/manualtests/searchlineedit/searchlineedit.pro deleted file mode 100644 index 3cc1340..0000000 --- a/manualtests/searchlineedit/searchlineedit.pro +++ /dev/null @@ -1,14 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) - -# Input -RESOURCES = -FORMS = -SOURCES = searchbutton.cpp clearbutton.cpp lineedit.cpp searchlineedit.cpp -HEADERS = searchbutton.h clearbutton.h lineedit.h lineedit_p.h searchlineedit.h - -SOURCES += main_searchlineedit.cpp diff --git a/manualtests/utils/editview/.gitignore b/manualtests/utils/editview/.gitignore deleted file mode 100644 index 53dfa8a..0000000 --- a/manualtests/utils/editview/.gitignore +++ /dev/null @@ -1 +0,0 @@ -editview diff --git a/manualtests/utils/editview/editview.pro b/manualtests/utils/editview/editview.pro deleted file mode 100644 index 18c3fe2..0000000 --- a/manualtests/utils/editview/editview.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../../manualtests.pri) - -# Input -FORMS += editview.ui -SOURCES += main_editview.cpp -HEADERS += diff --git a/manualtests/utils/editview/editview.ui b/manualtests/utils/editview/editview.ui deleted file mode 100644 index beee2a3..0000000 --- a/manualtests/utils/editview/editview.ui +++ /dev/null @@ -1,87 +0,0 @@ - - - Dialog - - - - 0 - 0 - 790 - 398 - - - - Dialog - - - - - - Qt::Horizontal - - - - - - - - - - RemoveAll - - - - - - - - - - - - - - RemoveAll - - - - - - - - - - - - - - RemoveAll - - - - - - - - - - - - EditListView - QListView -
editlistview.h
-
- - EditTreeView - QTreeView -
edittreeview.h
-
- - EditTableView - QTableView -
edittableview.h
-
-
- - -
diff --git a/manualtests/utils/editview/main_editview.cpp b/manualtests/utils/editview/main_editview.cpp deleted file mode 100644 index 81b01f7..0000000 --- a/manualtests/utils/editview/main_editview.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2009, Aaron Dewes - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Endorphin nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include - -#include "ui_editview.h" - -class Window : public QDialog, public Ui_Dialog -{ - Q_OBJECT - -public: - Window(); -}; - -Window::Window() - : QDialog() -{ - setupUi(this); - QStringList list; - list << "a" << "b" << "c"; - listView->setModel(new QStringListModel(list)); - tableView->setModel(new QStringListModel(list)); - connect(listViewRemoveAllButton, SIGNAL(clicked()), listView, SLOT(removeAll())); - connect(tableViewRemoveAllButton, SIGNAL(clicked()), tableView, SLOT(removeAll())); - connect(treeViewRemoveAllButton, SIGNAL(clicked()), treeView, SLOT(removeAll())); - - QStandardItemModel *model = new QStandardItemModel(this); - QStandardItem *parentItem = model->invisibleRootItem(); - for (int i = 0; i < 4; ++i) { - QStandardItem *item = new QStandardItem(QString("item %0").arg(i)); - parentItem->appendRow(item); - item = new QStandardItem(QString("item %0").arg(i * 2)); - parentItem->appendRow(item); - parentItem = item; - } - treeView->setModel(model); - treeView->expandAll(); -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - Window window; - window.show(); - return app.exec(); -} - -#include "main_editview.moc" - diff --git a/manualtests/utils/lineedit/.gitignore b/manualtests/utils/lineedit/.gitignore deleted file mode 100644 index 19f5a9a..0000000 --- a/manualtests/utils/lineedit/.gitignore +++ /dev/null @@ -1 +0,0 @@ -lineedit diff --git a/manualtests/utils/lineedit/bookmark.png b/manualtests/utils/lineedit/bookmark.png deleted file mode 100644 index be21134..0000000 Binary files a/manualtests/utils/lineedit/bookmark.png and /dev/null differ diff --git a/manualtests/utils/lineedit/dialog.ui b/manualtests/utils/lineedit/dialog.ui deleted file mode 100644 index e550138..0000000 --- a/manualtests/utils/lineedit/dialog.ui +++ /dev/null @@ -1,289 +0,0 @@ - - Dialog - - - - 0 - 0 - 474 - 348 - - - - Dialog - - - - - - - - Left: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Foo Bar Baz Endorphin LineEdit Manual Test This is the end - - - - - - - Right: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Foo Bar Baz Endorphin LineEdit Manual Test This is the end - - - - - - - Foo Bar Baz Endorphin LineEdit Manual Test This is the end - - - - - - - Empty: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Foo Bar Baz Endorphin LineEdit Manual Test - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Widget - - - - - - Site Icon - - - true - - - - - - - RSS - - - false - - - - - - - Bookmark - - - - - - - - - - Position - - - - - - Left - - - true - - - - - - - Right - - - - - - - - - - - 0 - 0 - - - - 3 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 28 - - - - - - - - - - Add - - - - - - - Remove - - - - - - - Swap Visibility - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Add ToolButton - - - - - - - - - - LineEdit - QLineEdit -
lineedit.h
-
-
- - -
diff --git a/manualtests/utils/lineedit/lineedit.pro b/manualtests/utils/lineedit/lineedit.pro deleted file mode 100644 index 55d0d80..0000000 --- a/manualtests/utils/lineedit/lineedit.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../../manualtests.pri) - -# Input -RESOURCES = -FORMS = dialog.ui -SOURCES = main_lineedit.cpp lineedit.cpp -HEADERS = lineedit.h lineedit_p.h diff --git a/manualtests/utils/lineedit/main_lineedit.cpp b/manualtests/utils/lineedit/main_lineedit.cpp deleted file mode 100644 index 3992d0d..0000000 --- a/manualtests/utils/lineedit/main_lineedit.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include -#include - -#include -#include "ui_dialog.h" - -class Dialog : public QDialog, public Ui_Dialog -{ - Q_OBJECT -public: - Dialog(QWidget *parent = 0); - - QLabel *rssButton; - QLabel *bookmarkButton; - QLabel *siteIconButton; - -private slots: - void setWidgetSpacing(int s); - void add(); - void remove(); - void showW(); - void addToolButton(); - - QWidget *getWidget(); -}; - -Dialog::Dialog(QWidget *parent) - : QDialog(parent) -{ - setupUi(this); - rssButton = new QLabel(this); - rssButton->setPixmap(QPixmap("rss.png")); - rssButton->hide(); - bookmarkButton = new QLabel(this); - bookmarkButton->setPixmap(QPixmap("bookmark.png")); - bookmarkButton->hide(); - siteIconButton = new QLabel(this); - siteIconButton->setPixmap(QPixmap("siteicon.png")); - siteIconButton->hide(); - - { - QToolButton *b = new QToolButton(this); - b->resize(16, 16); - leftLineEdit->addWidget(b, LineEdit::LeftSide); - } - { - QToolButton *b = new QToolButton(this); - b->resize(16, 16); - rightLineEdit->addWidget(b, LineEdit::RightSide); - } - connect(addButton, SIGNAL(clicked()), this, SLOT(add())); - connect(removeButton, SIGNAL(clicked()), this, SLOT(remove())); - connect(showButton, SIGNAL(clicked()), this, SLOT(showW())); - connect(addToolButtonButton, SIGNAL(clicked()), this, SLOT(addToolButton())); - connect(spacing, SIGNAL(valueChanged(int)), this, SLOT(setWidgetSpacing(int))); -} - -QWidget *Dialog::getWidget() -{ - if (rssWidget->isChecked()) { - bookmarkWidget->setChecked(true); - return rssButton; - } - if (bookmarkWidget->isChecked()) { - siteIconWidget->setChecked(true); - return bookmarkButton; - } - if (siteIconWidget->isChecked()) { - rssWidget->setChecked(true); - return siteIconButton; - } - return 0; -} - -void Dialog::setWidgetSpacing(int s) -{ - lineEdit->setWidgetSpacing(s); -} - -void Dialog::add() -{ - LineEdit::WidgetPosition position = leftSide->isChecked() ? LineEdit::LeftSide : LineEdit::RightSide; - lineEdit->addWidget(getWidget(), position); -} - -void Dialog::remove() -{ - lineEdit->removeWidget(getWidget()); -} - -void Dialog::showW() -{ - QWidget *w = getWidget(); - w->setVisible(!w->isVisible()); -} - -void Dialog::addToolButton() -{ - LineEdit::WidgetPosition position = leftSide->isChecked() ? LineEdit::LeftSide : LineEdit::RightSide; - QToolButton *button = new QToolButton; - lineEdit->addWidget(button, position); -} - -int main(int argc,char ** argv) -{ - QApplication app(argc,argv); - - if (app.arguments().count() == 1) { - Dialog dialog; - dialog.show(); - return app.exec(); - } else { - LineEdit lineEdit; - QPushButton *rightButton = new QPushButton("Dialog bar"); - qDebug() << rightButton->sizeHint(); - lineEdit.addWidget(rightButton, LineEdit::RightSide); - lineEdit.show(); - return app.exec(); - } -} - -#include "main_lineedit.moc" - diff --git a/manualtests/utils/lineedit/rss.png b/manualtests/utils/lineedit/rss.png deleted file mode 100755 index b3c949d..0000000 Binary files a/manualtests/utils/lineedit/rss.png and /dev/null differ diff --git a/manualtests/utils/lineedit/siteicon.png b/manualtests/utils/lineedit/siteicon.png deleted file mode 100644 index e0caa87..0000000 Binary files a/manualtests/utils/lineedit/siteicon.png and /dev/null differ diff --git a/manualtests/utils/singleapplication/.gitignore b/manualtests/utils/singleapplication/.gitignore deleted file mode 100644 index a24818b..0000000 --- a/manualtests/utils/singleapplication/.gitignore +++ /dev/null @@ -1 +0,0 @@ -singleapplication diff --git a/manualtests/utils/singleapplication/main_singleapplication.cpp b/manualtests/utils/singleapplication/main_singleapplication.cpp deleted file mode 100644 index 65facf5..0000000 --- a/manualtests/utils/singleapplication/main_singleapplication.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2008, Aaron Dewes - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Endorphin nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include - -#include - -class PlainTextEdit : public QPlainTextEdit { - Q_OBJECT - -public: - PlainTextEdit(QWidget *parent = 0) - : QPlainTextEdit(parent) { } - -public slots: - void messageReceived(QLocalSocket *socket) { - QString message; - QTextStream stream(socket); - stream >> message; - appendPlainText(message); - } - -}; - -int main(int argc, char **argv) -{ - SingleApplication app(argc, argv); - app.setApplicationName("testapp"); - if (app.arguments().count() > 1 - && app.sendMessage(app.arguments().last().toUtf8())) - return 0; - - PlainTextEdit plainTextEdit; - plainTextEdit.show(); - if (!app.startSingleServer()) - qWarning() << "Error starting server"; - app.connect(&app, SIGNAL(messageReceived(QLocalSocket *)), - &plainTextEdit, SLOT(messageReceived(QLocalSocket *))); - return app.exec(); -} - -#include "main_singleapplication.moc" - diff --git a/manualtests/utils/singleapplication/singleapplication.pro b/manualtests/utils/singleapplication/singleapplication.pro deleted file mode 100644 index a511dcd..0000000 --- a/manualtests/utils/singleapplication/singleapplication.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../../manualtests.pri) - -# Input -RESOURCES = -FORMS = -SOURCES = main_singleapplication.cpp singleapplication.cpp -HEADERS = singleapplication.h diff --git a/manualtests/utils/squeezelabel/.gitignore b/manualtests/utils/squeezelabel/.gitignore deleted file mode 100644 index f633251..0000000 --- a/manualtests/utils/squeezelabel/.gitignore +++ /dev/null @@ -1 +0,0 @@ -squeezelabel diff --git a/manualtests/utils/squeezelabel/main_squeezelabel.cpp b/manualtests/utils/squeezelabel/main_squeezelabel.cpp deleted file mode 100644 index 178954a..0000000 --- a/manualtests/utils/squeezelabel/main_squeezelabel.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include - -#include "squeezelabel.h" - -int main(int argc, char **argv) -{ - QApplication application(argc, argv); - - SqueezeLabel label; - if (application.arguments().count() > 1) - label.setText(application.arguments().value(1)); - else - label.setText("This is one long sentence that I will have to ponder the meaning of"); - label.show(); - label.resize(100, label.height()); - - return application.exec(); -} - diff --git a/manualtests/utils/squeezelabel/squeezelabel.pro b/manualtests/utils/squeezelabel/squeezelabel.pro deleted file mode 100644 index 502ba27..0000000 --- a/manualtests/utils/squeezelabel/squeezelabel.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../../manualtests.pri) - -# Input -RESOURCES = -FORMS = -SOURCES = main_squeezelabel.cpp squeezelabel.cpp -HEADERS = squeezelabel.h diff --git a/manualtests/utils/treesortfilterproxymodel/.gitignore b/manualtests/utils/treesortfilterproxymodel/.gitignore deleted file mode 100644 index c3df39d..0000000 --- a/manualtests/utils/treesortfilterproxymodel/.gitignore +++ /dev/null @@ -1 +0,0 @@ -treesortfilterproxymodel diff --git a/manualtests/utils/treesortfilterproxymodel/main_treesortfilterproxymodel.cpp b/manualtests/utils/treesortfilterproxymodel/main_treesortfilterproxymodel.cpp deleted file mode 100644 index 5692131..0000000 --- a/manualtests/utils/treesortfilterproxymodel/main_treesortfilterproxymodel.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include "treesortfilterproxymodel.h" -#include "ui_treesortfilterproxymodeldialog.h" - -#include -#include -#include - -int main(int argc, char **argv) -{ - QApplication application(argc, argv); - - QDialog dialog; - Ui_TreeSortFilterProxyModelDialog ui; - ui.setupUi(&dialog); - - TreeSortFilterProxyModel *proxy = new TreeSortFilterProxyModel(&dialog); - dialog.connect(ui.search, SIGNAL(textChanged(const QString &)), - proxy, SLOT(setFilterRegExp(const QString &))); - QDirModel *dirModel = new QDirModel(&dialog); - proxy->setSourceModel(dirModel); - ui.treeView->setModel(proxy); - ui.treeView->setRootIndex(proxy->mapFromSource(dirModel->index(QDir::homePath()))); - dialog.show(); - - return application.exec(); -} - diff --git a/manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodel.pro b/manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodel.pro deleted file mode 100644 index 8cba043..0000000 --- a/manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodel.pro +++ /dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../../manualtests.pri) - -# Input -SOURCES = main_treesortfilterproxymodel.cpp treesortfilterproxymodel.cpp -HEADERS = treesortfilterproxymodel.h - -FORMS += treesortfilterproxymodeldialog.ui diff --git a/manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodeldialog.ui b/manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodeldialog.ui deleted file mode 100644 index 842cc4b..0000000 --- a/manualtests/utils/treesortfilterproxymodel/treesortfilterproxymodeldialog.ui +++ /dev/null @@ -1,27 +0,0 @@ - - - TreeSortFilterProxyModelDialog - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - - - - - - - - - - diff --git a/manualtests/utils/utils.pro b/manualtests/utils/utils.pro deleted file mode 100644 index 1f38ed5..0000000 --- a/manualtests/utils/utils.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = \ - editview \ - lineedit \ - singleapplication \ - squeezelabel \ - treesortfilterproxymodel - -CONFIG += ordered diff --git a/manualtests/webviewsearch/.gitignore b/manualtests/webviewsearch/.gitignore deleted file mode 100644 index 00a73b0..0000000 --- a/manualtests/webviewsearch/.gitignore +++ /dev/null @@ -1 +0,0 @@ -webviewsearch diff --git a/manualtests/webviewsearch/main_webviewsearch.cpp b/manualtests/webviewsearch/main_webviewsearch.cpp deleted file mode 100644 index bcbbeaf..0000000 --- a/manualtests/webviewsearch/main_webviewsearch.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2020 Aaron Dewes - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include - -#include "webviewsearch.h" - -class WebViewWSearch : public QWebView -{ - Q_OBJECT - -public: - WebViewWSearch(QWidget *parent = 0) : QWebView(parent) - { - } - -protected: - -void resizeEvent(QResizeEvent *event) -{ - int offset = event->size().height() - event->oldSize().height(); - int currentValue = page()->mainFrame()->scrollBarValue(Qt::Vertical); - setUpdatesEnabled(false); - page()->mainFrame()->setScrollBarValue(Qt::Vertical, currentValue - offset); - setUpdatesEnabled(true); - QWebView::resizeEvent(event); -} - -public slots: - void findText(const QString &text) { - findText(text); - } -}; - -int main(int argc, char **argv) -{ - QApplication application(argc, argv); - QMainWindow mainWindow; - - - QWidget *window = new QWidget; - QVBoxLayout *layout = new QVBoxLayout; - layout->setSpacing(0); - layout->setContentsMargins(0, 0, 0, 0); - WebViewWSearch *webView = new WebViewWSearch(&mainWindow); - WebViewSearch *webViewSearch = new WebViewSearch(webView); - layout->addWidget(webViewSearch); - webView->load(QUrl("http://reddit.com")); - layout->addWidget(webView); - window->setLayout(layout); - mainWindow.setCentralWidget(window); - mainWindow.show(); - - QMenuBar bar; - QMenu *editMenu = bar.addMenu(("&Edit")); - QAction *m_find = editMenu->addAction(("&Find")); - m_find->setShortcuts(QKeySequence::Find); - QObject::connect(m_find, SIGNAL(triggered()), webViewSearch, SLOT(showFind())); - new QShortcut(QKeySequence(Qt::Key_Slash), webViewSearch, SLOT(showFind())); - - return application.exec(); -} - -#include "main_webviewsearch.moc" diff --git a/manualtests/webviewsearch/webviewsearch.pro b/manualtests/webviewsearch/webviewsearch.pro deleted file mode 100644 index c687d10..0000000 --- a/manualtests/webviewsearch/webviewsearch.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -include(../manualtests.pri) - -SOURCES += main_webviewsearch.cpp -HEADERS +=