@ -1098,7 +1098,7 @@ void Note::relayoutAt(int x, int y, bool animate)
m_computedAreas=false;
m_areas.clear();
// Don't retqlayout free notes one under the other, because by definition they are freely positionned!
// Don't relayout free notes one under the other, because by definition they are freely positionned!
if(isFree()){
x=finalX();
y=finalY();
@ -1109,7 +1109,7 @@ void Note::relayoutAt(int x, int y, bool animate)
cancelAnimation();
setX(x);
setY(y);
// But retqlayout others vertically if they are inside such primary groups or if it is a "normal" basket:
// But relayout others vertically if they are inside such primary groups or if it is a "normal" basket:
}else{
if(animate)
setFinalPosition(x,y);
@ -1120,13 +1120,13 @@ void Note::relayoutAt(int x, int y, bool animate)
}
}
// Then, retqlayout sub-notes (only the first, if the group is folded) and so, assign an height to the group:
// Then, relayout sub-notes (only the first, if the group is folded) and so, assign an height to the group:
if(isGroup()){
inth=0;
Note*child=firstChild();
boolfirst=true;
while(child){
if(child->matching()&&(!m_isFolded||first||basket()->isFiltering())){// Don't use showSubNotes() but use !m_isFolded because we don't want a retqlayout for the animated collapsing notes
if(child->matching()&&(!m_isFolded||first||basket()->isFiltering())){// Don't use showSubNotes() but use !m_isFolded because we don't want a relayout for the animated collapsing notes
child->relayoutAt(x+width(),y+h,animate);
h+=child->finalHeight();
}else// In case the user collapse a group, then move it and then expand it:
voidsetInitialHeight(intheight){m_height=height;}/// << Do NEVER use it unless you know what you do!
voidsetX(intx);
voidsetY(inty);
@ -93,7 +93,7 @@ class Note
intminWidth();
intminRight();
voidunsetWidth();
voidrequestRetqlayout();
voidrequestRelayout();
voidsetHeight(intheight){m_height=height;}/// << DO NEVER USE IT!!! Only available when moving notes, groups should be recreated with the exact same state as before!
note()->requestRetqlayout();// TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only repaint and not retqlayout
note()->requestRelayout();// TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only repaint and not relayout
@ -82,7 +82,7 @@ class NoteContent // TODO: Mark some methods as const! and some (lik
// Complexe Abstract Generic Methods:
virtualvoidexportToHTML(HTMLExporter*exporter,intindent)=0;/// << Export the note in an HTML file.
virtualTQStringcssClass()=0;/// << @return the CSS class of the note when exported to HTML
virtualintsetWidthAndGetHeight(intwidth)=0;/// << Retqlayout content with @p width (never less than minWidth()). @return its new height.
virtualintsetWidthAndGetHeight(intwidth)=0;/// << Relayout content with @p width (never less than minWidth()). @return its new height.
virtualvoidpaint(TQPainter*painter,intwidth,intheight,constTQColorGroup&colorGroup,boolisDefaultColor,boolisSelected,boolisHovered)=0;/// << Paint the content on @p painter, at coordinate (0, 0) and with the size (@p width, @p height).
virtualboolloadFromFile(bool/*lazyLoad*/){returnfalse;}/// << Load the content from the file. The default implementation does nothing. @see fileName().
virtualboolfinishLazyLoad(){returnfalse;}/// << Load what was not loaded by loadFromFile() if it was lazy-loaded
@ -131,7 +131,7 @@ class NoteContent // TODO: Mark some methods as const! and some (lik
public:
voidsetEdited();/// << Mark the note as edited NOW: change the "last modification time and time" AND save the basket to XML file.
protected:
voidcontentChanged(intnewMinWidth);/// << When the content has changed, inherited classes should call this to specify its new minimum size and trigger a basket retqlayout.
voidcontentChanged(intnewMinWidth);/// << When the content has changed, inherited classes should call this to specify its new minimum size and trigger a basket relayout.
private:
Note*m_note;
TQStringm_fileName;
@ -176,7 +176,7 @@ class TextContent : public NoteContent
TQStringmessageWhenOpenning(OpenMessagewhere);
// TQString customOpenCommand();
// Content-Specific Methods:
voidsetText(constTQString&text,boollazyLoad=false);/// << Change the text note-content and retqlayout the note.
voidsetText(constTQString&text,boollazyLoad=false);/// << Change the text note-content and relayout the note.
TQStringtext(){returnm_text;}/// << @return the text note-content.
protected:
TQStringm_text;
@ -219,7 +219,7 @@ class HtmlContent : public NoteContent
TQStringmessageWhenOpenning(OpenMessagewhere);
TQStringcustomOpenCommand();
// Content-Specific Methods:
voidsetHtml(constTQString&html,boollazyLoad=false);/// << Change the HTML note-content and retqlayout the note.
voidsetHtml(constTQString&html,boollazyLoad=false);/// << Change the HTML note-content and relayout the note.
TQStringhtml(){returnm_html;}/// << @return the HTML note-content.
protected:
TQStringm_html;
@ -263,7 +263,7 @@ class ImageContent : public NoteContent
TQStringmessageWhenOpenning(OpenMessagewhere);
TQStringcustomOpenCommand();
// Content-Specific Methods:
voidsetPixmap(constTQPixmap&pixmap);/// << Change the pixmap note-content and retqlayout the note.
voidsetPixmap(constTQPixmap&pixmap);/// << Change the pixmap note-content and relayout the note.
TQPixmappixmap(){returnm_pixmap;}/// << @return the pixmap note-content.
protected:
TQPixmapm_pixmap;
@ -307,7 +307,7 @@ class AnimationContent : public TQObject, public NoteContent // TQObject to be a
TQStringmessageWhenOpenning(OpenMessagewhere);
TQStringcustomOpenCommand();
// Content-Specific Methods:
boolsetMovie(constTQMovie&movie);/// << Change the movie note-content and retqlayout the note.
boolsetMovie(constTQMovie&movie);/// << Change the movie note-content and relayout the note.
TQMoviemovie(){returnm_movie;}/// << @return the movie note-content.
protectedslots:
voidmovieUpdated(constTQRect&);
@ -360,7 +360,7 @@ class FileContent : public TQObject, public NoteContent
// Open Content or File:
TQStringmessageWhenOpenning(OpenMessagewhere);
// Content-Specific Methods:
voidsetFileName(constTQString&fileName);/// << Reimplemented to be able to retqlayout the note.
voidsetFileName(constTQString&fileName);/// << Reimplemented to be able to relayout the note.
@ -449,7 +449,7 @@ class LinkContent : public TQObject, public NoteContent
KURLurlToOpen(bool/*with*/);
TQStringmessageWhenOpenning(OpenMessagewhere);
// Content-Specific Methods:
voidsetLink(constKURL&url,constTQString&title,constTQString&icon,boolautoTitle,boolautoIcon);/// << Change the link and retqlayout the note.
voidsetLink(constKURL&url,constTQString&title,constTQString&icon,boolautoTitle,boolautoIcon);/// << Change the link and relayout the note.
KURLurl(){returnm_url;}/// << @return the URL of the link note-content.
TQStringtitle(){returnm_title;}/// << @return the displayed title of the link note-content.
TQStringicon(){returnm_icon;}/// << @return the displayed icon of the link note-content.
@ -509,7 +509,7 @@ class LauncherContent : public NoteContent
KURLurlToOpen(boolwith);
TQStringmessageWhenOpenning(OpenMessagewhere);
// Content-Specific Methods:
voidsetLauncher(constTQString&name,constTQString&icon,constTQString&exec);/// << Change the launcher note-content and retqlayout the note. Normally called by loadFromFile (no save done).
voidsetLauncher(constTQString&name,constTQString&icon,constTQString&exec);/// << Change the launcher note-content and relayout the note. Normally called by loadFromFile (no save done).
TQStringname(){returnm_name;}/// << @return the URL of the launcher note-content.
TQStringicon(){returnm_icon;}/// << @return the displayed icon of the launcher note-content.
TQStringexec(){returnm_exec;}/// << @return the execute command line of the launcher note-content.
@ -554,7 +554,7 @@ class ColorContent : public NoteContent
stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed,/*ver=*/TQSizePolicy::Expanding,/*hStretch=*/1,/*vStretch=*/255));// Make it fill ALL vertical space
stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed,/*ver=*/TQSizePolicy::Expanding,/*hStretch=*/1,/*vStretch=*/255));// Make it fill ALL vertical space