Commit 9c971726 authored by Cédric Pasteur's avatar Cédric Pasteur
Browse files

Porting to 2.0:

* Fixed some typos in KoProperty doxygen doc
* Fix: make the group titles in Editor written in the two columns (instead of being clipped in the first column)

svn path=/trunk/koffice/; revision=545508
parent 62c03068
......@@ -361,19 +361,19 @@ EditorGroupItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int
//if(column == 1)
// return;
p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR ); //! \todo custom color?
p->drawLine(0, height()-1, width-1, height()-1);
if (column==0) {
p->eraseRect(QRect(0,0,width+listView()->columnWidth(1),height()-1));
}
else {
return;
}
p->setClipRect(listView()->itemRect(this));
if(column == 1)
p->translate(-listView()->columnWidth(0) + 20, 0);
int totalWidth = listView()->columnWidth(0) + listView()->columnWidth(1) - 20;
p->eraseRect(QRect(0,0, totalWidth,height()-1));
p->drawLine(0, height()-1, totalWidth-1, height()-1);
QFont font = listView()->font();
font.setBold(true);
p->setFont(font);
p->setBrush(cg.highlight());
p->setPen(cg.highlightedText());
//p->setPen(cg.highlightedText());
/*
#ifdef QT_ONLY
QListViewItem::paintCell(p, cg, column, width, align);
......@@ -381,8 +381,8 @@ EditorGroupItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int
K3ListViewItem::paintCell(p, cg, column, width, align);
#endif*/
p->setPen(cg.text());
p->drawText(QRect(0,0, width+listView()->columnWidth(1), height()),
Qt::AlignLeft | Qt::AlignVCenter | Qt::TextSingleLine, text(0));
p->drawText(QRect(0,0, totalWidth, height()),
+ Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, text(0));
}
void
......
......@@ -37,16 +37,16 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv)
{
KAboutData about("proptest", "KoProperty Test", version, description,
KAboutData::License_GPL, "(C) 2003 Cédric Pasteur", 0, 0, "cedric.pasteur@free.fr");
about.addAuthor( "Cédric Pasteur", 0, "cedric.pasteur@free.fr" );
KAboutData::License_GPL, "(C) 2005 Cedric Pasteur", 0, 0, "cedric.pasteur@free.fr");
about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions( options );
KApplication app;
test *mainWin = 0;
Test *mainWin = 0;
if (app.isSessionRestored())
{
RESTORE(test);
RESTORE(Test);
}
else
{
......@@ -55,7 +55,7 @@ int main(int argc, char **argv)
/// @todo do something with the command line args here
mainWin = new test();
mainWin = new Test();
app.setMainWidget( mainWin );
mainWin->show();
......
......@@ -39,8 +39,8 @@
using namespace KoProperty;
test::test()
: KMainWindow( 0, "test" )
Test::Test()
: KMainWindow(0,"koproperty_test")
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
const bool flat = args->isSet("flat");
......@@ -51,9 +51,9 @@ test::test()
f.setPixelSize(f.pixelSize()*2/3);
setFont(f);
// Simple
+ /* First, create the Set which will hold the properties. */
m_set = new Set(this, "test");
m_set->setReadOnly( readOnly );
m_set->setReadOnly(readOnly);
Q3CString group;
if (!flat)
group = "SimpleGroup";
......@@ -101,7 +101,7 @@ test::test()
edit->setFocus();
}
test::~test()
Test::~Test()
{
}
......
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
Copyright (C) 2004-2005 Cedric Pasteur <cedric.pasteur@free.fr>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _TEST_H_
#define _TEST_H_
#ifndef TEST_H
#define TEST_H
#ifdef HAVE_CONFIG_H
#include <config.h>
......@@ -28,27 +28,20 @@
#include "set.h"
/**
* @short Application Main Window
* @author Cédric Pasteur <cedric.pasteur@free.fr>
/*!
* @short KoProperty test appliation main window
* @author Cedric Pasteur <cedric.pasteur@free.fr>
* @version 0.1
*/
class test : public KMainWindow
class Test : public KMainWindow
{
Q_OBJECT
public:
/**
* Default Constructor
*/
test();
/**
* Default Destructor
*/
virtual ~test();
private:
Q_OBJECT
public:
Test();
virtual ~Test();
private:
KoProperty::Set *m_set;
};
#endif // _TEST_H_
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment