10
10
#include "frontend/profile/cprofilewindow.h"
14
#include <QStringList>
15
#include "backend/drivers/cswordmoduleinfo.h"
16
#include "backend/managers/cswordbackend.h"
19
13
namespace Profile {
21
CProfileWindow::CProfileWindow(CSwordModuleInfo::ModuleType type)
29
m_writeWindowType(0) {
30
m_scrollbarPos.horizontal = 0;
31
m_scrollbarPos.vertical = 0;
34
CProfileWindow::~CProfileWindow() {}
36
/** Returns the size of the window including the x,y coordinates. */
37
const QRect& CProfileWindow::geometry() const {
38
return m_windowGeometry;
41
/** Sets the size of the window. */
42
void CProfileWindow::setGeometry( const QRect& rect ) {
43
m_windowGeometry = rect;
46
/** Returns the type of the managed window (bible window, commentary window or lexicon window). */
47
CSwordModuleInfo::ModuleType CProfileWindow::type() const {
48
if (m_type != CSwordModuleInfo::Unknown)
50
return CSwordModuleInfo::Unknown;
53
/** Sets the modules. */
54
void CProfileWindow::setModules( const QStringList& modules ) {
55
m_moduleList = modules; //copy module pointers into our own list
58
/** Returns a list of module names which are chosen in the managed window profile. */
59
const QStringList& CProfileWindow::modules() const {
63
/** Returns the current key set in the modules. */
64
const QString& CProfileWindow::key() const {
68
/** Set the key used in the modules. */
69
void CProfileWindow::setKey( const QString& key ) {
73
/** Sets the current position of the scrollbars. */
74
void CProfileWindow::setScrollbarPositions(const int& horizontal, const int& vertical) {
75
// m_scrollbarPos = {x,y};
76
m_scrollbarPos.horizontal = horizontal;
77
m_scrollbarPos.vertical = vertical;
80
/** Returns tghe position of the scrollbars */
81
const CProfileWindow::ScrollbarPos& CProfileWindow::scrollbarPositions() const {
82
return m_scrollbarPos;
85
/** Sets the type of the used modules. */
86
void CProfileWindow::setType(const CSwordModuleInfo::ModuleType& type) {
90
/** Returns true if the window is maximized. */
91
const bool& CProfileWindow::maximized() const {
95
/** Sets the windows maximized state to true or false. */
96
void CProfileWindow::setMaximized( const bool& maximized ) {
97
m_maximized = maximized;
100
/** Returns true if the window is maximized. */
101
const bool& CProfileWindow::hasFocus() const {
105
/** Sets the windows maximized state to true or false. */
106
void CProfileWindow::setFocus( const bool& hasFocus ) {
107
m_hasFocus = hasFocus;
110
/** Returns an integer with the window specific settings */
111
const int& CProfileWindow::windowSettings() const {
112
return m_windowSettings;
115
/** Sets the window specific settings. */
116
void CProfileWindow::setWindowSettings( const int& settings ) {
117
m_windowSettings = settings;
120
/** Tells this profile window to represent a write window. */
121
void CProfileWindow::setWriteWindowType( const int& writeWindowType ) {
122
m_writeWindowType = writeWindowType;
125
/** Returns whether this profile window represents a write window. */
126
const int& CProfileWindow::writeWindowType() const {
127
return m_writeWindowType;
15
CProfileWindow::CProfileWindow(CSwordModuleInfo::ModuleType t)
27
// Intentionally empty
130
30
} //end of namespace Profile