Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
Artikulate
Commits
b748f898
Commit
b748f898
authored
Oct 25, 2013
by
Andreas Cord-Landwehr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit of learnerprofile library.
parent
1dfa3655
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
225 additions
and
0 deletions
+225
-0
CMakeLists.txt
CMakeLists.txt
+2
-0
liblearnerprofile/CMakeLists.txt
liblearnerprofile/CMakeLists.txt
+2
-0
liblearnerprofile/src/CMakeLists.txt
liblearnerprofile/src/CMakeLists.txt
+40
-0
liblearnerprofile/src/learner.cpp
liblearnerprofile/src/learner.cpp
+66
-0
liblearnerprofile/src/learner.h
liblearnerprofile/src/learner.h
+60
-0
liblearnerprofile/src/learner_p.h
liblearnerprofile/src/learner_p.h
+34
-0
liblearnerprofile/src/liblearnerprofile_export.h
liblearnerprofile/src/liblearnerprofile_export.h
+21
-0
No files found.
CMakeLists.txt
View file @
b748f898
...
...
@@ -45,6 +45,8 @@ add_subdirectory(sounds)
add_subdirectory
(
images
)
add_subdirectory
(
icons
)
add_subdirectory
(
liblearnerprofile
)
# Build Tests if KDE_TEST is on
if
(
KDE4_BUILD_TESTS
)
enable_testing
()
...
...
liblearnerprofile/CMakeLists.txt
0 → 100644
View file @
b748f898
add_subdirectory
(
src
)
liblearnerprofile/src/CMakeLists.txt
0 → 100644
View file @
b748f898
###
# Copyright 2013 Andreas Cord-Landwehr <cordlandwehr@kde.org>
#
# 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.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
###
set
(
learnerprofile_LIB_SRCS
learner.cpp
)
kde4_add_library
(
learnerprofile SHARED
${
learnerprofile_LIB_SRCS
}
)
target_link_libraries
(
learnerprofile
${
KDE4_KDECORE_LIBS
}
)
set_target_properties
(
learnerprofile
PROPERTIES VERSION
${
GENERIC_LIB_VERSION
}
SOVERSION
${
GENERIC_LIB_SOVERSION
}
)
install
(
TARGETS learnerprofile
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
liblearnerprofile/src/learner.cpp
0 → 100644
View file @
b748f898
/*
* Copyright 2013 Andreas Cord-Landwehr <cordlandwehr@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) version 3, or any
* later version accepted by the membership of KDE e.V. (or its
* successor approved by the membership of KDE e.V.), which shall
* act as a proxy defined in Section 6 of version 3 of the license.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "learner_p.h"
#include "learner.h"
using
namespace
LearnerProfile
;
Learner
::
Learner
(
QObject
*
parent
)
:
QObject
(
parent
)
,
d
(
new
LearnerPrivate
)
{
}
Learner
::~
Learner
()
{
}
QString
Learner
::
name
()
const
{
return
d
->
name
;
}
void
Learner
::
setName
(
const
QString
&
name
)
{
if
(
name
==
d
->
name
)
{
return
;
}
d
->
name
=
name
;
emit
nameChanged
();
}
QString
Learner
::
identifier
()
const
{
return
d
->
identifier
;
}
void
Learner
::
setIdentifier
(
const
QString
&
identifier
)
{
if
(
identifier
==
d
->
identifier
)
{
return
;
}
d
->
identifier
=
identifier
;
emit
identifierChanged
();
}
liblearnerprofile/src/learner.h
0 → 100644
View file @
b748f898
/*
* Copyright 2013 Andreas Cord-Landwehr <cordlandwehr@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) version 3, or any
* later version accepted by the membership of KDE e.V. (or its
* successor approved by the membership of KDE e.V.), which shall
* act as a proxy defined in Section 6 of version 3 of the license.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LEARNER_H
#define LEARNER_H
#include "liblearnerprofile_export.h"
#include <QObject>
class
LearnerPrivate
;
namespace
LearnerProfile
{
/**
* \class Learner
*/
class
LIBLEARNERPROFILE_EXPORT
Learner
:
public
QObject
{
Q_OBJECT
Q_PROPERTY
(
QString
name
READ
name
WRITE
setName
NOTIFY
nameChanged
)
Q_PROPERTY
(
QString
id
READ
identifier
WRITE
setIdentifier
NOTIFY
identifierChanged
)
public:
explicit
Learner
(
QObject
*
parent
=
0
);
~
Learner
();
QString
name
()
const
;
void
setName
(
const
QString
&
name
);
QString
identifier
()
const
;
void
setIdentifier
(
const
QString
&
identifier
);
Q_SIGNALS:
void
nameChanged
();
void
identifierChanged
();
private:
Q_DISABLE_COPY
(
Learner
)
const
QScopedPointer
<
LearnerPrivate
>
d
;
};
}
#endif // LEARNER_H
liblearnerprofile/src/learner_p.h
0 → 100644
View file @
b748f898
/*
* Copyright 2013 Andreas Cord-Landwehr <cordlandwehr@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) version 3, or any
* later version accepted by the membership of KDE e.V. (or its
* successor approved by the membership of KDE e.V.), which shall
* act as a proxy defined in Section 6 of version 3 of the license.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QString>
namespace
LearnerProfile
{
class
LearnerPrivate
{
public:
LearnerPrivate
()
{}
~
LearnerPrivate
()
{}
QString
name
;
QString
identifier
;
};
}
liblearnerprofile/src/liblearnerprofile_export.h
0 → 100644
View file @
b748f898
#ifndef LIBLEARNERPROFILE_EXPORT_H
#define LIBLEARNERPROFILE_EXPORT_H
// needed for KDE_EXPORT and KDE_IMPORT macros
#include <kdemacros.h>
#ifndef LIBLEARNERPROFILE_EXPORT
# if defined(MAKE_LIBLEARNERPROFILE_LIB)
// We are building this library
# define LIBLEARNERPROFILE_EXPORT KDE_EXPORT
# else
// We are using this library
# define LIBLEARNERPROFILE_EXPORT KDE_IMPORT
# endif
#endif
# ifndef LIBLEARNERPROFILE_EXPORT_DEPRECATED
# define LIBLEARNERPROFILE_EXPORT_DEPRECATED KDE_DEPRECATED LIBLEARNERPROFILE_EXPORT
# endif
#endif
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