summaryrefslogtreecommitdiff
path: root/src/main_window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_window.cpp')
-rw-r--r--src/main_window.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/main_window.cpp b/src/main_window.cpp
index b05507c..9972ecb 100644
--- a/src/main_window.cpp
+++ b/src/main_window.cpp
@@ -3,15 +3,15 @@
#include <QString>
#include <zip.h>
-namespace getsuyomi {
+namespace bookmouse {
-GetsuyomiApp::GetsuyomiApp() : m_getsuyomi{new Getsuyomi()}
+BookmouseApp::BookmouseApp() : m_bookmouse{new Bookmouse()}
{
- setCentralWidget(m_getsuyomi);
+ setCentralWidget(m_bookmouse);
setup();
}
-void GetsuyomiApp::setup()
+void BookmouseApp::setup()
{
QCoreApplication::setApplicationName(AppName);
QCoreApplication::setApplicationVersion(AppVersionString);
@@ -28,22 +28,22 @@ void GetsuyomiApp::setup()
show();
}
-void GetsuyomiApp::createActions()
+void BookmouseApp::createActions()
{
m_openFile = new QAction(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen), tr("&Open File"), this);
m_openFile->setShortcuts(QKeySequence::Open);
m_openFile->setStatusTip(tr("Open a file"));
- connect(m_openFile, &QAction::triggered, this, &GetsuyomiApp::openFile);
+ connect(m_openFile, &QAction::triggered, this, &BookmouseApp::openFile);
m_openDirectory = new QAction(QIcon::fromTheme(QIcon::ThemeIcon::FolderOpen), tr("Open Directory"), this);
m_openDirectory->setShortcut(Qt::CTRL | Qt::ALT | Qt::Key_O);
m_openDirectory->setStatusTip(tr("Open a directory"));
- connect(m_openDirectory, &QAction::triggered, this, &GetsuyomiApp::openDirectory);
+ connect(m_openDirectory, &QAction::triggered, this, &BookmouseApp::openDirectory);
m_quitAction = new QAction(QIcon::fromTheme(QIcon::ThemeIcon::ApplicationExit), tr("&Quit"), this);
m_quitAction->setShortcuts(QKeySequence::Quit);
m_quitAction->setStatusTip(tr("Quit"));
- connect(m_quitAction, &QAction::triggered, this, &GetsuyomiApp::quit);
+ connect(m_quitAction, &QAction::triggered, this, &BookmouseApp::quit);
auto nextShortcuts = QList<QKeySequence>{};
nextShortcuts.append(QKeySequence{Qt::Key_L});
@@ -52,7 +52,7 @@ void GetsuyomiApp::createActions()
m_nextAction = new QAction(QIcon::fromTheme(QIcon::ThemeIcon::GoNext), tr("Next"), this);
m_nextAction->setShortcuts(nextShortcuts);
m_nextAction->setStatusTip(tr("Next"));
- connect(m_nextAction, &QAction::triggered, this, &GetsuyomiApp::next);
+ connect(m_nextAction, &QAction::triggered, this, &BookmouseApp::next);
auto backShortcuts = QList<QKeySequence>{};
backShortcuts.append(QKeySequence{Qt::Key_H});
@@ -61,10 +61,10 @@ void GetsuyomiApp::createActions()
m_backAction = new QAction(QIcon::fromTheme(QIcon::ThemeIcon::GoPrevious), tr("Back"), this);
m_backAction->setShortcuts(backShortcuts);
m_backAction->setStatusTip(tr("Back"));
- connect(m_backAction, &QAction::triggered, this, &GetsuyomiApp::back);
+ connect(m_backAction, &QAction::triggered, this, &BookmouseApp::back);
}
-void GetsuyomiApp::createMenus()
+void BookmouseApp::createMenus()
{
m_menuBar = menuBar()->addMenu(tr("&File"));
m_menuBar->addAction(m_openFile);
@@ -72,14 +72,14 @@ void GetsuyomiApp::createMenus()
m_menuBar->addAction(m_quitAction);
}
-void GetsuyomiApp::createToolBar()
+void BookmouseApp::createToolBar()
{
m_toolBar = addToolBar(tr("&Navigation"));
m_toolBar->addAction(m_backAction);
m_toolBar->addAction(m_nextAction);
}
-void GetsuyomiApp::openFile()
+void BookmouseApp::openFile()
{
auto filename = QFileDialog::getOpenFileName(
this,
@@ -90,7 +90,7 @@ void GetsuyomiApp::openFile()
if (filename.endsWith(".zip")) {
try {
auto* archive = new ZipArchive(filename);
- m_getsuyomi->setArchive(archive);
+ m_bookmouse->setArchive(archive);
} catch (std::runtime_error& exc) {
qCritical("Failed to change archive");
}
@@ -99,7 +99,7 @@ void GetsuyomiApp::openFile()
}
}
-void GetsuyomiApp::openDirectory()
+void BookmouseApp::openDirectory()
{
QString directory = QFileDialog::getExistingDirectory(
this,
@@ -109,21 +109,21 @@ void GetsuyomiApp::openDirectory()
qDebug("Open directory %s", qPrintable(directory));
}
-void GetsuyomiApp::quit()
+void BookmouseApp::quit()
{
QCoreApplication::quit();
}
-void GetsuyomiApp::next()
+void BookmouseApp::next()
{
qDebug("Next");
- m_getsuyomi->next();
+ m_bookmouse->next();
}
-void GetsuyomiApp::back()
+void BookmouseApp::back()
{
qDebug("Back");
- m_getsuyomi->back();
+ m_bookmouse->back();
}
-} // namespace getsuyomi
+} // namespace bookmouse