/branches/Version13x/Scribus/scribus/cpalette.cpp |
---|
38,6 → 38,37 |
#include "page.h" |
#include "util.h" |
DynamicTip::DynamicTip( QListBox* parent, Cpalette* pale ) : QToolTip( parent ) |
{ |
pal = pale; |
listB = parent; |
} |
void DynamicTip::maybeTip( const QPoint &pos ) |
{ |
QListBoxItem* it = listB->itemAt(pos); |
if (it != 0) |
{ |
if (!pal->colorList.contains(it->text())) |
return; |
QString tipText = ""; |
ScColor col = pal->colorList[it->text()]; |
if (col.getColorModel() == colorModelCMYK) |
{ |
int c, m, y, k; |
col.getCMYK(&c, &m, &y, &k); |
tipText = QString("C = %1% M = %2% Y = %3% K = %4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55)); |
} |
else |
{ |
int r, g, b; |
col.getRawRGBColor(&r, &g, &b); |
tipText = QString("R = %1 G = %2 B = %3").arg(r).arg(g).arg(b); |
} |
tip(listB->itemRect(it), tipText); |
} |
} |
Cpalette::Cpalette(QWidget* parent) : QWidget(parent, "Cdouble") |
{ |
alertIcon = loadIcon("alert.png"); |
136,6 → 167,7 |
colorListQLBox->setMinimumSize( QSize( 150, 30 ) ); |
colorListQLBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); |
Form1Layout->addWidget(colorListQLBox); |
dynTip = new DynamicTip(colorListQLBox, this); |
Inhalt->setOn(true); |
InnenButton(); |
GradientMode = false; |
596,6 → 628,5 |
QToolTip::add( PM1, tr( "Saturation of color" ) ); |
QToolTip::add( gradientQCombo, tr( "Normal or gradient fill method" ) ); |
QToolTip::add( TransSpin, tr( "Set the transparency for the color selected" ) ); |
QToolTip::add( colorListQLBox, tr( "Color of selected object" ) ); |
QToolTip::add( gradEditButton, "<qt>" + tr( "Move the start of the gradient vector with the left mouse button pressed and move the end of the gradient vector with the right mouse button pressed" ) + "</qt>"); |
} |
/branches/Version13x/Scribus/scribus/about.cpp |
---|
46,7 → 46,7 |
tabLayout1->addWidget( pixmapLabel1 ); |
buildID = new QLabel( tab, "BB" ); |
buildID->setAlignment(Qt::AlignCenter); |
QString bu = tr("%1 %2 %3 ").arg("29").arg("August").arg("2005 "); |
QString bu = tr("%1 %2 %3 ").arg("30").arg("August").arg("2005 "); |
#ifdef HAVE_CMS |
bu += "C"; |
#else |
/branches/Version13x/Scribus/scribus/cpalette.h |
---|
18,6 → 18,7 |
#ifndef CPALETTE_H |
#define CPALETTE_H |
#include <qtooltip.h> |
#include "scribusapi.h" |
#include "scribusstructs.h" |
#include "gradienteditor.h" |
34,11 → 35,10 |
class QComboBox; |
class QLabel; |
class QSpinBox; |
class DynamicTip; |
#include "shadebutton.h" |
#include "mspinbox.h" |
/** |
*@author Franz Schmid |
*/ |
126,6 → 126,17 |
QPixmap rgbIcon; |
QPixmap spotIcon; |
QPixmap regIcon; |
DynamicTip* dynTip; |
}; |
class SCRIBUS_API DynamicTip : public QToolTip |
{ |
public: |
DynamicTip( QListBox* parent, Cpalette* pale ); |
Cpalette* pal; |
QListBox* listB; |
protected: |
void maybeTip( const QPoint & ); |
}; |
#endif |
/branches/Version13x/Scribus/scribus/colorm.h |
---|
18,11 → 18,14 |
#include <qlabel.h> |
#include <qpopupmenu.h> |
#include <qcolor.h> |
#include <qtooltip.h> |
#include "scribusapi.h" |
#include "scribusstructs.h" |
#include "query.h" |
class DynamicTip2; |
class SCRIBUS_API Farbmanager : public QDialog |
{ |
Q_OBJECT |
60,6 → 63,7 |
QPixmap rgbIcon; |
QPixmap spotIcon; |
QPixmap regIcon; |
DynamicTip2* dynTip; |
private slots: |
void saveDefaults(); |
82,4 → 86,14 |
QVBoxLayout* Layout1; |
}; |
class SCRIBUS_API DynamicTip2 : public QToolTip |
{ |
public: |
DynamicTip2( QListBox* parent, Farbmanager* pale ); |
Farbmanager* pal; |
QListBox* listB; |
protected: |
void maybeTip( const QPoint & ); |
}; |
#endif // FARBMANAGER_H |
/branches/Version13x/Scribus/scribus/cmykfw.cpp |
---|
86,7 → 86,6 |
ComboBox1->insertItem( tr( "CMYK" ) ); |
ComboBox1->insertItem( tr( "RGB" ) ); |
ComboBox1->insertItem( tr( "Web Safe RGB" ) ); |
ComboBox1->setMinimumSize( QSize( 200, 22 ) ); |
if (!CMYKmode) |
ComboBox1->setCurrentItem( 1 ); |
TextLabel3->setBuddy( ComboBox1 ); |
698,6 → 697,7 |
BlackSL->show(); |
BlackSp->show(); |
BlackT->show(); |
Farbe.setColorModel(colorModelCMYK); |
setValues(); |
} |
else |
749,6 → 749,7 |
MagentaSp->setLineStep(51); |
YellowSp->setLineStep(51); |
} |
Farbe.setColorModel(colorModelRGB); |
setValues(); |
} |
connect( CyanSp, SIGNAL( valueChanged(int) ), CyanSL, SLOT( setValue(int) ) ); |
/branches/Version13x/Scribus/scribus/colorm.cpp |
---|
9,10 → 9,8 |
#include "colorm.h" |
#include "colorm.moc" |
#include <qvariant.h> |
#include <qtooltip.h> |
#include <qpixmap.h> |
#include <cstdlib> |
#include <qcolordialog.h> |
#include "commonstrings.h" |
#include "customfdialog.h" |
30,6 → 28,37 |
extern ScribusApp* ScApp; |
DynamicTip2::DynamicTip2( QListBox* parent, Farbmanager* pale ) : QToolTip( parent ) |
{ |
pal = pale; |
listB = parent; |
} |
void DynamicTip2::maybeTip( const QPoint &pos ) |
{ |
QListBoxItem* it = listB->itemAt(pos); |
if (it != 0) |
{ |
if (!pal->EditColors.contains(it->text())) |
return; |
QString tipText = ""; |
ScColor col = pal->EditColors[it->text()]; |
if (col.getColorModel() == colorModelCMYK) |
{ |
int c, m, y, k; |
col.getCMYK(&c, &m, &y, &k); |
tipText = QString("C = %1% M = %2% Y = %3% K = %4%").arg(qRound(c / 2.55)).arg(qRound(m / 2.55)).arg(qRound(y / 2.55)).arg(qRound(k / 2.55)); |
} |
else |
{ |
int r, g, b; |
col.getRawRGBColor(&r, &g, &b); |
tipText = QString("R = %1 G = %2 B = %3").arg(r).arg(g).arg(b); |
} |
tip(listB->itemRect(it), tipText); |
} |
} |
Farbmanager::Farbmanager( QWidget* parent, ColorList doco, bool HDoc, QString DcolSet, QStringList Cust ) |
: QDialog( parent, "dd", true, 0 ) |
{ |
136,6 → 165,7 |
Layout2->addLayout( layout5 ); |
Ersatzliste.clear(); |
EditColors = doco; |
dynTip = new DynamicTip2(ListBox1, this); |
updateCList(); |
// signals and slots connections |
if (!HaveDoc) |