Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 14 → Rev 15

/trunk/Scribus/ChangeLogCVS
1,4 → 1,10
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/serializer.h
36,7 → 36,7
void PutText(PageItem *Item);
void GetText(PageItem *Item, int Absatz, bool Append = false);
bool Write();
bool Read();
bool Read(QString Cod = "");
};
 
#endif
/trunk/Scribus/scribus/customfdialog.cpp
23,6 → 23,7
#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);
162,7 → 163,7
GenPreview(url.path());
}
 
CustomFDialog::CustomFDialog(QWidget *pa, QString cap, QString filter, bool Pre, bool mod, bool comp)
CustomFDialog::CustomFDialog(QWidget *pa, QString cap, QString filter, bool Pre, bool mod, bool comp, bool cod)
: QFileDialog(QString::null, filter, pa, 0, true)
{
setIcon(loadIcon("AppIcon.xpm"));
193,6 → 194,47
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/serializer.cpp
121,17 → 121,15
return ret;
}
 
bool Serializer::Read()
bool Serializer::Read(QString Cod)
{
QTextCodec *codec;
bool tmp = loadText(Filename, &Objekt);
QTextCodec* codec = QTextCodec::codecForContent(Objekt, Objekt.length());
if (codec)
{
if (QString(codec->name()) == "UTF-8")
{
QString dec = QString::fromUtf8(Objekt);
Objekt = dec;
}
}
if (Cod == "")
codec = QTextCodec::codecForLocale();
else
codec = QTextCodec::codecForName(Cod);
QString dec = codec->toUnicode( Objekt );
Objekt = dec;
return tmp;
}
/trunk/Scribus/scribus/page.cpp
2575,7 → 2575,8
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(qRound((b->Rot - (oldW - newW))*100.0)/100.0, b->ItemNr);
RotateItem(b->Rot - (oldW - newW), b->ItemNr);
oldW = newW;
// emit DocChanged();
}
/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);
QString CFileDialog(QString caption = "", QString filter = "", QString defNa = "", bool Pre = false, bool mod = true, bool comp = false, bool cod = false);
void GetCMSProfiles();
void RecalcColors(QProgressBar *dia = 0);
void SwitchWin();
152,6 → 152,7
ScribusWin* ActWin;
QString PrefsPfad;
QClipboard *ClipB;
QString LoadEnc;
 
public slots:
void Collect();
/trunk/Scribus/scribus/customfdialog.h
27,6 → 27,7
#include <qlayout.h>
#include <qframe.h>
#include <qtoolbutton.h>
#include <qcombobox.h>
/**
*@author Franz Schmid
*/
61,17 → 62,21
{
Q_OBJECT
public:
CustomFDialog(QWidget *pa, QString cap = "", QString filter = "", bool Pre = false, bool mod = true, bool comp = false);
CustomFDialog(QWidget *pa, QString cap = "", QString filter = "", bool Pre = false, bool mod = true, bool comp = false, bool cod = 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