Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fingerterm
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mer-core
fingerterm
Commits
0a1bb5db
Commit
0a1bb5db
authored
May 04, 2016
by
Pekka Vuorela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary MainWindow class
parent
2dbcaed0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
101 deletions
+7
-101
fingerterm.pro
fingerterm.pro
+2
-4
main.cpp
main.cpp
+2
-2
mainwindow.cpp
mainwindow.cpp
+0
-47
mainwindow.h
mainwindow.h
+0
-43
qml/Main.qml
qml/Main.qml
+1
-1
util.cpp
util.cpp
+1
-2
util.h
util.h
+1
-2
No files found.
fingerterm.pro
View file @
0a1bb5db
...
...
@@ -30,8 +30,7 @@ HEADERS += \
textrender
.
h
\
version
.
h
\
util
.
h
\
keyloader
.
h
\
mainwindow
.
h
keyloader
.
h
SOURCES
+=
\
main
.
cpp
\
...
...
@@ -39,8 +38,7 @@ SOURCES += \
textrender
.
cpp
\
ptyiface
.
cpp
\
util
.
cpp
\
keyloader
.
cpp
\
mainwindow
.
cpp
keyloader
.
cpp
OTHER_FILES
+=
\
qml
/
Main
.
qml
\
...
...
main.cpp
View file @
0a1bb5db
...
...
@@ -21,6 +21,7 @@
#include <QtGui>
#include <QtQml>
#include <QQuickView>
extern
"C"
{
#include <pty.h>
...
...
@@ -30,7 +31,6 @@ extern "C" {
#include <sys/types.h>
}
#include "mainwindow.h"
#include "ptyiface.h"
#include "terminal.h"
#include "textrender.h"
...
...
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
}
qmlRegisterType
<
TextRender
>
(
"TextRender"
,
1
,
0
,
"TextRender"
);
MainWindo
w
view
;
QQuickVie
w
view
;
Terminal
term
;
Util
util
(
settings
);
...
...
mainwindow.cpp
deleted
100644 → 0
View file @
2dbcaed0
/*
Copyright 2011-2012 Heikki Holstila <heikki.holstila@gmail.com>
This file is part of FingerTerm.
FingerTerm 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.
FingerTerm 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 FingerTerm. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qplatformdefs.h"
#include <QtGui>
#include <QQmlContext>
#include "mainwindow.h"
MainWindow
::
MainWindow
()
{
rootContext
()
->
setContextProperty
(
"windowHasFocus"
,
false
);
}
MainWindow
::~
MainWindow
()
{
}
void
MainWindow
::
focusInEvent
(
QFocusEvent
*
event
)
{
rootContext
()
->
setContextProperty
(
"windowHasFocus"
,
true
);
QQuickView
::
focusInEvent
(
event
);
emit
focusChanged
(
true
);
}
void
MainWindow
::
focusOutEvent
(
QFocusEvent
*
event
)
{
rootContext
()
->
setContextProperty
(
"windowHasFocus"
,
false
);
QQuickView
::
focusOutEvent
(
event
);
emit
focusChanged
(
false
);
}
mainwindow.h
deleted
100644 → 0
View file @
2dbcaed0
/*
Copyright 2011-2012 Heikki Holstila <heikki.holstila@gmail.com>
This file is part of FingerTerm.
FingerTerm 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.
FingerTerm 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 FingerTerm. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QQuickView>
class
MainWindow
:
public
QQuickView
{
Q_OBJECT
public:
explicit
MainWindow
();
virtual
~
MainWindow
();
protected:
virtual
void
focusInEvent
(
QFocusEvent
*
event
);
virtual
void
focusOutEvent
(
QFocusEvent
*
event
);
signals:
void
focusChanged
(
bool
in
);
private:
Q_DISABLE_COPY
(
MainWindow
)
};
#endif // MAINWINDOW_H
qml/Main.qml
View file @
0a1bb5db
...
...
@@ -162,7 +162,7 @@ Item {
property
bool
visibleSetting
:
true
x
:
0
y
:
parent
.
height
-
vkb
.
height
visible
:
windowHas
Focus
&&
visibleSetting
visible
:
page
.
active
Focus
&&
visibleSetting
}
// area that handles gestures/select/scroll modes and vkb-keypresses
...
...
util.cpp
View file @
0a1bb5db
...
...
@@ -25,7 +25,6 @@
#include <QQuickView>
#include <QDebug>
#include "mainwindow.h"
#include "terminal.h"
#include "util.h"
#include "textrender.h"
...
...
@@ -52,7 +51,7 @@ Util::~Util()
void
Util
::
setWindow
(
QQuickView
*
win
)
{
iWindow
=
dynamic_cast
<
MainWindow
*>
(
win
)
;
iWindow
=
win
;
if
(
!
iWindow
)
qFatal
(
"invalid main window"
);
}
...
...
util.h
View file @
0a1bb5db
...
...
@@ -23,7 +23,6 @@
#include <QtCore>
class
Terminal
;
class
MainWindow
;
class
TextRender
;
class
QQuickView
;
...
...
@@ -101,7 +100,7 @@ private:
QString
iCurrentWinTitle
;
QSettings
*
iSettings
;
MainWindo
w
*
iWindow
;
QQuickVie
w
*
iWindow
;
Terminal
*
iTerm
;
TextRender
*
iRenderer
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment