-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added configuration server #12
Open
IlyaNikiforov
wants to merge
18
commits into
qreal:master
Choose a base branch
from
IlyaNikiforov:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1ed968f
empty project
dyma96 fa5528a
added first version of server
IlyaNikiforov 4b8670d
new version of server
IlyaNikiforov 989e3b0
Window at the initial stage
dyma96 191bc5d
Merge branch 'master' of https://github.com/IlyaNikiforov/tools
dyma96 7bbe09f
third version of server
IlyaNikiforov 903b850
+ saveButton
dyma96 99183ed
Merge branch 'master' of https://github.com/IlyaNikiforov/tools
dyma96 5e5e607
final version of server and new client
IlyaNikiforov 50c8cd7
almost final version of server
IlyaNikiforov 8b490d1
almost final version of server
IlyaNikiforov 09c0109
new version
IlyaNikiforov b439a6a
client level up.
dyma96 e1558f6
styleguided
IlyaNikiforov abf6f31
Merge branch 'master' of https://github.com/IlyaNikiforov/tools
IlyaNikiforov 48a8fce
Some changes of styleguide.
dyma96 15e1522
styleguide
dyma96 3f8e6bf
change for program work
dyma96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[General] | ||
D2ModelWindowWasMaximized=true | ||
LineType=-1 | ||
OpenQRSProjectFileDialogLastDir=C:/TRIKStudio/examples | ||
robotModel=3 | ||
ResizeLabels=true | ||
Autosave=true | ||
showTitlesForRobots=false | ||
DragArea=12 | ||
PaletteIconsInARowCount=3 | ||
PreferencesDialogLastPosition=@Point(225 23) | ||
LabelsDistance=100 | ||
toolbarSize=30 | ||
ShowAlignment=true | ||
ShowGrid=true | ||
2dFollowingRobot=true | ||
2dShowGrid=true | ||
IndexGrid=25 | ||
LoopEdgeBoundsIndent=1 | ||
Splashscreen=true | ||
recentProjectsLimit=0 | ||
EmbeddedLinkerIndent=5 | ||
port2SensorType=0 | ||
temp=D:/proga/SummerSchool/qreal/bin/unsaved | ||
touchMode=false | ||
oldLineColor=magenta | ||
D2ModelWindowLastPosition=@Point(-8 -8) | ||
MoveLabels=true | ||
pos=@Point(-8 -8) | ||
EmbeddedLinkerSize=6 | ||
version=3.0.0 \x3b1\x37 | ||
CurrentIndex=0 | ||
2d_displayVisible=true | ||
autoscalingInterval=3000 | ||
sensorUpdateInterval=50 | ||
textUpdateInterval=500 | ||
collectErgonomicValues=true | ||
gestureDelay=1000 | ||
ActivateGrid=true | ||
Antialiasing=true | ||
maximized=true | ||
ActivateAlignment=true | ||
tcpServer=192.168.1.8 | ||
EditorsLoadedCount=1 | ||
nxtFlashToolRunPolicy=0 | ||
CustomFont=false | ||
PaletteTabSwitching=true | ||
2DModelRealisticPhysics=true | ||
%U0414%U0438%U0430%U0433%U0440%U0430%U043C%U043C%U0430%20%U043F%U043E%U0432%U0435%U0434%U0435%U043D%U0438%U044F%20%U0440%U043E%U0431%U043E%U0442%U0430=true | ||
valueOfCommunication=tcp | ||
usabilityTestingMode=false | ||
pathToImages=./images/iconset1 | ||
bluetoothPortName= | ||
PreferencesDialogLastSize=@Size(892 593) | ||
2dCursorType=1 | ||
recentProjects="C:\\Users\\Admin\\Downloads\\WFABTree (1).qrs;C:\\Users\\Admin\\Downloads\\125_97_2-___2_2.qrs;C:/TRIKStudio/examples/smiles.qrs;C:/TRIKStudio/examples/alongTheLineByCam.qrs;C:/TRIKStudio/examples/smile_wall.qrs;C:/TRIKStudio/examples/helloworld.qrs;C:/TRIKStudio/examples/thewall.qrs;C:/TRIKStudio/examples/simpleSayExample.qrs;" | ||
PaletteRepresentation=false | ||
enableNoiseOfSensors=false | ||
D2ModelWindowLastSize=@Size(1366 706) | ||
port1SensorType=0 | ||
PreferencesDialogWasMaximized=false | ||
enableNoiseOfMotors=false | ||
GridWidth=10 | ||
size=@Size(1366 706) | ||
SelectedModelFortrikKit=TwoDRobotModelForTrikRealRobotModelV6 | ||
AutosaveInterval=60 | ||
PaintOldEdgeMode=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include "brandManager.h" | ||
|
||
using namespace qReal; | ||
|
||
BrandManager::BrandManager() | ||
: mFonts(new Fonts) | ||
, mStyles(new Styles(*mFonts)) | ||
{ | ||
} | ||
|
||
BrandManager::~BrandManager() | ||
{ | ||
delete mFonts; | ||
delete mStyles; | ||
} | ||
|
||
BrandManager &BrandManager::instance() | ||
{ | ||
static BrandManager instance; | ||
return instance; | ||
} | ||
|
||
//void BrandManager::configure(ToolPluginManager const *toolPluginManager) | ||
//{ | ||
// instance().mCustomizer = toolPluginManager->customizer(); | ||
//} | ||
|
||
Fonts const *BrandManager::fonts() | ||
{ | ||
return instance().mFonts; | ||
} | ||
|
||
Styles const *BrandManager::styles() | ||
{ | ||
return instance().mStyles; | ||
} | ||
|
||
//QString BrandManager::applicationName() | ||
//{ | ||
// return instance().mCustomizer->windowTitle(); | ||
//} | ||
|
||
//const QImage BrandManager::applicationLogo() | ||
//{ | ||
// return instance().mCustomizer->applicationLogo(); | ||
//} | ||
|
||
//const QIcon BrandManager::applicationIcon() | ||
//{ | ||
// return instance().mCustomizer->applicationIcon(); | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma once | ||
|
||
//#include "pluginManager/toolPluginManager.h" | ||
#include "fonts.h" | ||
#include "styles.h" | ||
|
||
namespace qReal { | ||
|
||
/// Provides information about everything about application appearance: fonts, styles and so on | ||
class BrandManager | ||
{ | ||
public: | ||
static BrandManager &instance(); | ||
|
||
/// Retrieves from plugins customization information | ||
// static void configure(ToolPluginManager const *toolPluginManager); | ||
|
||
// TODO: Pluginize two following methods | ||
|
||
/// Returns information about all fonts in system | ||
static Fonts const *fonts(); | ||
|
||
/// Returns information about all json stylesheets in system | ||
static Styles const *styles(); | ||
|
||
/// Returns application`s name and probably version | ||
static QString applicationName(); | ||
|
||
/// Returns application`s logo image in wide format | ||
static QImage const applicationLogo(); | ||
|
||
/// Returns small application`s icon | ||
static QIcon const applicationIcon(); | ||
|
||
private: | ||
BrandManager(); | ||
~BrandManager(); | ||
|
||
// Customizer *mCustomizer; // Doesn`t take ownership | ||
Fonts const *mFonts; // Takes ownership | ||
Styles const *mStyles; // Takes ownership | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
HEADERS += \ | ||
$$PWD/brandManager.h \ | ||
$$PWD/fonts.h \ | ||
$$PWD/styles.h \ | ||
|
||
SOURCES += \ | ||
$$PWD/brandManager.cpp \ | ||
|
||
RESOURCES += \ | ||
$$PWD/fonts/fonts.qrc \ | ||
$$PWD/styles/styles.qrc \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#pragma once | ||
|
||
#include <QtGui/QFontDatabase> | ||
|
||
#include <qrkernel/settingsManager.h> | ||
|
||
namespace qReal { | ||
|
||
/// A class for managing all used in system fonts | ||
class Fonts | ||
{ | ||
public: | ||
Fonts() | ||
{ | ||
initTitlesFont(); | ||
} | ||
|
||
virtual ~Fonts() | ||
{ | ||
} | ||
|
||
/// Returns font for inline labels on scene | ||
QFont sceneLabelsFont() const | ||
{ | ||
return mTitlesFont; | ||
} | ||
|
||
/// Returns a path to a font for inline labels on scene if other was not selected by user | ||
virtual QString defaultSceneLabelsFont() const | ||
{ | ||
return ":/fonts/Pfennig.ttf"; | ||
} | ||
|
||
/// Returns a path to a font for a text on styled command buttons | ||
virtual QString commandButtonsFont() const | ||
{ | ||
return ":/fonts/Pfennig.ttf"; | ||
} | ||
|
||
/// Returns a path to a font for a styled text, non-regular one | ||
virtual QString styledTextFont() const | ||
{ | ||
return ":/fonts/Pfennig.ttf"; | ||
} | ||
|
||
private: | ||
void initTitlesFont() | ||
{ | ||
if (SettingsManager::value("CustomFont").toBool()) { | ||
mTitlesFont.fromString(SettingsManager::value("CurrentFont").toString()); | ||
} else { | ||
int const fontId = QFontDatabase::addApplicationFont(defaultSceneLabelsFont()); | ||
if (fontId != -1) { | ||
mTitlesFont.fromString(QFontDatabase::applicationFontFamilies(fontId).at(0) + ",11,-1,5,50,0,0,0,0,0"); | ||
} | ||
} | ||
} | ||
|
||
QFont mTitlesFont; | ||
|
||
}; | ||
|
||
} | ||
|
||
// Implemented in .h file for correct linkage |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<RCC> | ||
<qresource prefix="/fonts"> | ||
<file>Pfennig.ttf</file> | ||
</qresource> | ||
</RCC> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
этот файлик тут не нужен