Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » QTF editors and styles
QTF editors and styles [message #30579] Mon, 10 January 2011 10:00 Go to next message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Hi guys,

I am working around an tool named: "Report designer" for include it in a my application.

Based on UWord, and changing partially the code, I reache this desigenr:
index.php?t=getfile&id=3034&private=0

The page i splitted in three different part, named heade, body and footer, where, passed to the U++ Report package, are represented as is. that is ok.

The problem: in this way also the styles of the three part are different and I wish to have only one sheet style. If I define a paragraph style in the header, body and footer don't get the same style.

How I can manage the QTF styles ? there is some functions ? I don't found nothing. What I need is to copy the new style after modify one, to the two other editors.

Hope it is clear.

Thanks.
  • Attachment: rd.png
    (Size: 32.34KB, Downloaded 747 times)
Re: QTF editors and styles [message #30580 is a reply to message #30579] Mon, 10 January 2011 10:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Style is part of 'RichText'.

RichText::
int GetStyleCount() const { return style.GetCount(); }
Uuid GetStyleId(int i) const { return style.GetKey(i); }
Uuid GetStyleId(const String& name) const;
const RichStyle& GetStyle(int i) const { return style[i]; }
const RichStyle& GetStyle(const Uuid& id) const { return UPP::GetStyle(style, id); }
void SetStyle(const Uuid& id, const RichStyle& _style);
bool HasStyle(const Uuid& id) { return style.Find(id) >= 0; }
void RemoveStyle(const Uuid& id);

const RichStyles& GetStyles() const { return style; }
void SetStyles(const RichStyles& styles);
void OverrideStyles(const RichStyles& masterstyles,
bool matchname = true, bool addmissing = true);
void MergeStyles(const RichText& text);

Also, handy is RichEdit::ApplyStyleSheet.

I am afraid you will need a new callback introduced to RichEdit, something like "WhenStyleUpdate"?
Re: QTF editors and styles [message #30581 is a reply to message #30580] Mon, 10 January 2011 12:08 Go to previous messageGo to next message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Quote:

I am afraid you will need a new callback introduced to RichEdit, something like "WhenStyleUpdate"?


This will be a good idea! I am thinking to use "WhenRefreshBar" or "WhenAction", both available, but maybe this way will be an work overload.

Around QTF now I have, (hope last) again another problem: there is not included way for force page breaks. I don't understand very well how U++ Report work and how it divide the pages. I need to insert in the QTF source more data, syncronized with the pages, before to passing it to the report. Just for example: before to the end of the page, I want to add a new paragrah, that must to be la part for every page, without use footer, that is for static text.
For undertand can immagine an bom list where, before the page finish, will be inserted some resumes of the page.

In fact I just want do insert, for every page, some static header and footer, syncronized with pages, without using the report Header and Footer.

Any idea ?
(hope for me that this will be last problem around QTF).
Re: QTF editors and styles [message #30582 is a reply to message #30581] Mon, 10 January 2011 12:34 Go to previous messageGo to next message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Maybe this will help for undertand:
index.php?t=getfile&id=3035&private=0

I am searching to manipulate QTF fot force, for every page wher ethe table will be divided, to insert the yellow row as a table header, and the pink row as a table footer. Thats all.

Hope some suggestions.
  • Attachment: rp2.png
    (Size: 81.95KB, Downloaded 682 times)
Re: QTF editors and styles [message #30587 is a reply to message #30582] Mon, 10 January 2011 17:51 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Actually, table header alredy does this Smile

The only problem is we do not have a table footer....
Previous Topic: QTF question -how to insert a QTF string into an XML file?
Next Topic: Can I turn the page a few degrees when printing?
Goto Forum:
  


Current Time: Thu Mar 28 21:13:46 CET 2024

Total time taken to generate the page: 0.01668 seconds