[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: KImageshop (Krayon) bugfixes attached
From: John Califf <jcaliff () compuzone ! net>
Date: 2000-10-02 17:13:11
[Download RAW message or body]
Attached is a diff for kimageshop made against current cvs. It's a
recursive diff of everything from koffice/kimageshop/ and includes all
my kimageshop changes.
After applying or patching using this attached diff kimageshop should
compile and run and should NOT crash very often with casual use for
testing and experimenting. Have fun! Of course many features are
incomplete but at least the app now runs.
To install kimageshop after doing a "make" from koffice/kimageshop first
delete the file ~/.kde/share/config/ksycoca. Then su if necessary and
make install. If you don't delete your ksycoca file the mimetypes for
kimageshop won't get registered and koffice won't be able to load the
part. Deleting ksycoca is harmless because it will automatically be
rebuilt next time you start kde.
Please excuse the many debugging messages but these were necessary for
me to find the problems and fix this app. They can be removed later.
Please test before doing a cvs update. It may not be possible to do a
cvs update right now with the freeze, but since kimageshop isn't
compiled by default anyway with the rest of KOffice this fix is at worst
harmless. Please let me know how it goes or if you have problems
patching, making and installing on your test box.
After this is patch applied I can start working on loading and saving of
native .kis image files as the next step in development of this KOffice
app.
John
["kimageshop.diff" (text/plain)]
? kimageshop_base.diff
? core/.history
? core/.bookmarks
Index: kimageshop.desktop
===================================================================
RCS file: /home/kde/koffice/kimageshop/kimageshop.desktop,v
retrieving revision 1.117
diff -u -3 -p -r1.117 kimageshop.desktop
--- kimageshop.desktop 2000/09/20 05:20:20 1.117
+++ kimageshop.desktop 2000/10/02 16:37:53
@@ -5,7 +5,7 @@ Name[is]=Myndvinnsla
Name[pt_BR]=Manipulador de Imagens
Exec=kimageshop
MapNotify=true
-X-KDE-Library=libkimageshoppart
+X-KDE-Library=libkimageshop
X-KDE-LibraryMajor=1
X-KDE-LibraryMinor=0
X-KDE-LibraryDependencies=
@@ -14,18 +14,18 @@ Comment[ca]=Aplicació de manipulació d
Comment[cs]=Program pro manipulaci s obrázky pro KOffice
Comment[da]=KOffice billedmanipulations program.
Comment[de]=KOffice-Programm für die Bildbearbeitung
-Comment[el]=Î*Ï?αÏ?μογή εÏ?εξεÏ?γαÏfίαÏ, εικÏ?ναÏ, Ï?οÏ? KOffice.
+Comment[el]=ÎÏαÏμογή εÏεξεÏγαÏÎ¯Î±Ï ÎµÎ¹ÎºÏÎ½Î±Ï ÏÎ¿Ï KOffice.
Comment[eo]=Bildmanipulilo de Oficejo
Comment[et]=KOffice'i pilditöötlus programm
Comment[fi]=KOffice kuvianmuokkausohjelma
Comment[fr]=Programe de Manipulation d'Images de KOffice
Comment[gl]=Aplicación de manipulación de imaxes do KOffice.
-Comment[he]=KOffice ×?ש ת×*× ×*×?ת×? ×?×*פ×?×~ ×?×*ש×?×?
+Comment[he]=KOffice ×ש ת×× ×××ª× ××פ×× ××ש××
Comment[hr]=KOffice program za crtanje
Comment[hu]=A KOffice képmanipuláló programja.
Comment[is]=kimageshop: Myndvinnsluforrit K-vöndulsins
Comment[it]=Applicazione di manipolazione immagini di KOffice
-Comment[mk]=Ð?пликаÑ?иÑ~а за манипÑfлаÑ?иÑ~а Ñ?о Ñ?лики за \
KOffice +Comment[mk]=ÐпликаÑиÑа за манипÑлаÑиÑа Ñо Ñлики за \
KOffice Comment[nl]=KOffice's beeldbewerkingsprogramma
Comment[no]=KOffices bildemanipuleringsprogram.
Comment[no_NY]=Biletebehandling for KDE
@@ -33,15 +33,15 @@ Comment[pl]=Program graficzny do KOffice
Comment[pt]=Uma aplicação de manipulação de imagens do KOffice
Comment[pt_BR]=Aplicação de manipulação de imagens do KOffice
Comment[ro]=Aplicaţie KOffice de prelucrat imagini
-Comment[ru]=ÐYÑ?огÑ?амма длÑ? манипÑfлÑ?Ñ?ии \
изобÑ?ажениÑ?ми +Comment[ru]=ÐÑогÑамма Ð´Ð»Ñ Ð¼Ð°Ð½Ð¸Ð¿ÑлÑÑии \
изобÑажениÑми Comment[sk]=Program pro manipulaci s obrázky pro KOffice
Comment[sl]=Program za obdelavo slik iz KOffice
Comment[sr]=KOffice program za manipulaciju slikama
Comment[sv]=Bildmanipuleringsprogram för KOffice.
-Comment[ta]=KOffice à®?à®°à¯?வ à¯^à®*யாளà¯?தலà®, \
பயனà®,பாà®Yà¯?
-Comment[tr]=KOffice resim iÅYleme uygulaması
-Comment[uk]=ÐYÑ?огÑ?ама Ñ?едагÑfваннÑ? зобÑ?аженÑ? KOffice
-Comment[zh_CN.GB2312]=KOffice å>¾åf?å¤?ç??ç¨<åº?.
+Comment[ta]=KOffice à®à®°à¯à®µ à¯à®à®¯à®¾à®³à¯à®¤à®²à® பயனà®à®ªà®¾à®à¯
+Comment[tr]=KOffice resim iÅleme uygulaması
+Comment[uk]=ÐÑогÑама ÑедагÑÐ²Ð°Ð½Ð½Ñ Ð·Ð¾Ð±ÑÐ°Ð¶ÐµÐ½Ñ KOffice
+Comment[zh_CN.GB2312]=KOffice å¾åå¤çç¨åº.
MimeType=application/x-kimageshop
Type=Application
Icon=kimageshop
Index: kimageshop.rc
===================================================================
RCS file: /home/kde/koffice/kimageshop/kimageshop.rc,v
retrieving revision 1.16
diff -u -3 -p -r1.16 kimageshop.rc
--- kimageshop.rc 2000/06/18 14:30:56 1.16
+++ kimageshop.rc 2000/10/02 16:37:54
@@ -1,9 +1,6 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd" ><kpartgui name="KImageShop" version="2">
<MenuBar>
<Menu name="Edit"><text>Edit</text>
- <Action name="undo"/>
- <Action name="redo"/>
- <Separator/>
<Action name="copy"/>
<Action name="cut"/>
<Action name="paste"/>
@@ -55,9 +52,6 @@
</Menu>
</MenuBar>
<ToolBar name="edit" position="top"><Text>Edit</Text>
- <Action name="undo"/>
- <Action name="redo"/>
- <Separator/>
<Action name="copy"/>
<Action name="cut"/>
<Action name="paste"/>
Index: core/kis_channel.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_channel.cc,v
retrieving revision 1.6
diff -u -3 -p -r1.6 kis_channel.cc
--- core/kis_channel.cc 2000/02/24 20:20:12 1.6
+++ core/kis_channel.cc 2000/10/02 16:37:56
@@ -203,7 +203,7 @@ void KisChannel::allocateRect(QRect newR
}
}
-
+#if 0
bool KisChannel::writeToStore( ostorestream *out)
{
if (!out) return false;
@@ -229,3 +229,5 @@ bool KisChannel::loadFromStore(istorest
return true;
}
+#endif
+
Index: core/kis_channel.h
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_channel.h,v
retrieving revision 1.6
diff -u -3 -p -r1.6 kis_channel.h
--- core/kis_channel.h 2000/09/19 22:14:15 1.6
+++ core/kis_channel.h 2000/10/02 16:37:56
@@ -24,7 +24,7 @@
#include <qrect.h>
#include <qpoint.h>
-
+#include <ostream.h> //jwc
#include "kis_global.h"
class KisChannel
@@ -59,8 +59,8 @@ class KisChannel
uint lastTileOffsetX();
uint lastTileOffsetY();
- bool writeToStore(ostorestream *out);
- bool loadFromStore(istorestream *in);
+ //bool writeToStore(ostorestream *out); //jwc
+ //bool loadFromStore(istorestream *in); //jwc
protected:
Index: core/kis_doc.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_doc.cc,v
retrieving revision 1.30
diff -u -3 -p -r1.30 kis_doc.cc
--- core/kis_doc.cc 2000/06/20 06:40:24 1.30
+++ core/kis_doc.cc 2000/10/02 16:37:56
@@ -37,8 +37,10 @@
#include <kglobal.h>
#include <kmimetype.h>
+#include <koTemplateChooseDia.h> //jwc
+#include <koQueryTrader.h> //jwc
#include <koStore.h>
-#include <koStoreStream.h>
+//#include <koStoreStream.h>
#include "kis_doc.h"
#include "kis_view.h"
@@ -50,8 +52,8 @@
#define KIS_DEBUG(AREA, CMD)
KisDoc::KisDoc( QWidget *parentWidget, const char *widgetName, QObject* parent, \
const char* name, bool singleViewMode )
- : KoDocument( parentWidget, parent, parent, name, singleViewMode )
- , m_commands()
+ : KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
+ //, m_commands() //jwc
{
setInstance( KisFactory::global() );
m_pCurrent = 0L;
@@ -74,6 +76,44 @@ bool KisDoc::initDoc()
setCurrentImage(img);
emit imageListUpdated();
+
+#if 0
+ QString templ;
+ KoTemplateChooseDia::ReturnType ret;
+
+ ret = KoTemplateChooseDia::choose (KisFactory::global(),
+ templ,
+ "application/x-kimageshop", "*.kis",
+ i18n("KImageShop"),
+ KoTemplateChooseDia::Everything,
+ "kimageshop_template");
+
+ if (ret == KoTemplateChooseDia::Template)
+ {
+ QFileInfo fileInfo (templ);
+ QString fileName (fileInfo.dirPath (true) + "/" +
+ fileInfo.baseName () + ".kis");
+ // load it
+ bool ok = loadNativeFormat (fileName);
+ setModified (true);
+ return ok;
+ }
+ else if (ret == KoTemplateChooseDia::File)
+ {
+ // load it
+ KURL url;
+ url.setPath (templ);
+ bool ok = openURL (url);
+ return ok;
+ }
+ else if ( ret == KoTemplateChooseDia::Empty )
+ {
+ return true;
+ }
+ else
+ return false;
+#endif
+
return true;
}
@@ -168,6 +208,7 @@ bool KisDoc::completeSaving( KoStore* st
if ( !store ) return false;
if (!m_pCurrent) return false;
+#if 0 //jwc
QList<KisLayer> layers = m_pCurrent->layerList();
for (KisLayer *lay = layers.first(); lay != 0; lay = layers.next())
@@ -186,6 +227,7 @@ bool KisDoc::completeSaving( KoStore* st
}
}
}
+#endif //jwc
return true;
}
@@ -206,15 +248,17 @@ bool KisDoc::load( istream& in, KoStore*
buffer.close();
buffer.open( IO_ReadOnly );
- QDomDocument doc( &buffer );
+ QByteArray bufferbytearray = buffer.buffer(); //jwc
+ char *bufferdata = bufferbytearray.data(); //jwc
+ QDomDocument doc( bufferdata ); //jwc
- bool b = loadXML( doc, store );
+ bool b = loadXML( NULL, doc );
buffer.close();
return b;
}
-bool KisDoc::loadXML( const QDomDocument& doc , KoStore* )
+bool KisDoc::loadXML( QIODevice *, const QDomDocument& doc )
{
if ( doc.doctype().name() != "image" )
return false;
@@ -261,7 +305,8 @@ bool KisDoc::loadXML( const QDomDocument
return false;
}
- KisImage *img = newImage(name, w, h, colorMode, bd);
+ // KisImage *img = newImage(name, w, h, colorMode, bd); //jwc
+ KisImage *img = newImage("Untitled", w, h, colorMode, bd); //jwc
if (!img) return false;
img->setAuthor( image.attribute( "author" ));
@@ -303,18 +348,20 @@ bool KisDoc::loadXML( const QDomDocument
img->addLayer(QRect(0, 0, w, h), KisColor::white(), false, "background");
img->markDirty(QRect(0, 0, w, h));
setCurrentImage(img);
-
+ kdDebug() << "KisDoc::loadXML" << endl;
return true;
}
bool KisDoc::completeLoading( KoStore* )
{
// TODO: Load binary image data.
+ kdDebug() << "KisDoc::completeLoading" << endl;
return true;
}
void KisDoc::setCurrentImage(KisImage *img)
{
+ kdDebug() << "KisDoc::setCurrentImage" << endl;
if (m_pCurrent)
{
// disconnect old current image
@@ -337,10 +384,12 @@ void KisDoc::setCurrentImage(KisImage *i
emit imageListUpdated();
emit layersUpdated();
emit docUpdated();
+ kdDebug() << "KisDoc::setCurrentImage end of func" << endl;
}
void KisDoc::setCurrentImage(const QString& _name)
{
+ kdDebug() << "KisDoc::setCurrentImage" << endl;
KisImage *img = m_Images.first();
while (img)
@@ -352,6 +401,7 @@ void KisDoc::setCurrentImage(const QStri
}
img = m_Images.next();
}
+ kdDebug() << "KisDoc::setCurrentImage end of func" << endl;
}
QStringList KisDoc::images()
@@ -400,6 +450,7 @@ KisDoc::~KisDoc()
KisImage* KisDoc::newImage(const QString& n, int width, int height, cMode cm , uchar \
bitDepth ) {
+ kdDebug() << "KisDoc::newImage" << endl;
KisImage *img = new KisImage( n, width, height, cm, bitDepth );
m_Images.append(img);
@@ -434,6 +485,7 @@ void KisDoc::slotRemoveImage( const QStr
void KisDoc::slotNewImage()
{
+ kdDebug() << "KisDoc::slotNewImage" << endl;
if (!m_pNewDialog)
m_pNewDialog = new NewDialog();
m_pNewDialog->show();
@@ -475,11 +527,12 @@ QCString KisDoc::mimeType() const
KoView* KisDoc::createViewInstance( QWidget* parent, const char* name )
{
KisView* view = new KisView( this, parent, name );
-
+#if 0
QObject::connect( &m_commands, SIGNAL( undoRedoChanged( QString, QString ) ),
view, SLOT( slotUndoRedoChanged( QString, QString ) ) );
QObject::connect( &m_commands, SIGNAL( undoRedoChanged( QStringList, QStringList ) \
),
view, SLOT( slotUndoRedoChanged( QStringList, QStringList ) ) );
+#endif
return view;
}
Index: core/kis_doc.h
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_doc.h,v
retrieving revision 1.19
diff -u -3 -p -r1.19 kis_doc.h
--- core/kis_doc.h 2000/06/20 06:40:24 1.19
+++ core/kis_doc.h 2000/10/02 16:37:56
@@ -26,7 +26,7 @@
#include <qstringlist.h>
#include <koDocument.h>
-#include <koUndo.h>
+//#include <koUndo.h> //jwc
#include "kis_image.h"
#include "kis_global.h"
@@ -59,8 +59,8 @@ public:
virtual bool save( ostream&, const char *_format );
virtual bool load( istream& in, KoStore* _store );
- virtual bool loadXML( const QDomDocument& doc, KoStore* store );
-
+ virtual bool loadXML( QIODevice *, const QDomDocument & doc ); // jwc
+ //virtual bool loadXML( const QDomDocument& doc, KoStore* store );
virtual bool completeLoading( KoStore* store );
virtual bool completeSaving( KoStore* );
@@ -69,7 +69,7 @@ public:
/*
* KOffice undo/redo.
*/
- KoCommandHistory* commandHistory() { return &m_commands; };
+ //KoCommandHistory* commandHistory() { return &m_commands; };
/*
* Use QPainter p to paint a rectangular are of the current image.
@@ -128,7 +128,7 @@ signals:
protected:
virtual KoView* createViewInstance( QWidget* parent, const char* name );
- KoCommandHistory m_commands;
+ //KoCommandHistory m_commands;
QList <KisImage> m_Images;
KisImage *m_pCurrent;
NewDialog *m_pNewDialog;
Index: core/kis_factory.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_factory.cc,v
retrieving revision 1.15
diff -u -3 -p -r1.15 kis_factory.cc
--- core/kis_factory.cc 2000/06/12 19:52:55 1.15
+++ core/kis_factory.cc 2000/10/02 16:37:57
@@ -61,7 +61,11 @@ KisFactory::KisFactory( QObject* parent,
s_pserver = new KisPluginServer;
s_rserver = new KisResourceServer;
- KisLog::setLogFile(locateLocal("kis", "kimageshop.log", s_global));
+ // jwc temporarily commented out - setLogFile() expect char * for not QString
+ //KisLog::setLogFile(locateLocal("kis", "kimageshop.log", s_global));
+ QString FileName = locateLocal("kis", "kimageshop.log", s_global);
+ char *latinFileName = FileName.latin1();
+ KisLog::setLogFile(latinFileName);
log() << "Starting KImageShop" << endl;
}
@@ -77,8 +81,9 @@ KParts::Part* KisFactory::createPart( QW
{
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
+ // jwc
KisDoc *doc = new KisDoc( parentWidget, widgetName, parent, name, \
!bWantKoDocument );
-
+ //KoDocument *doc = new KoDocument( parentWidget, widgetName, parent, name, \
!bWantKoDocument ); if ( !bWantKoDocument )
doc->setReadWrite( false );
Index: core/kis_shell.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_shell.cc,v
retrieving revision 1.21
diff -u -3 -p -r1.21 kis_shell.cc
--- core/kis_shell.cc 2000/06/20 06:40:24 1.21
+++ core/kis_shell.cc 2000/10/02 16:37:57
@@ -39,7 +39,7 @@ KisShell::KisShell( const char* name )
m_pStatusBar->insertItem( i18n( "a little test for the statusbar" ), \
ID_STATUSBAR_INFOTEXT );
- setStatusBar( m_pStatusBar );
+ // setStatusBar( m_pStatusBar ); //jwc
}
KisShell::~KisShell()
Index: core/kis_tool.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_tool.cc,v
retrieving revision 1.5
diff -u -3 -p -r1.5 kis_tool.cc
--- core/kis_tool.cc 2000/09/19 22:14:15 1.5
+++ core/kis_tool.cc 2000/10/02 16:37:57
@@ -39,7 +39,8 @@ QString KisTool::toolName()
void KisTool::optionsDialog()
{
- KMessageBox::sorry(0L, i18n("No Options available for this tool."));
+ //KMessageBox::sorry(0L, i18n("No Options available for this tool."));
+ KMessageBox::sorry(NULL, "No Options available for this tool.", "", FALSE);
}
void KisTool::setCursor( const QCursor& c )
Index: core/kis_view.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/core/kis_view.cc,v
retrieving revision 1.40
diff -u -3 -p -r1.40 kis_view.cc
--- core/kis_view.cc 2000/06/07 13:50:43 1.40
+++ core/kis_view.cc 2000/10/02 16:37:59
@@ -83,15 +83,28 @@ KisView::KisView( KisDoc* doc, QWidget*
m_fg = KisColor::black();
m_bg = KisColor::white();
-
+
+ m_pBrush = new KisBrush("brush_10"); //jwc
+
setupCanvas();
+ kdDebug() << "End of setupCanvas " << endl; //jwc
+ setupSideBar();
+ kdDebug() << "End of setupSideBar " << endl; //jwc
setupScrollBars();
+ kdDebug() << "End of setupScrollBars " << endl; //jwc
setupRulers();
+ kdDebug() << "End of setupRulers " << endl; //jwc
setupTabBar();
+ kdDebug() << "End of setupTabBar " << endl; //jwc
setupActions();
+ kdDebug() << "End of setupActions " << endl; //jwc
setupDialogs();
- setupSideBar();
+ kdDebug() << "End of setupDialogs " << endl; //jwc
+// setupSideBar();
+// kdDebug() << "End of setupSideBar " << endl; //jwc
setupTools();
+
+ kdDebug() << "End of KisView constructor " << endl; //jwc
}
void KisView::setupCanvas()
@@ -124,7 +137,7 @@ void KisView::setupSideBar()
m_pBrushChooser->setCaption("Brushes");
m_pSideBar->plug(m_pBrushChooser);
-
+
// layer view
m_pLayerView = new KisLayerView(m_pDoc, this);
m_pLayerView->setCaption("Layers");
@@ -216,7 +229,7 @@ void KisView::setupTabBar()
void KisView::setupTools()
{
- // select tool
+ // select tool
m_pSelectTool = new SelectTool( m_pDoc, m_pCanvas );
// move tool
@@ -225,7 +238,7 @@ void KisView::setupTools()
// brush tool
m_pBrushTool = new BrushTool(m_pDoc, this, m_pBrush);
- // airbrush tool
+ // airbrush tool //nonfunctional
m_pAirBrushTool = new AirBrushTool(m_pDoc, this, m_pBrush);
// pen tool
@@ -244,6 +257,7 @@ void KisView::setupTools()
m_pGradientTool = new GradientTool( m_pDoc, this, m_pCanvas, m_pGradient );
m_tool_brush->setChecked( true );
+
activateTool(m_pBrushTool);
}
@@ -269,9 +283,10 @@ void KisView::setupDialogs()
void KisView::setupActions()
{
// edit actions
-
- m_undo = KStdAction::undo( this, SLOT( undo() ), actionCollection(), "undo");
- m_redo = KStdAction::redo( this, SLOT( redo() ), actionCollection(), "redo");
+ // jwc no undo redo yet
+
+ //m_undo = KStdAction::undo( this, SLOT( undo() ), actionCollection(), "undo");
+ //m_redo = KStdAction::redo( this, SLOT( redo() ), actionCollection(), "redo");
m_cut = KStdAction::cut( this, SLOT( cut() ), actionCollection(), "cut");
m_copy = KStdAction::copy( this, SLOT( copy() ), actionCollection(), "copy");
m_paste = KStdAction::paste( this, SLOT( paste() ), actionCollection(), "paste");
@@ -279,133 +294,147 @@ void KisView::setupActions()
// view actions
new KAction( i18n("Zoom &in"), "viewmag+", 0, this,
- SLOT( zoom_in() ), actionCollection(), "zoom_in" );
+ SLOT( zoom_in() ),
+ actionCollection(), "zoom_in" );
new KAction( i18n("Zoom &out"), "viewmag-", 0, this,
- SLOT( zoom_out() ), actionCollection(), "zoom_out" );
+ SLOT( zoom_out() ),
+ actionCollection(), "zoom_out" );
m_dialog_gradient = new KToggleAction( i18n("&Gradient Dialog"),
- "gradient_dialog", 0, this,
- SLOT( dialog_gradient() ),actionCollection(), "dialog_gradient");
- m_dialog_gradienteditor = new KToggleAction( i18n("Gradient &Editor"),
- "gradienteditor_dialog",
- 0, this, SLOT( dialog_gradienteditor() ),
- actionCollection(), "dialog_gradienteditor");
+ "gradient_dialog", 0, this,
+ SLOT( dialog_gradient() ),
+ actionCollection(), "dialog_gradient");
+
+ m_dialog_gradienteditor = new KToggleAction( i18n("Gradient &Editor"),
+ "gradienteditor_dialog", 0, this,
+ SLOT( dialog_gradienteditor() ),
+ actionCollection(), "dialog_gradienteditor");
// tool actions
- m_tool_select_rect = new KToggleAction( i18n( "&Rectangular select" ),
- "rectangular", 0, this,
- SLOT( tool_select_rect() ), actionCollection(), "tool_select_rect" );
+ m_tool_select_rect = new KToggleAction( i18n( "&Rectangular select" ), \
"rectangular", 0, this, + SLOT( tool_select_rect() ), actionCollection(), \
"tool_select_rect" ); m_tool_select_rect->setExclusiveGroup( "tools" );
m_tool_select_polygon = new KToggleAction( i18n( "&Polygon select" ), \
"rectangular" , 0, this,
- SLOT( tool_select_rect() ), actionCollection(), \
"tool_select_polygon" ); + SLOT( tool_select_rect() ), actionCollection(), \
"tool_select_polygon" ); m_tool_select_polygon->setExclusiveGroup( "tools" );
m_tool_move = new KToggleAction( i18n("&Move tool"), "move", 0, this,
- SLOT( tool_move() ),actionCollection(), "tool_move");
+ SLOT( tool_move() ),actionCollection(), "tool_move");
m_tool_move->setExclusiveGroup( "tools" );
m_tool_zoom = new KToggleAction( i18n("&Zoom tool"), "zoom", 0, this,
- SLOT( tool_zoom() ),actionCollection(), "tool_zoom");
+ SLOT( tool_zoom() ),actionCollection(), "tool_zoom");
m_tool_zoom->setExclusiveGroup( "tools" );
m_tool_draw = new KToggleAction( i18n("&Draw simple figure"), "pencil", 0, this,
- SLOT( tool_pen() ),actionCollection(), "tool_draw_figure");
+ SLOT( tool_pen() ),actionCollection(), "tool_draw_figure");
m_tool_draw->setExclusiveGroup( "tools" );
m_tool_pen = new KToggleAction( i18n("&Pen tool"), "pencil", 0, this,
- SLOT( tool_pen() ),actionCollection(), "tool_pen");
+ SLOT( tool_pen() ),actionCollection(), "tool_pen");
m_tool_pen->setExclusiveGroup( "tools" );
m_tool_brush = new KToggleAction( i18n("&Brush tool"), "paintbrush", 0, this,
- SLOT( tool_brush() ),actionCollection(), "tool_brush");
+ SLOT( tool_brush() ),actionCollection(), "tool_brush");
m_tool_brush->setExclusiveGroup( "tools" );
m_tool_airbrush = new KToggleAction( i18n("&Airbrush tool"), "airbrush", 0, this,
- SLOT( tool_airbrush() ),actionCollection(), "tool_airbrush");
+ SLOT( tool_airbrush() ),actionCollection(), "tool_airbrush");
m_tool_airbrush->setExclusiveGroup( "tools" );
m_tool_airbrush->setEnabled( false );
m_tool_fill = new KToggleAction( i18n("&Filler tool"), "airbrush", 0, this,
- SLOT( tool_airbrush() ),actionCollection(), "tool_fill");
+ SLOT( tool_airbrush() ),actionCollection(), "tool_fill");
m_tool_fill->setExclusiveGroup( "tools" );
m_tool_eraser = new KToggleAction( i18n("&Eraser tool"), "eraser", 0, this,
- SLOT( tool_eraser() ),actionCollection(), "tool_eraser");
+ SLOT( tool_eraser() ),actionCollection(), "tool_eraser");
m_tool_eraser->setExclusiveGroup( "tools" );
m_tool_colorpicker = new KToggleAction( i18n("&Color picker"), "colorpicker", 0, \
this,
- SLOT( tool_colorpicker() ),actionCollection(), "tool_colorpicker");
+ SLOT( tool_colorpicker() ),actionCollection(), "tool_colorpicker");
+
m_tool_colorpicker->setExclusiveGroup( "tools" );
m_tool_gradient = new KToggleAction( i18n("&Gradient tool"), "gradient", 0, this,
- SLOT( tool_gradient() ),actionCollection(), "tool_gradient");
+ SLOT( tool_gradient() ),actionCollection(), "tool_gradient");
m_tool_gradient->setExclusiveGroup( "tools" );
// layer actions
(void) new KAction( i18n("&Insert layer..."), 0, this,
- SLOT( insert_layer() ), actionCollection(), "insert_layer" );
+ SLOT( insert_layer() ), actionCollection(), "insert_layer" );
(void) new KAction( i18n("I&nsert image as layer..."), 0, this,
- SLOT( insert_layer_image() ), actionCollection(), \
"insert_layer_image" ); + SLOT( insert_layer_image() ), actionCollection(), \
"insert_layer_image" );
(void) new KAction( i18n("Rotate &180"), 0, this,
- SLOT( layer_rotate180() ),actionCollection(), "layer_rotate180");
+ SLOT( layer_rotate180() ),actionCollection(), "layer_rotate180");
(void) new KAction( i18n("Rotate &270"), 0, this,
- SLOT( layer_rotateleft90() ),actionCollection(), "layer_rotateleft90");
+ SLOT( layer_rotateleft90() ),actionCollection(), "layer_rotateleft90");
(void) new KAction( i18n("Rotate &90"), 0, this,
- SLOT( layer_rotateright90() ),actionCollection(), "layer_rotateright90");
+ SLOT( layer_rotateright90() ),actionCollection(), "layer_rotateright90");
(void) new KAction( i18n("Mirror &X"), 0, this,
- SLOT( layer_mirrorX() ),actionCollection(), "layer_mirrorX");
+ SLOT( layer_mirrorX() ),actionCollection(), "layer_mirrorX");
(void) new KAction( i18n("Mirror &Y"), 0, this,
- SLOT( layer_mirrorY() ),actionCollection(), "layer_mirrorY");
+ SLOT( layer_mirrorY() ),actionCollection(), "layer_mirrorY");
// image actions
(void) new KAction( i18n("Merge &all layers"), 0, this,
- SLOT( merge_all_layers() ),actionCollection(), "merge_all_layers");
+ SLOT( merge_all_layers() ),actionCollection(), "merge_all_layers");
(void) new KAction( i18n("Merge &visible layers"), 0, this,
- SLOT( merge_visible_layers() ),actionCollection(), "merge_visible_layers");
+ SLOT( merge_visible_layers() ),actionCollection(), "merge_visible_layers");
(void) new KAction( i18n("Merge &linked layers"), 0, this,
- SLOT( merge_linked_layers() ),actionCollection(), "merge_linked_layers");
+ SLOT( merge_linked_layers() ),actionCollection(), "merge_linked_layers");
// setting actions
- (void) KStdAction::showMenubar( this, SLOT( showMenubar() ), actionCollection(), \
"show_menubar" ); + (void) KStdAction::showMenubar( this, SLOT( showMenubar() ),
+ actionCollection(), "show_menubar" );
- (void) KStdAction::showToolbar( this, SLOT( showToolbar() ), actionCollection(), \
"show_toolbar" ); + (void) KStdAction::showToolbar( this, SLOT( showToolbar() ),
+ actionCollection(), "show_toolbar" );
- (void) KStdAction::showStatusbar( this, SLOT( showStatusbar() ), \
actionCollection(), "show_statusbar" ); + (void) KStdAction::showStatusbar( this, \
SLOT( showStatusbar() ), + actionCollection(), "show_statusbar" );
- (void) new KRadioAction( i18n("Show &Sidebar"), 0, this,
- SLOT( showSidebar() ), actionCollection(), "show_sidebar" \
); + (void) new KRadioAction( i18n("Show &Sidebar"), 0, this, SLOT( showSidebar() ), \
+ actionCollection(), "show_sidebar" );
- (void) KStdAction::saveOptions( this, SLOT( saveOptions() ), actionCollection(), \
"save_options" ); + (void) KStdAction::saveOptions( this, SLOT( saveOptions() ),
+ actionCollection(), "save_options" );
- (void) KStdAction::preferences( this, SLOT( preferences() ), actionCollection(), \
"configure"); + (void) KStdAction::preferences( this, SLOT( preferences() ),
+ actionCollection(), "configure");
// help actions
m_helpMenu = new KHelpMenu( this );
- (void) KStdAction::helpContents( m_helpMenu, SLOT( appHelpActivated() ), \
actionCollection(), "help_contents" );
- (void) KStdAction::whatsThis( m_helpMenu, SLOT( contextHelpActivated() ), \
actionCollection(), "help_whatsthis" );
- (void) KStdAction::reportBug( m_helpMenu, SLOT( reportBug() ), actionCollection(), \
"help_bugreport" );
- (void) KStdAction::aboutApp( m_helpMenu, SLOT( aboutApplication() ), \
actionCollection(), "help_about" ); + (void) KStdAction::helpContents( m_helpMenu, \
SLOT( appHelpActivated() ), + actionCollection(), "help_contents" );
+ (void) KStdAction::whatsThis( m_helpMenu, SLOT( contextHelpActivated() ),
+ actionCollection(), "help_whatsthis" );
+ (void) KStdAction::reportBug( m_helpMenu, SLOT( reportBug() ),
+ actionCollection(), "help_bugreport" );
+ (void) KStdAction::aboutApp( m_helpMenu, SLOT( aboutApplication() ),
+ actionCollection(), "help_about" );
// disable at startup unused actions
-
- m_undo->setEnabled( false );
- m_redo->setEnabled( false );
+ // jwc no undo redo yet
+ //m_undo->setEnabled( false );
+ //m_redo->setEnabled( false );
+
m_cut->setEnabled( false );
m_copy->setEnabled( false );
m_paste->setEnabled( false );
@@ -413,12 +442,14 @@ void KisView::setupActions()
void KisView::slotTabSelected(const QString& name)
{
- m_pDoc->setCurrentImage(name);
- resizeEvent(0L);
+ m_pDoc->setCurrentImage(name);
+ resizeEvent(0L);
}
void KisView::resizeEvent(QResizeEvent*)
{
+ kdDebug() << "KisView::resizeEvent " << endl; //jwc
+
int sideW = m_pSideBar->width();
// sidebar geometry
@@ -426,6 +457,7 @@ void KisView::resizeEvent(QResizeEvent*)
// ruler geometry
m_pHRuler->setGeometry(20, 0, width()-20-sideW, 20);
+ m_pHRuler->setGeometry(20, 0, width()-20, 20);
m_pVRuler->setGeometry(0, 20, 20, height()-36);
// tabbar control buttons
@@ -437,6 +469,7 @@ void KisView::resizeEvent(QResizeEvent*)
// KisView heigth/width - ruler heigth/width
int drawH = height() - 20 - 16;
int drawW = width() - 20 - sideW;
+ //int drawW = width() - 20 ;
int docH = docHeight();
int docW = docWidth();
@@ -496,6 +529,8 @@ void KisView::resizeEvent(QResizeEvent*)
m_pHRuler->setOffset(m_pHorz->value());
else
m_pHRuler->setOffset(-xPaintOffset());
+
+ kdDebug() << "KisView::resizeEvent leaving" << endl; //jwc
}
void KisView::updateReadWrite( bool /*readwrite*/ )
@@ -519,15 +554,16 @@ void KisView::scrollV(int)
void KisView::slotDocUpdated()
{
- //kdDebug() << "KisView::slotDocUpdated" << endl;
+ kdDebug() << "KisView::slotDocUpdated" << endl; //jwc
m_pCanvas->repaint();
+
}
void KisView::slotDocUpdated(const QRect& rect)
{
+ kdDebug() << "KisView::slotDocUpdated " << endl; //jwc
KisImage* img = m_pDoc->current();
- if (!img)
- return;
+ if (!img) return;
QRect r = rect;
@@ -546,6 +582,8 @@ void KisView::slotDocUpdated(const QRect
// let the document draw the image
koDocument()->paintEverything( p, r, FALSE, this );
p.end();
+
+ kdDebug() << "KisView::slotDocUpdated leaving" << endl; //jwc
}
void KisView::canvasGotMousePressEvent( QMouseEvent *e )
@@ -582,14 +620,18 @@ void KisView::canvasGotMouseReleaseEvent
void KisView::canvasGotPaintEvent( QPaintEvent*e )
{
+
+ kdDebug() << "KisView::canvasGotPaintEvent" << endl; //jwc
KisImage* img = m_pDoc->current();
if (!img)
{
+
QPainter p (m_pCanvas);
p.eraseRect(e->rect());
+ kdDebug() << "KisView::canvasGotPaintEvent - no img" << endl; //jwc \
return;
}
-
+ kdDebug() << "KisView::canvasGotPaintEvent - is an img" << endl; //jwc
QPainter p;
QRect ur = e->rect();
p.begin( m_pCanvas );
@@ -624,6 +666,7 @@ void KisView::canvasGotPaintEvent( QPain
koDocument()->paintEverything( p, ur, FALSE, this );
p.end();
+ kdDebug() << "KisView::canvasGotPaintEvent - end of func" << endl; //jwc \
}
void KisView::activateTool(KisTool* t)
@@ -696,8 +739,7 @@ void KisView::tool_colorpicker()
void KisView::tool_gradient()
{
- debug( "Gradient Tool activated" );
-
+ kdDebug() << "Gradient Tool activated" << endl;
activateTool( m_pGradientTool );
}
@@ -709,14 +751,14 @@ void KisView::undo()
{
kdDebug() << "UNDO called" << endl;
- m_pDoc->commandHistory()->undo();
+ // m_pDoc->commandHistory()->undo();
}
void KisView::redo()
{
kdDebug() << "REDO called" << endl;
- m_pDoc->commandHistory()->redo();
+ // m_pDoc->commandHistory()->redo();
}
void KisView::copy()
@@ -740,10 +782,8 @@ void KisView::paste()
void KisView::zoom( int _x, int _y, float zf )
{
- debug( "KisView::zoom" );
-
- debug( "zoom factor : %f", zf );
-
+ kdDebug() << "KisView::zoom " << "zoom factor: " << zf << endl; //jwc
+
if (zf == 0) zf = 1;
setZoomFactor( zf );
@@ -761,8 +801,7 @@ void KisView::zoom( int _x, int _y, floa
void KisView::zoom_in( int x, int y )
{
- debug( "KisView::zoom_in" );
-
+ kdDebug() << "KisView::zoom_in" << endl; //jwc
float zf = zoomFactor();
zf *= 2;
@@ -772,8 +811,8 @@ void KisView::zoom_in( int x, int y )
void KisView::zoom_out( int x, int y )
{
- debug( "KisView::zoom_out" );
-
+ kdDebug() << "KisView::zoom_out " << endl; //jwc
+
float zf = zoomFactor();
zf /= 2;
@@ -828,12 +867,12 @@ void KisView::updateToolbarButtons()
void KisView::insert_layer()
{
- debug("KisView::insert_layer");
+ kdDebug() << "KisView::insert_layer " << endl; //jwc
}
void KisView::insert_layer_image()
{
- debug("KisView::insert_layer_image");
+ kdDebug() << "KisView::insert_layer_image" << endl; //jwc
KURL url = KFileDialog::getOpenURL( \
getenv("HOME"),KisUtil::readFilters(),0,i18n("Image file for layer") );
@@ -975,6 +1014,8 @@ void KisView::setZoomFactor( float zf )
void KisView::slotSetBrush(const KisBrush* b)
{
+ kdDebug() << "KisView::slotSetBrush " << endl; //jwc
+
m_pBrush = b;
if (m_pBrushTool)
m_pBrushTool->setBrush(b);
@@ -1002,14 +1043,15 @@ void KisView::slotUndoRedoChanged( QStri
{
//####### FIXME
- m_undo->setEnabled( !undo.isEmpty() );
- m_redo->setEnabled( !redo.isEmpty() );
+ // m_undo->setEnabled( !undo.isEmpty() );
+ // m_redo->setEnabled( !redo.isEmpty() );
}
void KisView::slotUndoRedoChanged( QStringList undo, QStringList redo )
{
//####### FIXME
+#if 0 //jwc
if( undo.count() )
{
// enable undo action
@@ -1031,6 +1073,7 @@ void KisView::slotUndoRedoChanged( QStri
// disable redo action
m_redo->setEnabled( false );
}
+#endif
}
#include "kis_view.moc"
Index: tools/kis_tool_move.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/tools/kis_tool_move.cc,v
retrieving revision 1.9
diff -u -3 -p -r1.9 kis_tool_move.cc
--- tools/kis_tool_move.cc 2000/02/25 10:31:22 1.9
+++ tools/kis_tool_move.cc 2000/10/02 16:38:00
@@ -137,7 +137,7 @@ void MoveTool::mouseRelease(QMouseEvent
MoveCommand *moveCommand = new MoveCommand( m_pDoc,
img->getCurrentLayerIndex(), m_layerStart, m_layerPosition );
- m_pDoc->commandHistory()->addCommand( moveCommand );
+ // m_pDoc->commandHistory()->addCommand( moveCommand ); // jwc
}
m_dragging = false;
Index: ui/kfloatingdialog.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/ui/kfloatingdialog.cc,v
retrieving revision 1.8
diff -u -3 -p -r1.8 kfloatingdialog.cc
--- ui/kfloatingdialog.cc 2000/06/07 14:15:48 1.8
+++ ui/kfloatingdialog.cc 2000/10/02 16:38:01
@@ -29,7 +29,7 @@
#include <kdebug.h>
#include <kconfig.h>
#include <kiconloader.h>
-#include <kwm.h>
+//#include <kwm.h> // jwc
#include <kapp.h>
#include "kfloatingdialog.h"
@@ -211,7 +211,7 @@ void KFloatingDialog::setDocked(bool val
{
m_dockedPos = pos();
reparent(0, /*WStyle_Customize | WStyle_NoBorder*/0, mapToGlobal(QPoint(0,0)), \
true);
- KWM::setDecoration(winId(), KWM::noDecoration);
+ // KWM::setDecoration(winId(), KWM::noDecoration); // jwc
setActiveWindow();
}
}
@@ -413,7 +413,7 @@ void KFloatingDialog::mouseMoveEvent(QMo
else
{
QPoint newPos = (QCursor::pos() - m_pos);
- KWM::move(winId(), newPos);
+ // KWM::move(winId(), newPos);
}
}
else if (m_resizing)
@@ -444,8 +444,8 @@ void KFloatingDialog::mouseMoveEvent(QMo
if (m_pParent && m_docked)
resize(newSize.x(), newSize.y());
- else
- KWM::setGeometry(winId(), QRect(geometry().left(), geometry().top(), newSize.x(), \
newSize.y())); + //else // jwc
+ //KWM::setGeometry(winId(), QRect(geometry().left(), geometry().top(), \
newSize.x(), newSize.y())); m_oldSize = QPoint(width(), height());
qDebug("resize to w %d h %d", newSize.x(), newSize.y());
}
Index: ui/kis_dlg_preferences.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/ui/kis_dlg_preferences.cc,v
retrieving revision 1.5
diff -u -3 -p -r1.5 kis_dlg_preferences.cc
--- ui/kis_dlg_preferences.cc 2000/03/15 20:27:32 1.5
+++ ui/kis_dlg_preferences.cc 2000/10/02 16:38:02
@@ -81,6 +81,7 @@ DirectoriesTab::DirectoriesTab( QWidget
grid->setRowStretch( 4, 1 );
}
+#if 0
UndoRedoTab::UndoRedoTab( QWidget *_parent, const char *_name )
: QWidget( _parent, _name )
{
@@ -97,6 +98,7 @@ UndoRedoTab::UndoRedoTab( QWidget *_pare
grid->setRowStretch( 2, 1 );
}
+#endif
PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name )
: KDialogBase( IconList, i18n("Preferences"), Ok | Cancel | Help | Default | \
Apply, Ok, parent, name, true, true ) @@ -109,8 +111,8 @@ \
PreferencesDialog::PreferencesDialog( QW vbox = addVBoxPage( i18n( "Directories") );
m_directories = new DirectoriesTab( vbox );
- vbox = addVBoxPage( i18n( "Undo/redo") );
- m_undoRedo = new UndoRedoTab( vbox );
+ //vbox = addVBoxPage( i18n( "Undo/redo") );
+ //m_undoRedo = new UndoRedoTab( vbox );
}
PreferencesDialog::~PreferencesDialog()
Index: ui/kis_dlg_preferences.h
===================================================================
RCS file: /home/kde/koffice/kimageshop/ui/kis_dlg_preferences.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 kis_dlg_preferences.h
--- ui/kis_dlg_preferences.h 2000/02/17 10:14:44 1.2
+++ ui/kis_dlg_preferences.h 2000/10/02 16:38:02
@@ -62,6 +62,7 @@ private:
QLineEdit *m_pLineEdit;
};
+/*
class UndoRedoTab : public QWidget
{
Q_OBJECT
@@ -70,6 +71,7 @@ public:
UndoRedoTab( QWidget *_parent = 0, const char *_name = 0 );
};
+*/
/**
* Preferences dialog of KImageShop
@@ -91,7 +93,7 @@ private:
GeneralTab *m_general;
DirectoriesTab *m_directories;
- UndoRedoTab *m_undoRedo;
+// UndoRedoTab *m_undoRedo;
};
#endif
Index: ui/kis_framebutton.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/ui/kis_framebutton.cc,v
retrieving revision 1.2
diff -u -3 -p -r1.2 kis_framebutton.cc
--- ui/kis_framebutton.cc 2000/02/21 13:21:05 1.2
+++ ui/kis_framebutton.cc 2000/10/02 16:38:02
@@ -45,7 +45,7 @@ KisFrameButton::KisFrameButton( const QP
{
setFrameStyle(Panel | Raised);
setLineWidth(1);
- setPixmap(pixmap);
+ setPixmap(pixmap);
m_active = false;
m_toggle = false;
}
Index: ui/kis_sidebar.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/ui/kis_sidebar.cc,v
retrieving revision 1.7
diff -u -3 -p -r1.7 kis_sidebar.cc
--- ui/kis_sidebar.cc 2000/06/07 14:15:48 1.7
+++ ui/kis_sidebar.cc 2000/10/02 16:38:03
@@ -20,7 +20,7 @@
#include <kglobalsettings.h>
#include <kdualcolorbtn.h>
-
+#include <kdebug.h> // jwc
#include "kis_sidebar.h"
#include "kis_brushwidget.h"
#include "kis_patternwidget.h"
@@ -29,8 +29,11 @@
KisSideBar::KisSideBar( QWidget* parent, const char* name ) : QWidget( parent, name \
) {
+
+ kdDebug() << "KisSideBar::KisSideBar" << endl; //jwc
+
m_pTopFrame = new TopFrame(this);
- m_pChooserFrame = new ChooserFrame(this);
+ m_pChooserFrame = new ChooserFrame(this); //jwc
m_pControlFrame = new ControlFrame(this);
m_pDockFrame = new DockFrame(this);
@@ -38,9 +41,10 @@ KisSideBar::KisSideBar( QWidget* parent,
// connect chooser frame
connect(m_pChooserFrame, SIGNAL(colorChanged(const KisColor &)), this,
- SLOT(slotChooserColorSelected(const KisColor &)));
+ SLOT(slotChooserColorSelected(const KisColor &)));
// connect top frame
+
connect(m_pTopFrame, SIGNAL(greyClicked()), m_pChooserFrame,
SLOT(slotShowGrey()));
connect(m_pTopFrame, SIGNAL(rgbClicked()), m_pChooserFrame,
@@ -53,6 +57,7 @@ KisSideBar::KisSideBar( QWidget* parent,
SLOT(slotShowLAB()));
// connect control frame
+
connect(m_pControlFrame, SIGNAL(fgColorChanged(const KisColor &)), this,
SLOT(slotControlFGColorSelected(const KisColor &)));
connect(m_pControlFrame, SIGNAL(bgColorChanged(const KisColor &)), this,
@@ -60,14 +65,19 @@ KisSideBar::KisSideBar( QWidget* parent,
connect(m_pControlFrame, SIGNAL(activeColorChanged(ActiveColor)), this,
SLOT(slotControlActiveColorChanged(ActiveColor)));
+
+ kdDebug() << "KisSideBar::KisSideBar leaving" << endl; //jwc
}
void KisSideBar::resizeEvent ( QResizeEvent * )
{
+ kdDebug() << "KisSideBar::resizeEvent" << endl; //jwc
+
m_pTopFrame->setGeometry( 0, 0, width(), 20 );
m_pChooserFrame->setGeometry( 0, 20, width(), 138 );
m_pControlFrame->setGeometry( 0, 158, width(), 42);
m_pDockFrame->setGeometry( 0, 200, width(), height() - 200 );
+ kdDebug() << "KisSideBar::resizeEvent leaving" << endl; //jwc
}
void KisSideBar::slotSetFGColor(const KisColor& c)
@@ -84,7 +94,9 @@ void KisSideBar::slotSetBGColor(const Ki
void KisSideBar::slotChooserColorSelected(const KisColor& c)
{
- if (m_pControlFrame->activeColor() == ac_Foreground)
+
+ kdDebug() << "KisSideBar::slotChooserColorSelected" << endl; //jwc
+ if (m_pControlFrame->activeColor() == ac_Foreground)
{
m_pControlFrame->slotSetFGColor(c);
emit fgColorChanged( c );
@@ -94,10 +106,12 @@ void KisSideBar::slotChooserColorSelecte
m_pControlFrame->slotSetBGColor(c);
emit bgColorChanged( c );
}
+
}
void KisSideBar::slotControlActiveColorChanged(ActiveColor s)
{
+ kdDebug() << "KisSideBar::slotControlActiveColorChanged" << endl; //jwc
m_pChooserFrame->slotSetActiveColor(s);
}
@@ -120,6 +134,8 @@ void KisSideBar::slotSetBrush( const Kis
TopFrame::TopFrame( QWidget* parent, const char* name ) : QFrame( parent, name )
{
+
+ kdDebug() << "TopFrame::TopFrame (sidebar)" << endl; //jwc
setFrameStyle(Panel | Raised);
setLineWidth(1);
@@ -168,10 +184,13 @@ TopFrame::TopFrame( QWidget* parent, con
// RGB is default
m_pRGBButton->setOn(true);
+ kdDebug() << "TopFrame::TopFrame (sidebar) leaving" << endl; //jwc
}
void TopFrame::resizeEvent ( QResizeEvent * )
{
+
+ kdDebug() << "TopFrame::resizeEvent (sidebar)" << endl; //jwc
int w = width();
m_pHideButton->setGeometry(w-20, 0, 20, 20);
@@ -182,6 +201,7 @@ void TopFrame::resizeEvent ( QResizeEven
m_pRGBButton->setGeometry(92, 0, 28, 20);
m_pGreyButton->setGeometry(120, 0, 28, 20);
m_pEmptyFrame->setGeometry(148, 0, w-168, 20);
+ kdDebug() << "TopFrame::resizeEvent (sidebar) leaving" << endl; //jwc
}
void TopFrame::slotHideClicked()
@@ -246,17 +266,21 @@ void TopFrame::slotLABClicked()
DockFrame::DockFrame( QWidget* parent, const char* name ) : QFrame( parent, name )
{
+ kdDebug() << "DockFrame::DockFrame (sidebar)" << endl; //jwc
+
setFrameStyle(Panel | Raised);
setLineWidth(1);
m_wlst.setAutoDelete(true);
m_blst.setAutoDelete(true);
+
+ kdDebug() << "DockFrame::DockFrame (sidebar) leaving" << endl; //jwc
}
void DockFrame::plug (QWidget* w)
{
- if (!w)
- return;
+ if (!w) return;
+ kdDebug() << "DockFrame::plug (sidebar) caption: "<< w->caption() <<endl; //jwc
QString name = w->caption();
m_wlst.append(w);
@@ -277,18 +301,20 @@ void DockFrame::plug (QWidget* w)
SLOT(slotActivateTab(const QString&)));
m_blst.append(btn);
- slotActivateTab(name);
+ //slotActivateTab(name); // jwc
+ kdDebug() << "DockFrame::plug (sidebar) leaving" << endl; //jwc
}
void DockFrame::unplug (QWidget* w)
{
- if (!w)
- return;
+ if (!w) return;
+ kdDebug() << "DockFrame::unplug (sidebar)" << endl; //jwc
KisFrameButton *b;
for ( b = m_blst.first(); b != 0; b = m_blst.next() )
{
+ if(!b) break; //jwc
if (b->text() == w->caption())
{
m_blst.remove(b);
@@ -298,13 +324,18 @@ void DockFrame::unplug (QWidget* w)
m_wlst.remove(w);
w->reparent ( 0L, QPoint(0, 0), false );
+
+ kdDebug() << "DockFrame::unplug (sidebar) leaving" << endl; //jwc
}
void DockFrame::slotActivateTab(const QString& tab)
{
+
+ kdDebug() << "DockFrame::slotActivateTab (sidebar) name: " << tab << endl; //jwc
QWidget *w;
for ( w = m_wlst.first(); w != 0; w = m_wlst.next() )
{
+ if(!w) break; //jwc
if (w->caption() == tab)
w->show();
else
@@ -313,44 +344,57 @@ void DockFrame::slotActivateTab(const QS
KisFrameButton *b;
for ( b = m_blst.first(); b != 0; b = m_blst.next() )
+ {
+ if(!b) break; //jwc
b->setOn(b->text() == tab);
+ }
+ kdDebug() << "DockFrame::slotActivateTab (sidebar) leaving" << endl; //jwc
}
void DockFrame::resizeEvent ( QResizeEvent * )
{
+ kdDebug() << "DockFrame::resizeEvent (sidebar)" << endl; //jwc
+
int bw = 0;
int row = 0;
KisFrameButton *b;
for ( b = m_blst.first(); b != 0; b = m_blst.next() )
- {
- if (bw >= width())
- {
- bw = 0;
- row++;
- }
- b->move(bw, row*18);
- bw += b->width();
- }
+ {
+ if (bw >= width())
+ {
+ bw = 0;
+ row++;
+ }
+ b->move(bw, row*18);
+ bw += b->width();
+ }
QWidget *w;
- int xw = 18+ row*18;
+ int xw = 18 + row*18;
for ( w = m_wlst.first(); w != 0; w = m_wlst.next() )
+ {
+ if(!w) break; //jwc
w->setGeometry(2, xw, width()-4, height()- xw-2);
+ }
+
+ kdDebug() << "DockFrame::resizeEvent (sidebar) leaving" << endl; //jwc
}
ChooserFrame::ChooserFrame( QWidget* parent, const char* name ) : QFrame( parent, \
name ) {
+ kdDebug() << "ChooserFrame::ChooserFrame (sidebar)" << endl; //jwc
setFrameStyle(Panel | Raised);
setLineWidth(1);
m_pColorChooser = new KisColorChooser(this);
connect(m_pColorChooser, SIGNAL(colorChanged(const KisColor &)), this,
- SLOT(slotColorSelected(const KisColor &)));
+ SLOT(slotColorSelected(const KisColor &)));
+ kdDebug() << "ChooserFrame::ChooserFrame (sidebar) leaving" << endl; //jwc \
}
void ChooserFrame::slotShowGrey()
@@ -404,12 +448,13 @@ void ChooserFrame::slotColorSelected(con
ControlFrame::ControlFrame( QWidget* parent, const char* name ) : QFrame( parent, \
name ) {
+ kdDebug() << "ControlFrame::ControlFrame" << endl; //jwc
setFrameStyle(Panel | Raised);
setLineWidth(1);
m_pColorButton = new KDualColorButton(this);
m_pBrushWidget = new KisBrushWidget(this);
- m_pPatternWidget = new KisPatternWidget(this);
+ // m_pPatternWidget = new KisPatternWidget(this);
connect(m_pColorButton, SIGNAL(fgChanged(const QColor &)), this,
SLOT(slotFGColorSelected(const QColor &)));
@@ -419,14 +464,17 @@ ControlFrame::ControlFrame( QWidget* par
connect(m_pColorButton, SIGNAL(currentChanged(KDualColorButton::DualColor)), this,
SLOT(slotActiveColorChanged(KDualColorButton::DualColor )));
+ kdDebug() << "ControlFrame::ControlFrame leaving" << endl; //jwc
}
ActiveColor ControlFrame::activeColor()
{
- if (m_pColorButton->current() == KDualColorButton::Foreground)
+
+ if (m_pColorButton->current() == KDualColorButton::Foreground)
return ac_Foreground;
else
- return ac_Background;
+ return ac_Background;
+
}
void ControlFrame::slotActiveColorChanged(KDualColorButton::DualColor s)
@@ -444,14 +492,15 @@ void ControlFrame::slotSetBrush(const Ki
void ControlFrame::slotSetPattern(const KisPattern& b)
{
- m_pPatternWidget->slotSetPattern(b);
+ //m_pPatternWidget->slotSetPattern(b); //jwc
}
void ControlFrame::resizeEvent ( QResizeEvent * )
{
+ kdDebug() << "ControlFrame::resizeEvent" << endl; //jwc
m_pColorButton->setGeometry( 4, 4, 34, 34 );
m_pBrushWidget->setGeometry( 42, 4, 34, 34 );
- m_pPatternWidget->setGeometry( 80, 4, 34, 34 );
+ //m_pPatternWidget->setGeometry( 80, 4, 34, 34 ); //jwc
}
void ControlFrame::slotSetFGColor(const KisColor& c)
Index: ui/kis_tabbar.cc
===================================================================
RCS file: /home/kde/koffice/kimageshop/ui/kis_tabbar.cc,v
retrieving revision 1.6
diff -u -3 -p -r1.6 kis_tabbar.cc
--- ui/kis_tabbar.cc 2000/09/19 22:21:06 1.6
+++ ui/kis_tabbar.cc 2000/10/02 16:38:05
@@ -356,7 +356,8 @@ void KisTabBar::mousePressEvent( QMouseE
int i = 1;
int x = 0;
QString text;
- const char *active_text = 0L;
+ // const char *active_text = 0L; //jwc
+ QString active_text = "";
QStringList::Iterator it;
for ( it = tabsList.begin(); it != tabsList.end(); ++it )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic