Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 15 → Rev 14

/trunk/Scribus/ChangeLogCVS
1,10 → 1,4
Changes since Version 0.9.10
24.05.2003 scribus.cpp Improved the Clipboard once more, works now with Nedit, OpenOffice
and Mozilla too.
customfdialog.cpp
serializer.cpp Improved importing of Text, you can now choose an Encoding in
the Fileselect Dialog.
 
22.05.2003 scribus.cpp
werktoolb.cpp Splitted off the PDF-Tools from the main Toolbar.
 
/trunk/Scribus/scribus/scribus.h
104,7 → 104,7
PDFlib* getPDFDriver();
void closePDFDriver();
bool DoSaveAsEps(QString fn);
QString CFileDialog(QString caption = "", QString filter = "", QString defNa = "", bool Pre = false, bool mod = true, bool comp = false, bool cod = false);
QString CFileDialog(QString caption = "", QString filter = "", QString defNa = "", bool Pre = false, bool mod = true, bool comp = false);
void GetCMSProfiles();
void RecalcColors(QProgressBar *dia = 0);
void SwitchWin();
152,7 → 152,6
ScribusWin* ActWin;
QString PrefsPfad;
QClipboard *ClipB;
QString LoadEnc;
 
public slots:
void Collect();
/trunk/Scribus/scribus/page.cpp
2575,8 → 2575,7
if (Mpressed && (doku->AppMode == 9))
{
float newW = xy2Deg(newX - qRound(RCenter.x()), newY - qRound(RCenter.y()));
// RotateItem(qRound((b->Rot - (oldW - newW))*100.0)/100.0, b->ItemNr);
RotateItem(b->Rot - (oldW - newW), b->ItemNr);
RotateItem(qRound((b->Rot - (oldW - newW))*100.0)/100.0, b->ItemNr);
oldW = newW;
// emit DocChanged();
}
/trunk/Scribus/scribus/serializer.cpp
121,15 → 121,17
return ret;
}
 
bool Serializer::Read(QString Cod)
bool Serializer::Read()
{
QTextCodec *codec;
bool tmp = loadText(Filename, &Objekt);
if (Cod == "")
codec = QTextCodec::codecForLocale();
else
codec = QTextCodec::codecForName(Cod);
QString dec = codec->toUnicode( Objekt );
Objekt = dec;
QTextCodec* codec = QTextCodec::codecForContent(Objekt, Objekt.length());
if (codec)
{
if (QString(codec->name()) == "UTF-8")
{
QString dec = QString::fromUtf8(Objekt);
Objekt = dec;
}
}
return tmp;
}
/trunk/Scribus/scribus/serializer.h
36,7 → 36,7
void PutText(PageItem *Item);
void GetText(PageItem *Item, int Absatz, bool Append = false);
bool Write();
bool Read(QString Cod = "");
bool Read();
};
 
#endif
/trunk/Scribus/scribus/customfdialog.cpp
23,7 → 23,6
#include <qfileinfo.h>
#include <qdir.h>
#include <qdom.h>
#include <qtextcodec.h>
extern QImage LoadPict(QString fn);
extern bool loadText(QString nam, QString *Buffer);
extern QPixmap loadIcon(QString nam);
163,7 → 162,7
GenPreview(url.path());
}
 
CustomFDialog::CustomFDialog(QWidget *pa, QString cap, QString filter, bool Pre, bool mod, bool comp, bool cod)
CustomFDialog::CustomFDialog(QWidget *pa, QString cap, QString filter, bool Pre, bool mod, bool comp)
: QFileDialog(QString::null, filter, pa, 0, true)
{
setIcon(loadIcon("AppIcon.xpm"));
194,47 → 193,6
if (comp)
addWidgets(0, Layout, 0);
}
if (cod)
{
LayoutC = new QFrame(this);
Layout1C = new QHBoxLayout(LayoutC);
Layout1C->setSpacing( 0 );
Layout1C->setMargin( 4 );
TxCodeT = new QLabel(this);
TxCodeT->setText(tr("Encoding:"));
TxCodeM = new QComboBox(true, LayoutC, "Cod");
TxCodeM->setEditable(false);
TxCodeM->insertItem("ISO8859-1");
TxCodeM->insertItem("ISO8859-2");
TxCodeM->insertItem("ISO8859-3");
TxCodeM->insertItem("ISO8859-4");
TxCodeM->insertItem("ISO8859-5");
TxCodeM->insertItem("ISO8859-6");
TxCodeM->insertItem("ISO8859-7");
TxCodeM->insertItem("ISO8859-8");
TxCodeM->insertItem("ISO8859-9");
TxCodeM->insertItem("ISO8859-10");
TxCodeM->insertItem("ISO8859-13");
TxCodeM->insertItem("ISO8859-14");
TxCodeM->insertItem("ISO8859-15");
TxCodeM->insertItem("utf8");
TxCodeM->insertItem("KOI8-R");
TxCodeM->insertItem("KOI8-U");
QString localEn = QTextCodec::codecForLocale()->name();
for (int cc = 0; cc < TxCodeM->count(); cc++)
{
if (TxCodeM->text(cc) == localEn)
{
TxCodeM->setCurrentItem(cc);
break;
}
}
TxCodeM->setMinimumSize(QSize(200, 0));
Layout1C->addWidget(TxCodeM);
QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1C->addItem( spacer2 );
addWidgets(TxCodeT, LayoutC, 0);
}
if (Pre)
setPreviewMode( QFileDialog::Contents );
else
/trunk/Scribus/scribus/customfdialog.h
27,7 → 27,6
#include <qlayout.h>
#include <qframe.h>
#include <qtoolbutton.h>
#include <qcombobox.h>
/**
*@author Franz Schmid
*/
62,21 → 61,17
{
Q_OBJECT
public:
CustomFDialog(QWidget *pa, QString cap = "", QString filter = "", bool Pre = false, bool mod = true, bool comp = false, bool cod = false);
CustomFDialog(QWidget *pa, QString cap = "", QString filter = "", bool Pre = false, bool mod = true, bool comp = false);
~CustomFDialog();
QDir cDir;
QCheckBox* SaveZip;
QFrame* Layout;
QToolButton* HomeB;
QFrame* LayoutC;
QComboBox *TxCodeM;
QLabel *TxCodeT;
private slots:
void slotHome();
void HandleComp();
protected:
QHBoxLayout* Layout1;
QHBoxLayout* Layout1C;
};
 
#endif