no more definitions of get functions in headers

master
Denes Matetelki 14 years ago
parent 11e8fa36d0
commit 7b45f784e6

@ -21,9 +21,9 @@ public:
*/ */
bool parseCmdLineArgs(bool &successful); bool parseCmdLineArgs(bool &successful);
bool isSystemTray() { return m_isSystemTray; } bool isSystemTray();
bool isShowMinimized() { return m_isShowMinimized; } bool isShowMinimized();
QString filePath() { return m_filePath; } QString filePath();
private: private:

@ -13,16 +13,16 @@ public:
Edge(Node *sourceNode, Node *destNode); Edge(Node *sourceNode, Node *destNode);
~Edge(); ~Edge();
Node *sourceNode() const { return m_sourceNode; } Node *sourceNode() const;
Node *destNode() const { return m_destNode; } Node *destNode() const;
double angle() const { return m_angle; } double angle() const;
// set/get color/width/secondary // set/get color/width/secondary
QColor color() const { return m_color; } QColor color() const;
void setColor(const QColor &color); void setColor(const QColor &color);
qreal width() const { return m_width; } qreal width() const;
void setWidth(const qreal &width); void setWidth(const qreal &width);
bool secondary() const { return m_secondary; } bool secondary() const;
void setSecondary(const bool &sec = true ); void setSecondary(const bool &sec = true );
// re-calculates the source and endpoint. // re-calculates the source and endpoint.

@ -33,9 +33,9 @@ public:
void setBorder(const bool &hasBorder = true); void setBorder(const bool &hasBorder = true);
void setEditable(const bool &editable = true); void setEditable(const bool &editable = true);
void setColor(const QColor &color); void setColor(const QColor &color);
QColor color() const { return m_color; } QColor color() const;
void setTextColor(const QColor &color); void setTextColor(const QColor &color);
QColor textColor() const { return m_textColor; } QColor textColor() const;
void setScale(const qreal &factor, const QRectF &sceneRect); void setScale(const qreal &factor, const QRectF &sceneRect);
// show numbers in hint mode // show numbers in hint mode

@ -16,7 +16,7 @@ public:
explicit SystemTray(MainWindow *mainWindow, QWidget *parent = 0); explicit SystemTray(MainWindow *mainWindow, QWidget *parent = 0);
// access private member // access private member
void show() { m_systemTrayIcon->show(); } void show();
private: private:

@ -104,3 +104,18 @@ bool ArgumentParser::parseCmdLineArgs(bool &successful)
} }
return true; return true;
} }
bool ArgumentParser::isSystemTray()
{
return m_isSystemTray;
}
bool ArgumentParser::isShowMinimized()
{
return m_isShowMinimized;
}
QString ArgumentParser::filePath()
{
return m_filePath;
}

@ -34,12 +34,37 @@ Edge::~Edge()
m_destNode->removeEdgeFromList(this); m_destNode->removeEdgeFromList(this);
} }
Node * Edge::sourceNode() const
{
return m_sourceNode;
}
Node * Edge::destNode() const
{
return m_destNode;
}
double Edge::angle() const
{
return m_angle;
}
QColor Edge::color() const
{
return m_color;
}
void Edge::setColor(const QColor &color) void Edge::setColor(const QColor &color)
{ {
m_color = color; m_color = color;
update(); update();
} }
qreal Edge::width() const
{
return m_width;
}
void Edge::setWidth(const qreal &width) void Edge::setWidth(const qreal &width)
{ {
if (width < 1 || width > 100) if (width < 1 || width > 100)
@ -49,6 +74,11 @@ void Edge::setWidth(const qreal &width)
update(); update();
} }
bool Edge::secondary() const
{
return m_secondary;
}
void Edge::setSecondary(const bool &sec) void Edge::setSecondary(const bool &sec)
{ {
m_secondary = sec; m_secondary = sec;

@ -175,12 +175,22 @@ void Node::setColor(const QColor &color)
update(); update();
} }
QColor Node::color() const
{
return m_color;
}
void Node::setTextColor(const QColor &color) void Node::setTextColor(const QColor &color)
{ {
m_textColor = color; m_textColor = color;
update(); update();
} }
QColor Node::textColor() const
{
return m_textColor;
}
void Node::setScale(const qreal &factor,const QRectF &sceneRect) void Node::setScale(const qreal &factor,const QRectF &sceneRect)
{ {
// limit scale to a reasonable size // limit scale to a reasonable size

@ -37,3 +37,8 @@ SystemTray::SystemTray(MainWindow *mainWindow, QWidget *parent)
m_icon = new QIcon(":/qtmindmap.svg"); m_icon = new QIcon(":/qtmindmap.svg");
m_systemTrayIcon->setIcon(QIcon(":/qtmindmap.svg")); m_systemTrayIcon->setIcon(QIcon(":/qtmindmap.svg"));
} }
void SystemTray::show()
{
m_systemTrayIcon->show();
}

Loading…
Cancel
Save