summaryrefslogtreecommitdiffstats
path: root/src/notecontent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/notecontent.cpp')
-rw-r--r--src/notecontent.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/src/notecontent.cpp b/src/notecontent.cpp
index 24fbd6c..7dc7e17 100644
--- a/src/notecontent.cpp
+++ b/src/notecontent.cpp
@@ -22,7 +22,7 @@
#include <tqdir.h>
#include <tqdom.h>
#include <tqpainter.h>
-#include <stylesheet.h>
+#include <tqstylesheet.h>
#include <tqfontmetrics.h>
#include <tqwidget.h>
#include <tqcursor.h>
@@ -138,7 +138,7 @@ void NoteContent::contentChanged(int newMinWidth)
m_minWidth = newMinWidth;
if (note()) {
// note()->unbufferize();
- note()->requestRelayout(); // TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only repaint and not relayout
+ note()->requestRetqlayout(); // TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only tqrepaint and not retqlayout
}
}
@@ -152,7 +152,7 @@ Basket* NoteContent::basket()
void NoteContent::setEdited()
{
- note()->setLastModificationDate(TQDateTime::currentDateTime());
+ note()->setLastModificationDate(TQDateTime::tqcurrentDateTime());
basket()->save();
}
@@ -210,7 +210,7 @@ TQString LinkContent::toText(const TQString &/*cuttedFullPath*/)
else if (title().isEmpty())
return url().prettyURL();
else
- return TQString("%1 <%2>").arg(title(), url().prettyURL());
+ return TQString("%1 <%2>").tqarg(title(), url().prettyURL());
}
TQString ColorContent::toText(const TQString &/*cuttedFullPath*/) { return color().name(); }
TQString UnknownContent::toText(const TQString &/*cuttedFullPath*/) { return ""; }
@@ -223,25 +223,25 @@ TQString HtmlContent::toHtml(const TQString &/*imageName*/, const TQString &/*cu
{ return Tools::htmlToParagraph(html()); }
TQString ImageContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
-{ return TQString("<img src=\"%1\">").arg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); }
+{ return TQString("<img src=\"%1\">").tqarg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); }
TQString AnimationContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
-{ return TQString("<img src=\"%1\">").arg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); }
+{ return TQString("<img src=\"%1\">").tqarg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); }
TQString SoundContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
-{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon?
+{ return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon?
TQString FileContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
-{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon?
+{ return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon?
TQString LinkContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/)
-{ return TQString("<a href=\"%1\">%2</a>").arg(url().prettyURL(), title()); } // With the icon?
+{ return TQString("<a href=\"%1\">%2</a>").tqarg(url().prettyURL(), title()); } // With the icon?
TQString LauncherContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
-{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), name()); } // With the icon?
+{ return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), name()); } // With the icon?
TQString ColorContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/)
-{ return TQString("<span style=\"color: %1\">%2</span>").arg(color().name(), color().name()); }
+{ return TQString("<span style=\"color: %1\">%2</span>").tqarg(color().name(), color().name()); }
TQString UnknownContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/)
{ return ""; }
@@ -378,14 +378,14 @@ TQPixmap HtmlContent::feedbackPixmap(int width, int height)
{
TQSimpleRichText richText(html(), note()->font());
richText.setWidth(width);
- TQColorGroup colorGroup(basket()->colorGroup());
- colorGroup.setColor(TQColorGroup::Text, note()->textColor());
- colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
+ TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
+ tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
+ tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPixmap pixmap( TQMIN(width, richText.widthUsed()), TQMIN(height, richText.height()) );
pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPainter painter(&pixmap);
painter.setPen(note()->textColor());
- richText.draw(&painter, 0, 0, TQRect(0, 0, pixmap.width(), pixmap.height()), colorGroup);
+ richText.draw(&painter, 0, 0, TQRect(0, 0, pixmap.width(), pixmap.height()), tqcolorGroup);
painter.end();
return pixmap;
}
@@ -433,10 +433,10 @@ TQPixmap AnimationContent::feedbackPixmap(int width, int height)
TQPixmap LinkContent::feedbackPixmap(int width, int height)
{
- TQColorGroup colorGroup(basket()->colorGroup());
- colorGroup.setColor(TQColorGroup::Text, note()->textColor());
- colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
- return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
+ TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
+ tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
+ tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
+ return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
}
TQPixmap ColorContent::feedbackPixmap(int width, int height)
@@ -446,45 +446,45 @@ TQPixmap ColorContent::feedbackPixmap(int width, int height)
int rectHeight = (textRect.height() + 2)*3/2;
int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers.
- TQColorGroup colorGroup(basket()->colorGroup());
- colorGroup.setColor(TQColorGroup::Text, note()->textColor());
- colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
+ TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
+ tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
+ tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPixmap pixmap( TQMIN(width, rectWidth + RECT_MARGIN + textRect.width() + RECT_MARGIN), TQMIN(height, rectHeight) );
pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPainter painter(&pixmap);
- paint(&painter, pixmap.width(), pixmap.height(), colorGroup, false, false, false); // We don't care of the three last boolean parameters.
+ paint(&painter, pixmap.width(), pixmap.height(), tqcolorGroup, false, false, false); // We don't care of the three last boolean parameters.
painter.end();
return pixmap;
}
TQPixmap FileContent::feedbackPixmap(int width, int height)
{
- TQColorGroup colorGroup(basket()->colorGroup());
- colorGroup.setColor(TQColorGroup::Text, note()->textColor());
- colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
- return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
+ TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
+ tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
+ tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
+ return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
}
TQPixmap LauncherContent::feedbackPixmap(int width, int height)
{
- TQColorGroup colorGroup(basket()->colorGroup());
- colorGroup.setColor(TQColorGroup::Text, note()->textColor());
- colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
- return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
+ TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
+ tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
+ tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
+ return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
}
TQPixmap UnknownContent::feedbackPixmap(int width, int height)
{
TQRect textRect = TQFontMetrics(note()->font()).boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop | TQt::WordBreak, m_mimeTypes);
- TQColorGroup colorGroup(basket()->colorGroup());
- colorGroup.setColor(TQColorGroup::Text, note()->textColor());
- colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
+ TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
+ tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
+ tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPixmap pixmap( TQMIN(width, DECORATION_MARGIN + textRect.width() + DECORATION_MARGIN), TQMIN(height, DECORATION_MARGIN + textRect.height() + DECORATION_MARGIN) );
TQPainter painter(&pixmap);
- paint(&painter, pixmap.width() + 1, pixmap.height(), colorGroup, false, false, false); // We don't care of the three last boolean parameters.
+ paint(&painter, pixmap.width() + 1, pixmap.height(), tqcolorGroup, false, false, false); // We don't care of the three last boolean parameters.
painter.setPen(note()->backgroundColor().dark(FEEDBACK_DARKING));
painter.drawPoint(0, 0);
painter.drawPoint(pixmap.width() - 1, 0);
@@ -520,11 +520,11 @@ int TextContent::setWidthAndGetHeight(int width)
return 10; // Lazy loaded
}
-void TextContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
+void TextContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{
if (m_simpleRichText) {
width -= 1;
- m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), colorGroup);
+ m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), tqcolorGroup);
}
}
@@ -629,11 +629,11 @@ int HtmlContent::setWidthAndGetHeight(int width)
return 10; // Lazy loaded
}
-void HtmlContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
+void HtmlContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{
if (m_simpleRichText) {
width -= 1;
- m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), colorGroup);
+ m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), tqcolorGroup);
}
}
@@ -735,7 +735,7 @@ int ImageContent::setWidthAndGetHeight(int width)
}
}
-void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*colorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
+void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*tqcolorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{
width -= 1;
// KPixmap pixmap = m_pixmap;
@@ -804,7 +804,7 @@ bool ImageContent::saveToFile()
void ImageContent::toolTipInfos(TQStringList *keys, TQStringList *values)
{
keys->append(i18n("Size"));
- values->append(i18n("%1 by %2 pixels").arg(TQString::number(m_pixmap.width()), TQString::number(m_pixmap.height())));
+ values->append(i18n("%1 by %2 pixels").tqarg(TQString::number(m_pixmap.width()), TQString::number(m_pixmap.height())));
}
TQString ImageContent::messageWhenOpenning(OpenMessage where)
@@ -855,7 +855,7 @@ void ImageContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
int AnimationContent::INVALID_STATUS = -100;
AnimationContent::AnimationContent(Note *parent, const TQString &fileName, bool lazyLoad)
- : NoteContent(parent, fileName), m_oldStatus(INVALID_STATUS)
+ : NoteContent(parent, fileName), m_oldtqStatus(INVALID_STATUS)
{
basket()->addWatchedFile(fullPath());
loadFromFile(lazyLoad);
@@ -867,7 +867,7 @@ int AnimationContent::setWidthAndGetHeight(int /*width*/)
return m_movie.framePixmap().height() ; // TODO!!!
}
-void AnimationContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*colorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
+void AnimationContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*tqcolorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{
/*width -= 1*/;
// DEBUG_WIN << "AnimationContent::paint()";
@@ -929,7 +929,7 @@ bool AnimationContent::setMovie(const TQMovie &movie)
m_movie = movie;
m_movie.connectUpdate( this, TQT_SLOT(movieUpdated(const TQRect&)) );
m_movie.connectResize( this, TQT_SLOT(movieResized(const TQSize&)) );
- m_movie.connectStatus( this, TQT_SLOT(movieStatus(int)) );
+ m_movie.connectStatus( this, TQT_SLOT(movietqStatus(int)) );
contentChanged( m_movie.framePixmap().width() + 1 ); // TODO
return true;
}
@@ -942,7 +942,7 @@ void AnimationContent::movieUpdated(const TQRect&)
void AnimationContent::movieResized(const TQSize&)
{
- note()->requestRelayout(); // ?
+ note()->requestRetqlayout(); // ?
}
/** When a user drop a .gif file, for instance, we don't know if it is an image
@@ -953,21 +953,21 @@ void AnimationContent::movieResized(const TQSize&)
* - For animation: TQMovie::EndOfFrame... (for each image), TQMovie::EndOfLoop,
* and it then restart that for each loop.
*/
-void AnimationContent::movieStatus(int status)
+void AnimationContent::movietqStatus(int status)
{
DEBUG_WIN << "movieStatus()";
// At least two frames: it's an animation, everything is OK
- if (m_oldStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfFrame) {
+ if (m_oldtqStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfFrame) {
movie().disconnectStatus(this);
- m_oldStatus = INVALID_STATUS;
+ m_oldtqStatus = INVALID_STATUS;
// if (note()->isFocused()) // When inserting a new note we ensure it visble
// basket()->ensureNoteVisible(note()); // But after loading it has certainly grown and if it was
}
// Only one image: it's an image, change note's type
- else if (m_oldStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfLoop) {
+ else if (m_oldtqStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfLoop) {
movie().disconnectStatus(this);
- m_oldStatus = INVALID_STATUS;
+ m_oldtqStatus = INVALID_STATUS;
note()->setContent(new ImageContent(note(), fileName()));
basket()->save();
//delete this; // CRASH, as always !!!!!!!!!
@@ -977,13 +977,13 @@ void AnimationContent::movieStatus(int status)
// TQTimer::singleShot(25, note(), TQT_SLOT(delayedEnsureVisible()));
}
else
- m_oldStatus = status;
+ m_oldtqStatus = status;
}
void AnimationContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
{
exporter->stream << TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">")
- .arg( exporter->dataFolderName + exporter->copyFile(fullPath(), /*createIt=*/true),
+ .tqarg( exporter->dataFolderName + exporter->copyFile(fullPath(), /*createIt=*/true),
TQString::number(movie().framePixmap().size().width()),
TQString::number(movie().framePixmap().size().height()) );
}
@@ -1004,9 +1004,9 @@ int FileContent::setWidthAndGetHeight(int width)
return m_linkDisplay.height();
}
-void FileContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
+void FileContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
{
- m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
+ m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
}
bool FileContent::loadFromFile(bool /*lazyLoad*/)
@@ -1221,9 +1221,9 @@ int LinkContent::setWidthAndGetHeight(int width)
return m_linkDisplay.height();
}
-void LinkContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
+void LinkContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
{
- m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
+ m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
}
void LinkContent::saveToNode(TQDomDocument &doc, TQDomElement &content)
@@ -1407,9 +1407,9 @@ int LauncherContent::setWidthAndGetHeight(int width)
return m_linkDisplay.height();
}
-void LauncherContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
+void LauncherContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
{
- m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
+ m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
}
bool LauncherContent::loadFromFile(bool /*lazyLoad*/) // TODO: saveToFile() ?? Is it possible?
@@ -1427,7 +1427,7 @@ void LauncherContent::toolTipInfos(TQStringList *keys, TQStringList *values)
TQString exec = service.exec();
if (service.terminal())
- exec = i18n("%1 <i>(run in terminal)</i>").arg(exec);
+ exec = i18n("%1 <i>(run in terminal)</i>").tqarg(exec);
if (!service.comment().isEmpty() && service.comment() != service.name()) {
keys->append(i18n("Comment"));
@@ -1527,7 +1527,7 @@ int ColorContent::setWidthAndGetHeight(int /*width*/) // We do not need width be
return rectHeight;
}
-void ColorContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
+void ColorContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{
// FIXME: Duplicate from setColor():
TQRect textRect = TQFontMetrics(note()->font()).boundingRect(color().name());
@@ -1553,7 +1553,7 @@ void ColorContent::paint(TQPainter *painter, int width, int height, const TQColo
// Draw the text:
painter->setFont(note()->font());
- painter->setPen(colorGroup.text());
+ painter->setPen(tqcolorGroup.text());
painter->drawText(rectWidth + RECT_MARGIN, 0, width - rectWidth - RECT_MARGIN, height, TQt::AlignAuto | TQt::AlignVCenter, color().name());
}
@@ -1570,10 +1570,10 @@ void ColorContent::toolTipInfos(TQStringList *keys, TQStringList *values)
m_color.getHsv(&hue, &saturation, &value);
keys->append(i18n("RGB Colorspace: Red/Green/Blue", "RGB"));
- values->append(i18n("<i>Red</i>: %1, <i>Green</i>: %2, <i>Blue</i>: %3,").arg(TQString::number(m_color.red()), TQString::number(m_color.green()), TQString::number(m_color.blue())));
+ values->append(i18n("<i>Red</i>: %1, <i>Green</i>: %2, <i>Blue</i>: %3,").tqarg(TQString::number(m_color.red()), TQString::number(m_color.green()), TQString::number(m_color.blue())));
keys->append(i18n("HSV Colorspace: Hue/Saturation/Value", "HSV"));
- values->append(i18n("<i>Hue</i>: %1, <i>Saturation</i>: %2, <i>Value</i>: %3,").arg(TQString::number(hue), TQString::number(saturation), TQString::number(value)));
+ values->append(i18n("<i>Hue</i>: %1, <i>Saturation</i>: %2, <i>Value</i>: %3,").tqarg(TQString::number(hue), TQString::number(saturation), TQString::number(value)));
static TQString cssColors[] = {
"aqua", "00ffff",
@@ -1778,12 +1778,12 @@ void ColorContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
int rectHeight = (textRect.height() + 2)*3/2;
int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers.
- TQString fileName = /*Tools::fileNameForNewFile(*/TQString(TQString("color_%1.png").arg(color().name()).lower().mid(1))/*, exportData.iconsFolderPath)*/;
+ TQString fileName = /*Tools::fileNameForNewFile(*/TQString(TQString("color_%1.png").tqarg(color().name()).lower().mid(1))/*, exportData.iconsFolderPath)*/;
TQString fullPath = exporter->iconsFolderPath + fileName;
TQPixmap colorIcon = KColorCombo2::colorRectPixmap(color(), /*isDefault=*/false, rectWidth, rectHeight);
colorIcon.save(fullPath, "PNG");
TQString iconHtml = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">")
- .arg(exporter->iconsFolderName + fileName, TQString::number(colorIcon.width()), TQString::number(colorIcon.height()));
+ .tqarg(exporter->iconsFolderName + fileName, TQString::number(colorIcon.width()), TQString::number(colorIcon.height()));
exporter->stream << iconHtml + " " + color().name();
}
@@ -1814,29 +1814,29 @@ extern void drawGradient( TQPainter *p, const TQColor &colorTop, const TQColor &
int x, int y, int w, int h,
bool sunken, bool horz, bool flat ); /*const*/
-void UnknownContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
+void UnknownContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{
width -= 1;
- painter->setPen(colorGroup.text());
+ painter->setPen(tqcolorGroup.text());
// FIXME: Duplicate from ColorContent::paint() and CommonColorSelector::drawColorRect:
// Fill with gradient:
- drawGradient(painter, colorGroup.background(), colorGroup.background().dark(110), 1, 1, width - 2, height - 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false);
+ drawGradient(painter, tqcolorGroup.background(), tqcolorGroup.background().dark(110), 1, 1, width - 2, height - 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false);
// Stroke:
- TQColor stroke = Tools::mixColor(colorGroup.background(), colorGroup.text());
+ TQColor stroke = Tools::mixColor(tqcolorGroup.background(), tqcolorGroup.text());
painter->setPen(stroke);
painter->drawLine(1, 0, width - 2, 0);
painter->drawLine(0, 1, 0, height - 2);
painter->drawLine(1, height - 1, width - 2, height - 1);
painter->drawLine(width - 1, 1, width - 1, height - 2);
// Round corners:
- painter->setPen(Tools::mixColor(colorGroup.background(), stroke));
+ painter->setPen(Tools::mixColor(tqcolorGroup.background(), stroke));
painter->drawPoint(1, 1);
painter->drawPoint(1, height - 2);
painter->drawPoint(width - 2, height - 2);
painter->drawPoint(width - 2, 1);
- painter->setPen(colorGroup.text());
+ painter->setPen(tqcolorGroup.text());
painter->drawText(DECORATION_MARGIN, DECORATION_MARGIN, width - 2*DECORATION_MARGIN, height - 2*DECORATION_MARGIN,
TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak, m_mimeTypes);
}