[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    D11343: T1513
From:       Fabian Kristof <noreply () phabricator ! kde ! org>
Date:       2018-03-21 23:40:41
Message-ID: 20180321234041.1.A21C66932D2B8897 () phabricator ! kde ! org
[Download RAW message or body]

fkristof added inline comments.

INLINE COMMENTS

> ferenczkovacs wrote in TextLabel.cpp:991
> I don't think so, because then i'll need a plus set of set-get functions

That's not a problem. The main idea I have here is that you use labelShape in \
TextLabelPrivate, and not in TextLabel, this implies that labelShape should be a \
member of TextLabelPrivate, not TextLabel. So I suggest you to make this change. The \
same applies to the other parameters you've added, like backgroundColor, borderStyle, \
etc, they all belong to TextLabelPrivate. TextLabel can access them through the d \
pointer, if needed you can write getters and setters for them.

> ferenczkovacs wrote in TextLabel.h:78
> I'll rather use const int getLabelShapeint(); 
> and delete 
> TextLabel::LabelShape getLabelShape();

Since labelShape has the type of  TextLabel::LabelShape your getter should look like

  TextLabel::LabelShape getLabelShape() const;

> ferenczkovacs wrote in LabelWidget.h:64
> a copy of the temporary shape, i think it's quite clear

I think m_previewTempLabelShape would be more self-describing in this case.

REPOSITORY
  R262 LabPlot

REVISION DETAIL
  https://phabricator.kde.org/D11343

To: ferenczkovacs, fkristof
Cc: asemke, #kde_edu, garvitkhatri, narvaez, apol


[Attachment #3 (unknown)]

<table><tr><td style="">fkristof added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D11343">View Revision</a></tr></table><br \
/><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div \
style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D11343#inline-57047">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">ferenczkovacs</span> wrote in <span \
style="color: #4b4d51; font-weight: bold;">TextLabel.cpp:991</span></div> <div \
style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: \
8px;">I don&#039;t think so, because then i&#039;ll need a plus set of set-get \
functions</p></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p \
style="padding: 0; margin: 8px;">That&#039;s not a problem. The main idea I have here \
is that you use labelShape in TextLabelPrivate, and not in TextLabel, this implies \
that labelShape should be a member of TextLabelPrivate, not TextLabel. So I suggest \
you to make this change. The same applies to the other parameters you&#039;ve added, \
like backgroundColor, borderStyle, etc, they all belong to TextLabelPrivate. \
TextLabel can access them through the d pointer, if needed you can write getters and \
setters for them.</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" \
href="https://phabricator.kde.org/D11343#inline-57120">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">ferenczkovacs</span> wrote in <span \
style="color: #4b4d51; font-weight: bold;">TextLabel.h:78</span></div> <div \
style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: \
8px;">I&#039;ll rather use const int getLabelShapeint(); <br /> and delete <br />
TextLabel::LabelShape getLabelShape();</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: \
8px;">Since labelShape has the type of  TextLabel::LabelShape your getter should look \
like</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" \
data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">TextLabel::LabelShape \
getLabelShape() const;</pre></div></div></div><br /><div style="border: 1px solid \
#C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D11343#inline-57130">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">ferenczkovacs</span> wrote in <span \
style="color: #4b4d51; font-weight: bold;">LabelWidget.h:64</span></div> <div \
style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: \
8px;">a copy of the temporary shape, i think it&#039;s quite clear</p></div></div> \
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I \
think m_previewTempLabelShape would be more self-describing in this \
case.</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R262 LabPlot</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D11343">https://phabricator.kde.org/D11343</a></div></div><br \
/><div><strong>To: </strong>ferenczkovacs, fkristof<br /><strong>Cc: </strong>asemke, \
KDE Edu, garvitkhatri, narvaez, apol<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic