Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 81576b1337
commit 580d345952

@ -48,7 +48,7 @@ standard icon palette.
<keywordset> <keywordset>
<keyword>KDE</keyword> <keyword>KDE</keyword>
<keyword>tdegraphics</keyword> <keyword>tdegraphics</keyword>
<keyword>KIconEdit</keyword> <keyword>TDEIconEdit</keyword>
<keyword>icon</keyword> <keyword>icon</keyword>
</keywordset> </keywordset>
</bookinfo> </bookinfo>

@ -104,7 +104,7 @@ void KKameraConfig::displayGPSuccessDialogue(void)
m_toolbar->setMovingEnabled(false); m_toolbar->setMovingEnabled(false);
// create list of devices // create list of devices
m_deviceSel = new KIconView(this); m_deviceSel = new TDEIconView(this);
connect(m_deviceSel, TQT_SIGNAL(rightButtonClicked(TQIconViewItem *, const TQPoint &)), connect(m_deviceSel, TQT_SIGNAL(rightButtonClicked(TQIconViewItem *, const TQPoint &)),
TQT_SLOT(slot_deviceMenu(TQIconViewItem *, const TQPoint &))); TQT_SLOT(slot_deviceMenu(TQIconViewItem *, const TQPoint &)));

@ -39,7 +39,7 @@ class TQIconViewItem;
class KCamera; class KCamera;
class KameraDeviceSelectDialog; class KameraDeviceSelectDialog;
class KSimpleConfig; class KSimpleConfig;
class KIconView; class TDEIconView;
class TDEActionCollection; class TDEActionCollection;
class TDEToolBar; class TDEToolBar;
class TDEPopupMenu; class TDEPopupMenu;
@ -100,7 +100,7 @@ private:
GPContext *m_context; GPContext *m_context;
// widgets for the cameras listview // widgets for the cameras listview
KIconView *m_deviceSel; TDEIconView *m_deviceSel;
TDEActionCollection *m_actions; TDEActionCollection *m_actions;
TQPushButton *m_addCamera, *m_removeCamera, *m_testCamera, *m_configureCamera; TQPushButton *m_addCamera, *m_removeCamera, *m_testCamera, *m_configureCamera;
TDEToolBar *m_toolbar; TDEToolBar *m_toolbar;

@ -36,7 +36,7 @@ _______________
News and fixes in version 0.3: News and fixes in version 0.3:
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
- Complete rewrite of the drawing grid. Should now be faster and more flexible. - Complete rewrite of the drawing grid. Should now be faster and more flexible.
- New class KIcon for file manipulation. - New class TDEIcon for file manipulation.
- The "Line" tool can now draw 45 dgr. angles. - The "Line" tool can now draw 45 dgr. angles.
- Smooth resizing of icons if linked with QT >= 1.40. - Smooth resizing of icons if linked with QT >= 1.40.
- Improved loading/saving images with transparent pixels. - Improved loading/saving images with transparent pixels.

@ -32,7 +32,7 @@
#include "kicon.h" #include "kicon.h"
#include "utils.h" #include "utils.h"
KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url) TDEIconEditIcon::TDEIconEditIcon(TQObject *parent, const TQImage *img, KURL url)
: TQObject(parent) : TQObject(parent)
{ {
f = 0; f = 0;
@ -46,23 +46,23 @@ KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url)
} }
KIconEditIcon::~KIconEditIcon() TDEIconEditIcon::~TDEIconEditIcon()
{ {
} }
bool KIconEditIcon::open(const TQImage *image, KURL url) bool TDEIconEditIcon::open(const TQImage *image, KURL url)
{ {
TQImage *img = (TQImage*)image; TQImage *img = (TQImage*)image;
if(url.isEmpty()) if(url.isEmpty())
return false; return false;
kdDebug(4640) << "KIconEditIcon::open " << url.prettyURL() << endl; kdDebug(4640) << "TDEIconEditIcon::open " << url.prettyURL() << endl;
if(!url.isValid()) // try to see if it is a relative filename if(!url.isValid()) // try to see if it is a relative filename
{ {
kdDebug(4640) << "KIconEditIcon::open (malformed) " << url.prettyURL() << endl; kdDebug(4640) << "TDEIconEditIcon::open (malformed) " << url.prettyURL() << endl;
TQFileInfo fi(url.url()); TQFileInfo fi(url.url());
if(fi.isRelative()) if(fi.isRelative())
@ -106,7 +106,7 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
} }
else else
{ {
kdDebug(4640) << "KIconEditIcon::open - Image loaded" << endl; kdDebug(4640) << "TDEIconEditIcon::open - Image loaded" << endl;
// _url is saved off for use in saving the image to the same // _url is saved off for use in saving the image to the same
// file later - should include full path // file later - should include full path
@ -119,7 +119,7 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
_url = ""; _url = "";
} }
kdDebug(4640) << "KIcon: _url: " << _url << endl; kdDebug(4640) << "TDEIcon: _url: " << _url << endl;
// this causes updates of preview, color palettes, etc. // this causes updates of preview, color palettes, etc.
emit loaded(img); emit loaded(img);
@ -132,7 +132,7 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
emit addrecent(url.prettyURL()); emit addrecent(url.prettyURL());
kdDebug(4640) << "KIconEditIcon::open - done" << endl; kdDebug(4640) << "TDEIconEditIcon::open - done" << endl;
} }
return loadedOk; return loadedOk;
@ -140,9 +140,9 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
bool KIconEditIcon::promptForFile(const TQImage *img) bool TDEIconEditIcon::promptForFile(const TQImage *img)
{ {
kdDebug(4640) << "KIconEditIcon::promptForFile(const TQImage *img)" << endl; kdDebug(4640) << "TDEIconEditIcon::promptForFile(const TQImage *img)" << endl;
/* /*
TQString filter = i18n("*|All Files (*)\n" TQString filter = i18n("*|All Files (*)\n"
"*.xpm|XPM (*.xpm)\n" "*.xpm|XPM (*.xpm)\n"
@ -167,9 +167,9 @@ bool KIconEditIcon::promptForFile(const TQImage *img)
bool KIconEditIcon::saveAs(const TQImage *image) bool TDEIconEditIcon::saveAs(const TQImage *image)
{ {
kdDebug(4640) << "KIconEditIcon::saveAs" << endl; kdDebug(4640) << "TDEIconEditIcon::saveAs" << endl;
TQString file; TQString file;
@ -223,9 +223,9 @@ bool KIconEditIcon::saveAs(const TQImage *image)
bool KIconEditIcon::save(const TQImage *image, const TQString &_filename) bool TDEIconEditIcon::save(const TQImage *image, const TQString &_filename)
{ {
kdDebug(4640) << "KIconEditIcon::save" << endl; kdDebug(4640) << "TDEIconEditIcon::save" << endl;
TQString filename = _filename; TQString filename = _filename;
if(filename.isEmpty()) if(filename.isEmpty())
@ -267,10 +267,10 @@ bool KIconEditIcon::save(const TQImage *image, const TQString &_filename)
{ {
TQString msg = i18n("There was an error saving:\n%1\n").arg(str); TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
KMessageBox::error((TQWidget*)parent(), msg); KMessageBox::error((TQWidget*)parent(), msg);
kdDebug(4640) << "KIconEditIcon::save - " << msg << endl; kdDebug(4640) << "TDEIconEditIcon::save - " << msg << endl;
} }
kdDebug(4640) << "KIconEditIcon::save - done" << endl; kdDebug(4640) << "TDEIconEditIcon::save - done" << endl;
return savedOk; return savedOk;
} }

@ -43,13 +43,13 @@
class TQImage; class TQImage;
class KIconEditIcon : public TQObject class TDEIconEditIcon : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() ); TDEIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() );
~KIconEditIcon(); ~TDEIconEditIcon();
bool isLocal() { return local; } bool isLocal() { return local; }
TQString url() { return _url; } TQString url() { return _url; }

@ -49,7 +49,7 @@
static inline TQPixmap loadIcon( const char * name ) static inline TQPixmap loadIcon( const char * name )
{ {
return TDEGlobal::instance()->iconLoader() return TDEGlobal::instance()->iconLoader()
->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); ->loadIcon( TQString::fromLatin1(name), TDEIcon::NoGroup, TDEIcon::SizeMedium );
} }
KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent) KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent)
@ -121,7 +121,7 @@ KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent)
TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this ); TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this );
grp->setColumnLayout( 0, Qt::Horizontal ); grp->setColumnLayout( 0, Qt::Horizontal );
templates = new KIconListBox( grp ); templates = new TDEIconListBox( grp );
connect( templates, TQT_SIGNAL( highlighted( int ) ), connect( templates, TQT_SIGNAL( highlighted( int ) ),
TQT_SLOT( checkSelection( int ) ) ); TQT_SLOT( checkSelection( int ) ) );
connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ), connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ),
@ -133,8 +133,8 @@ KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent)
TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() ); TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() );
l->addWidget( templates ); l->addWidget( templates );
for( unsigned int i = 0; i < KIconTemplateContainer::self()->count(); i++ ) for( unsigned int i = 0; i < TDEIconTemplateContainer::self()->count(); i++ )
templates->insertItem( new KIconListBoxItem( *KIconTemplateContainer::self()->at( i ) ) ) ; templates->insertItem( new TDEIconListBoxItem( *TDEIconTemplateContainer::self()->at( i ) ) ) ;
KButtonBox *bbox = new KButtonBox( grp ); KButtonBox *bbox = new KButtonBox( grp );
@ -163,13 +163,13 @@ void KTemplateConfig::saveSettings()
{ {
kdDebug(4640) << "KTemplateConfig::saveSettings" << endl; kdDebug(4640) << "KTemplateConfig::saveSettings" << endl;
KIconTemplateContainer::self()->clear(); TDEIconTemplateContainer::self()->clear();
for(int i = 0; i < (int)templates->count(); i++) for(int i = 0; i < (int)templates->count(); i++)
{ {
KIconTemplateContainer::self()->append(templates->iconTemplate(i)); TDEIconTemplateContainer::self()->append(templates->iconTemplate(i));
} }
KIconTemplateContainer::self()->save(); TDEIconTemplateContainer::self()->save();
kdDebug(4640) << "KTemplateConfig::saveSettings - done" << endl; kdDebug(4640) << "KTemplateConfig::saveSettings - done" << endl;
} }
@ -200,10 +200,10 @@ void KTemplateConfig::add()
KTemplateEditDlg dlg(this); KTemplateEditDlg dlg(this);
if(dlg.exec()) if(dlg.exec())
{ {
KIconTemplate it; TDEIconTemplate it;
it.path = dlg.path(); it.path = dlg.path();
it.title = dlg.name(); it.title = dlg.name();
templates->insertItem(new KIconListBoxItem(it)); templates->insertItem(new TDEIconListBoxItem(it));
} }
} }
@ -216,10 +216,10 @@ void KTemplateConfig::edit()
if(dlg.exec()) if(dlg.exec())
{ {
//Edit the entry //Edit the entry
KIconTemplate &it=templates->iconTemplate(templates->currentItem()); TDEIconTemplate &it=templates->iconTemplate(templates->currentItem());
it.path = dlg.path(); it.path = dlg.path();
it.title = dlg.name(); it.title = dlg.name();
static_cast<KIconListBoxItem*>(templates->item(templates->currentItem()))->reloadIcon(); static_cast<TDEIconListBoxItem*>(templates->item(templates->currentItem()))->reloadIcon();
templates->update(); templates->update();
} }
} }
@ -231,7 +231,7 @@ KBackgroundConfig::KBackgroundConfig( TQWidget* parent )
lb_ex = 0L; lb_ex = 0L;
KIconEditProperties *props = KIconEditProperties::self(); TDEIconEditProperties *props = TDEIconEditProperties::self();
pixpath = props->bgPixmap(); pixpath = props->bgPixmap();
pix.load(pixpath); pix.load(pixpath);
@ -338,7 +338,7 @@ void KBackgroundConfig::slotBackgroundMode(int id)
void KBackgroundConfig::saveSettings() void KBackgroundConfig::saveSettings()
{ {
kdDebug(4640) << "KBackgroundConfig::saveSettings" << endl; kdDebug(4640) << "KBackgroundConfig::saveSettings" << endl;
KIconEditProperties *props = KIconEditProperties::self(); TDEIconEditProperties *props = TDEIconEditProperties::self();
props->setBgMode( bgmode ); props->setBgMode( bgmode );
props->setBgPixmap( pixpath ); props->setBgPixmap( pixpath );
props->setBgColor( btcolor->color() ); props->setBgColor( btcolor->color() );
@ -377,7 +377,7 @@ KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent)
{ {
kdDebug(4640) << "KMiscConfig - constructor" << endl; kdDebug(4640) << "KMiscConfig - constructor" << endl;
KIconEditProperties* props = KIconEditProperties::self(); TDEIconEditProperties* props = TDEIconEditProperties::self();
TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 ); TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 );
@ -441,7 +441,7 @@ KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent)
grid->addWidget(label, 2, 1); grid->addWidget(label, 2, 1);
grid->addWidget(m_checkerboardColor2Button, 2, 2); grid->addWidget(m_checkerboardColor2Button, 2, 2);
if(props->transparencyDisplayType() == KIconEditGrid::TRD_CHECKERBOARD) if(props->transparencyDisplayType() == TDEIconEditGrid::TRD_CHECKERBOARD)
{ {
checkerboardRButton->setChecked(true); checkerboardRButton->setChecked(true);
m_checkerboardColor1Button->setEnabled(true); m_checkerboardColor1Button->setEnabled(true);
@ -476,20 +476,20 @@ KMiscConfig::~KMiscConfig()
void KMiscConfig::saveSettings() void KMiscConfig::saveSettings()
{ {
kdDebug(4640) << "KMiscConfig::saveSettings" << endl; kdDebug(4640) << "KMiscConfig::saveSettings" << endl;
KIconEditProperties* props = KIconEditProperties::self(); TDEIconEditProperties* props = TDEIconEditProperties::self();
props->setPasteTransparent( pastemode ); props->setPasteTransparent( pastemode );
props->setShowRulers( showrulers ); props->setShowRulers( showrulers );
if(m_solidColorButton->isEnabled()) if(m_solidColorButton->isEnabled())
{ {
props->setTransparencyDisplayType(KIconEditGrid::TRD_SOLIDCOLOR); props->setTransparencyDisplayType(TDEIconEditGrid::TRD_SOLIDCOLOR);
props->setTransparencySolidColor(m_solidColorButton->color()); props->setTransparencySolidColor(m_solidColorButton->color());
} }
else else
{ {
props->setTransparencyDisplayType(KIconEditGrid::TRD_CHECKERBOARD); props->setTransparencyDisplayType(TDEIconEditGrid::TRD_CHECKERBOARD);
props->setCheckerboardColor1(m_checkerboardColor1Button->color()); props->setCheckerboardColor1(m_checkerboardColor1Button->color());
props->setCheckerboardColor2(m_checkerboardColor2Button->color()); props->setCheckerboardColor2(m_checkerboardColor2Button->color());
props->setCheckerboardSize((KIconEditGrid::CheckerboardSize)m_checkerboardSizeCombo->currentItem()); props->setCheckerboardSize((TDEIconEditGrid::CheckerboardSize)m_checkerboardSizeCombo->currentItem());
} }
} }
@ -524,7 +524,7 @@ void KMiscConfig::slotTransparencyDisplayType(int id)
} }
} }
KIconConfig::KIconConfig(TQWidget *parent) TDEIconConfig::TDEIconConfig(TQWidget *parent)
: KDialogBase(KDialogBase::IconList, i18n("Configure"), : KDialogBase(KDialogBase::IconList, i18n("Configure"),
KDialogBase::Help | KDialogBase::Help |
KDialogBase::Ok | KDialogBase::Ok |
@ -554,34 +554,34 @@ KIconConfig::KIconConfig(TQWidget *parent)
resize(min); resize(min);
} }
KIconConfig::~KIconConfig() TDEIconConfig::~TDEIconConfig()
{ {
//delete dict; //delete dict;
} }
void KIconConfig::slotApply() void TDEIconConfig::slotApply()
{ {
kdDebug(4640) << "KIconEditConfig::saveSettings" << endl; kdDebug(4640) << "TDEIconEditConfig::saveSettings" << endl;
temps->saveSettings(); temps->saveSettings();
backs->saveSettings(); backs->saveSettings();
misc->saveSettings(); misc->saveSettings();
for (KIconEdit* window = KIconEdit::windowList.first(); for (TDEIconEdit* window = TDEIconEdit::windowList.first();
window; window;
window = KIconEdit::windowList.next()) window = TDEIconEdit::windowList.next())
{ {
window->updateProperties(); window->updateProperties();
} }
} }
void KIconConfig::slotOk() void TDEIconConfig::slotOk()
{ {
slotApply(); slotApply();
KDialogBase::slotOk(); KDialogBase::slotOk();
} }
void KIconConfig::finis() void TDEIconConfig::finis()
{ {
delayedDestruct(); delayedDestruct();
} }

@ -76,7 +76,7 @@ protected slots:
void checkSelection(int); void checkSelection(int);
protected: protected:
KIconListBox *templates; TDEIconListBox *templates;
TQPushButton *btadd, *btedit, *btremove; TQPushButton *btadd, *btedit, *btremove;
}; };
@ -134,15 +134,15 @@ protected:
TQComboBox *m_checkerboardSizeCombo; TQComboBox *m_checkerboardSizeCombo;
}; };
class KIconConfig : public KDialogBase class TDEIconConfig : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconConfig(TQWidget *parent); TDEIconConfig(TQWidget *parent);
~KIconConfig(); ~TDEIconConfig();
protected slots: protected slots:
void slotApply(); void slotApply();

@ -31,9 +31,9 @@
#include "kiconedit.h" #include "kiconedit.h"
#include "palettetoolbar.h" #include "palettetoolbar.h"
WindowList KIconEdit::windowList; WindowList TDEIconEdit::windowList;
KIconEdit::KIconEdit(const TQImage image, const char *name) TDEIconEdit::TDEIconEdit(const TQImage image, const char *name)
: TDEMainWindow(0, name) : TDEMainWindow(0, name)
{ {
init(); init();
@ -43,14 +43,14 @@ KIconEdit::KIconEdit(const TQImage image, const char *name)
grid->setModified(true); grid->setModified(true);
} }
KIconEdit::KIconEdit(KURL url, const char *name) TDEIconEdit::TDEIconEdit(KURL url, const char *name)
: TDEMainWindow(0, name) : TDEMainWindow(0, name)
{ {
init(); init();
icon->open(&img, url); icon->open(&img, url);
} }
void KIconEdit::init() void TDEIconEdit::init()
{ {
setMinimumSize( 600, 540 ); setMinimumSize( 600, 540 );
@ -64,7 +64,7 @@ void KIconEdit::init()
gridview = new KGridView(&img, history, this); gridview = new KGridView(&img, history, this);
grid = gridview->grid(); grid = gridview->grid();
icon = new KIconEditIcon(TQT_TQOBJECT(this), &grid->image()); icon = new TDEIconEditIcon(TQT_TQOBJECT(this), &grid->image());
setAcceptDrops(true); setAcceptDrops(true);
@ -149,7 +149,7 @@ void KIconEdit::init()
moveDockWindow( m_paletteToolBar, TQt::DockRight, true, 0 ); moveDockWindow( m_paletteToolBar, TQt::DockRight, true, 0 );
} }
KIconEdit::~KIconEdit() TDEIconEdit::~TDEIconEdit()
{ {
windowList.remove(this); windowList.remove(this);
@ -159,7 +159,7 @@ KIconEdit::~KIconEdit()
} }
} }
bool KIconEdit::queryClose() bool TDEIconEdit::queryClose()
{ {
bool cancel = false; bool cancel = false;
if (grid->isModified()) if (grid->isModified())
@ -192,17 +192,17 @@ bool KIconEdit::queryClose()
} }
// this is for exit by request of the session manager // this is for exit by request of the session manager
void KIconEdit::saveProperties(TDEConfig *config ) void TDEIconEdit::saveProperties(TDEConfig *config )
{ {
kdDebug(4640) << "KIconEdit::saveProperties" << endl; kdDebug(4640) << "TDEIconEdit::saveProperties" << endl;
config->writePathEntry("Name", icon->url()); config->writePathEntry("Name", icon->url());
} }
// this is for instances opened by the session manager // this is for instances opened by the session manager
void KIconEdit::readProperties(TDEConfig *config) void TDEIconEdit::readProperties(TDEConfig *config)
{ {
kdDebug(4640) << "KIconEdit::readProperties" << endl; kdDebug(4640) << "TDEIconEdit::readProperties" << endl;
TQString entry = config->readPathEntry("Name"); // no default TQString entry = config->readPathEntry("Name"); // no default
if (entry.isEmpty()) return; if (entry.isEmpty()) return;
@ -212,17 +212,17 @@ void KIconEdit::readProperties(TDEConfig *config)
/* /*
this is for normal exits or request from "Options->Save options". this is for normal exits or request from "Options->Save options".
*/ */
void KIconEdit::writeConfig() void TDEIconEdit::writeConfig()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
m_actRecent->saveEntries( kapp->config() ); m_actRecent->saveEntries( kapp->config() );
KIconEditProperties::self()->save(); TDEIconEditProperties::self()->save();
saveMainWindowSettings( config, "MainWindowSettings" ); saveMainWindowSettings( config, "MainWindowSettings" );
} }
TQSize KIconEdit::sizeHint() const TQSize TDEIconEdit::sizeHint() const
{ {
if(gridview) if(gridview)
return gridview->sizeHint(); return gridview->sizeHint();
@ -230,7 +230,7 @@ TQSize KIconEdit::sizeHint() const
return TQSize(-1, -1); return TQSize(-1, -1);
} }
void KIconEdit::setupActions() void TDEIconEdit::setupActions()
{ {
kdDebug(4640) << "setupActions" << endl; kdDebug(4640) << "setupActions" << endl;
@ -346,7 +346,7 @@ void KIconEdit::setupActions()
toggle->setCheckedState(i18n("Hide &Grid")); toggle->setCheckedState(i18n("Hide &Grid"));
toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon" toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon"
" edit grid on/off" ) ); " edit grid on/off" ) );
toggle->setChecked( KIconEditProperties::self()->showGrid() ); toggle->setChecked( TDEIconEditProperties::self()->showGrid() );
// Tools Menu // Tools Menu
toolAction = new TDERadioAction(i18n("Color Picker"), "colorpicker", toolAction = new TDERadioAction(i18n("Color Picker"), "colorpicker",
@ -363,7 +363,7 @@ void KIconEdit::setupActions()
toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines")); toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines"));
toolAction->setChecked( true ); toolAction->setChecked( true );
grid->setTool(KIconEditGrid::Freehand); grid->setTool(TDEIconEditGrid::Freehand);
toolAction = new TDERadioAction(i18n("Rectangle"), "rectangle", toolAction = new TDERadioAction(i18n("Rectangle"), "rectangle",
cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolRectangle()), actionCollection(), cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolRectangle()), actionCollection(),
@ -446,12 +446,12 @@ void KIconEdit::setupActions()
" icon using the mouse.")); " icon using the mouse."));
} }
void KIconEdit::updateAccels() void TDEIconEdit::updateAccels()
{ {
actionCollection()->readShortcutSettings(); actionCollection()->readShortcutSettings();
} }
TQWidget *KIconEdit::createContainer( TQWidget *parent, int index, TQWidget *TDEIconEdit::createContainer( TQWidget *parent, int index,
const TQDomElement &element, int &id ) const TQDomElement &element, int &id )
{ {
if ( element.attribute( "name" ) == "paletteToolBar" ) if ( element.attribute( "name" ) == "paletteToolBar" )
@ -464,7 +464,7 @@ TQWidget *KIconEdit::createContainer( TQWidget *parent, int index,
return KXMLGUIBuilder::createContainer( parent, index, element, id ); return KXMLGUIBuilder::createContainer( parent, index, element, id );
} }
bool KIconEdit::setupStatusBar() bool TDEIconEdit::setupStatusBar()
{ {
statusbar = statusBar(); statusbar = statusBar();
@ -489,7 +489,7 @@ bool KIconEdit::setupStatusBar()
return true; return true;
} }
void KIconEdit::addRecent(const TQString & path) void TDEIconEdit::addRecent(const TQString & path)
{ {
m_actRecent->addURL(KURL( path )); m_actRecent->addURL(KURL( path ));
} }

@ -64,9 +64,9 @@ GenericName[zh_CN]=图标编辑器
GenericName[zh_HK]=圖示編輯器 GenericName[zh_HK]=圖示編輯器
GenericName[zh_TW]=圖示編輯器 GenericName[zh_TW]=圖示編輯器
GenericName[zu]=Umhleli we Icon GenericName[zu]=Umhleli we Icon
Name=KIconEdit Name=TDEIconEdit
Name[af]=K-ikoon-redigeer Name[af]=K-ikoon-redigeer
Name[ar]=برنامج KIconEdit Name[ar]=برنامج TDEIconEdit
Name[cy]=KGolyguEicon Name[cy]=KGolyguEicon
Name[eo]=Piktogramredaktilo Name[eo]=Piktogramredaktilo
Name[hi]=के-आइकॉन-एडिट Name[hi]=के-आइकॉन-एडिट
@ -82,7 +82,7 @@ Name[sv]=Kiconedit
Name[ta]=கேசின்னம் திருத்து Name[ta]=கேசின்னம் திருத்து
Name[tr]=K Icon Düzenleyici Name[tr]=K Icon Düzenleyici
Name[ven]=U sengulusa ha aikhono ya K Name[ven]=U sengulusa ha aikhono ya K
Name[zh_TW]=KIconEdit 圖示編輯器 Name[zh_TW]=TDEIconEdit 圖示編輯器
MimeType=image/x-xpm;image/x-ico;image/png;image/jpeg; MimeType=image/x-xpm;image/x-ico;image/png;image/jpeg;
Exec=kiconedit -caption "%c" %i %m %u Exec=kiconedit -caption "%c" %i %m %u
Icon=kiconedit Icon=kiconedit

@ -41,9 +41,9 @@
#include "kresize.h" #include "kresize.h"
#include "properties.h" #include "properties.h"
class KIconEdit; class TDEIconEdit;
class KCommandHistory; class KCommandHistory;
typedef TQPtrList<KIconEdit> WindowList; typedef TQPtrList<TDEIconEdit> WindowList;
class TQWhatsThis; class TQWhatsThis;
class TQToolButton; class TQToolButton;
@ -51,19 +51,19 @@ class TQLabel;
class PaletteToolBar; class PaletteToolBar;
/** /**
* KIconEdit * TDEIconEdit
* @short KIconEdit * @short TDEIconEdit
* @author Thomas Tanghus <tanghus@kde.org> * @author Thomas Tanghus <tanghus@kde.org>
* @version 0.4 * @version 0.4
*/ */
class KIconEdit : public TDEMainWindow class TDEIconEdit : public TDEMainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconEdit( KURL url = KURL(), const char *name = "kiconedit"); TDEIconEdit( KURL url = KURL(), const char *name = "kiconedit");
KIconEdit( const TQImage image, const char *name = "kiconedit"); TDEIconEdit( const TQImage image, const char *name = "kiconedit");
~KIconEdit(); ~TDEIconEdit();
virtual TQSize sizeHint() const; virtual TQSize sizeHint() const;
static WindowList windowList; static WindowList windowList;
@ -144,9 +144,9 @@ protected:
KCommandHistory* history; KCommandHistory* history;
PaletteToolBar *m_paletteToolBar; PaletteToolBar *m_paletteToolBar;
KStatusBar *statusbar; KStatusBar *statusbar;
KIconEditGrid *grid; TDEIconEditGrid *grid;
KGridView *gridview; KGridView *gridview;
KIconEditIcon *icon; TDEIconEditIcon *icon;
TQImage img; TQImage img;
TQString m_name; TQString m_name;

@ -37,9 +37,9 @@
#include "pics/logo.xpm" #include "pics/logo.xpm"
#endif #endif
void KIconEdit::updateProperties() void TDEIconEdit::updateProperties()
{ {
KIconEditProperties *props = KIconEditProperties::self(); TDEIconEditProperties *props = TDEIconEditProperties::self();
gridview->setShowRulers(props->showRulers()); gridview->setShowRulers(props->showRulers());
if(props->bgMode() == TQWidget::FixedPixmap) if(props->bgMode() == TQWidget::FixedPixmap)
{ {
@ -66,16 +66,16 @@ void KIconEdit::updateProperties()
grid->update(); grid->update();
} }
void KIconEdit::slotNewWin(const TQString & url) void TDEIconEdit::slotNewWin(const TQString & url)
{ {
//kdDebug(4640) << "KIconEdit::openNewWin() - " << url << endl; //kdDebug(4640) << "TDEIconEdit::openNewWin() - " << url << endl;
KIconEdit *w = new KIconEdit(KURL(url), "kiconedit"); TDEIconEdit *w = new TDEIconEdit(KURL(url), "kiconedit");
TQ_CHECK_PTR(w); TQ_CHECK_PTR(w);
} }
void KIconEdit::slotNew() void TDEIconEdit::slotNew()
{ {
bool cancel = false; bool cancel = false;
if (grid->isModified()) if (grid->isModified())
@ -129,7 +129,7 @@ void KIconEdit::slotNew()
} }
void KIconEdit::slotOpen() void TDEIconEdit::slotOpen()
{ {
bool cancel = false; bool cancel = false;
@ -171,27 +171,27 @@ void KIconEdit::slotOpen()
/* /*
close only the current window close only the current window
*/ */
void KIconEdit::slotClose() void TDEIconEdit::slotClose()
{ {
//kdDebug(4640) << "KIconEdit: Closing " << endl; //kdDebug(4640) << "TDEIconEdit: Closing " << endl;
close(); close();
} }
void KIconEdit::slotSave() void TDEIconEdit::slotSave()
{ {
//kdDebug(4640) << "KIconEdit: slotSave() " << endl; //kdDebug(4640) << "TDEIconEdit: slotSave() " << endl;
icon->save(&grid->image()); icon->save(&grid->image());
} }
void KIconEdit::slotSaveAs() void TDEIconEdit::slotSaveAs()
{ {
//kdDebug(4640) << "KIconEdit: slotSaveAs() " << endl; //kdDebug(4640) << "TDEIconEdit: slotSaveAs() " << endl;
icon->saveAs(&grid->image()); icon->saveAs(&grid->image());
} }
void KIconEdit::slotPrint() void TDEIconEdit::slotPrint()
{ {
KPrinter printer; KPrinter printer;
@ -214,66 +214,66 @@ void KIconEdit::slotPrint()
} }
} }
void KIconEdit::slotZoomIn() void TDEIconEdit::slotZoomIn()
{ {
grid->zoom(DirIn); grid->zoom(DirIn);
} }
void KIconEdit::slotZoomOut() void TDEIconEdit::slotZoomOut()
{ {
grid->zoom(DirOut); grid->zoom(DirOut);
} }
void KIconEdit::slotZoom1() void TDEIconEdit::slotZoom1()
{ {
grid->zoomTo(1); grid->zoomTo(1);
} }
void KIconEdit::slotZoom2() void TDEIconEdit::slotZoom2()
{ {
grid->zoomTo(2); grid->zoomTo(2);
} }
void KIconEdit::slotZoom5() void TDEIconEdit::slotZoom5()
{ {
grid->zoomTo(5); grid->zoomTo(5);
} }
void KIconEdit::slotZoom10() void TDEIconEdit::slotZoom10()
{ {
grid->zoomTo(10); grid->zoomTo(10);
} }
void KIconEdit::slotCopy() void TDEIconEdit::slotCopy()
{ {
grid->editCopy(); grid->editCopy();
} }
void KIconEdit::slotCut() void TDEIconEdit::slotCut()
{ {
grid->editCopy(true); grid->editCopy(true);
} }
void KIconEdit::slotPaste() void TDEIconEdit::slotPaste()
{ {
static_cast<TDERadioAction*>(actionCollection() static_cast<TDERadioAction*>(actionCollection()
->action("tool_find_pixel"))->setChecked(true); ->action("tool_find_pixel"))->setChecked(true);
grid->setTool(KIconEditGrid::Find); grid->setTool(TDEIconEditGrid::Find);
grid->editPaste(); grid->editPaste();
} }
void KIconEdit::slotClear() void TDEIconEdit::slotClear()
{ {
grid->editClear(); grid->editClear();
} }
void KIconEdit::slotSelectAll() void TDEIconEdit::slotSelectAll()
{ {
grid->setTool(KIconEditGrid::SelectRect); grid->setTool(TDEIconEditGrid::SelectRect);
grid->editSelectAll(); grid->editSelectAll();
} }
void KIconEdit::slotOpenRecent(const KURL& iconFile) void TDEIconEdit::slotOpenRecent(const KURL& iconFile)
{ {
bool cancel = false; bool cancel = false;
@ -312,18 +312,18 @@ void KIconEdit::slotOpenRecent(const KURL& iconFile)
} }
} }
void KIconEdit::slotConfigureSettings() void TDEIconEdit::slotConfigureSettings()
{ {
KIconConfig* c = new KIconConfig(this); TDEIconConfig* c = new TDEIconConfig(this);
c->exec(); c->exec();
delete c; delete c;
} }
void KIconEdit::slotConfigureKeys() void TDEIconEdit::slotConfigureKeys()
{ {
KKeyDialog::configure(actionCollection()); KKeyDialog::configure(actionCollection());
KIconEdit *ki = 0L; TDEIconEdit *ki = 0L;
for (ki = windowList.first(); ki; ki = windowList.next()) for (ki = windowList.first(); ki; ki = windowList.next())
{ {
if (ki != this) if (ki != this)
@ -333,134 +333,134 @@ void KIconEdit::slotConfigureKeys()
} }
} }
void KIconEdit::slotShowGrid() void TDEIconEdit::slotShowGrid()
{ {
bool b = KIconEditProperties::self()->showGrid(); bool b = TDEIconEditProperties::self()->showGrid();
grid->setGrid( !b ); grid->setGrid( !b );
KIconEditProperties::self()->setShowGrid( !b ); TDEIconEditProperties::self()->setShowGrid( !b );
} }
void KIconEdit::slotToolPointer() void TDEIconEdit::slotToolPointer()
{ {
grid->setTool(KIconEditGrid::Find); grid->setTool(TDEIconEditGrid::Find);
} }
void KIconEdit::slotToolFreehand() void TDEIconEdit::slotToolFreehand()
{ {
grid->setTool(KIconEditGrid::Freehand); grid->setTool(TDEIconEditGrid::Freehand);
} }
void KIconEdit::slotToolRectangle() void TDEIconEdit::slotToolRectangle()
{ {
grid->setTool(KIconEditGrid::Rect); grid->setTool(TDEIconEditGrid::Rect);
} }
void KIconEdit::slotToolFilledRectangle() void TDEIconEdit::slotToolFilledRectangle()
{ {
grid->setTool(KIconEditGrid::FilledRect); grid->setTool(TDEIconEditGrid::FilledRect);
} }
void KIconEdit::slotToolCircle() void TDEIconEdit::slotToolCircle()
{ {
grid->setTool(KIconEditGrid::Circle); grid->setTool(TDEIconEditGrid::Circle);
} }
void KIconEdit::slotToolFilledCircle() void TDEIconEdit::slotToolFilledCircle()
{ {
grid->setTool(KIconEditGrid::FilledCircle); grid->setTool(TDEIconEditGrid::FilledCircle);
} }
void KIconEdit::slotToolEllipse() void TDEIconEdit::slotToolEllipse()
{ {
grid->setTool(KIconEditGrid::Ellipse); grid->setTool(TDEIconEditGrid::Ellipse);
} }
void KIconEdit::slotToolFilledEllipse() void TDEIconEdit::slotToolFilledEllipse()
{ {
grid->setTool(KIconEditGrid::FilledEllipse); grid->setTool(TDEIconEditGrid::FilledEllipse);
} }
void KIconEdit::slotToolSpray() void TDEIconEdit::slotToolSpray()
{ {
grid->setTool(KIconEditGrid::Spray); grid->setTool(TDEIconEditGrid::Spray);
} }
void KIconEdit::slotToolFlood() void TDEIconEdit::slotToolFlood()
{ {
grid->setTool(KIconEditGrid::FloodFill); grid->setTool(TDEIconEditGrid::FloodFill);
} }
void KIconEdit::slotToolLine() void TDEIconEdit::slotToolLine()
{ {
grid->setTool(KIconEditGrid::Line); grid->setTool(TDEIconEditGrid::Line);
} }
void KIconEdit::slotToolEraser() void TDEIconEdit::slotToolEraser()
{ {
grid->setTool(KIconEditGrid::Eraser); grid->setTool(TDEIconEditGrid::Eraser);
} }
void KIconEdit::slotToolSelectRect() void TDEIconEdit::slotToolSelectRect()
{ {
grid->setTool(KIconEditGrid::SelectRect); grid->setTool(TDEIconEditGrid::SelectRect);
} }
void KIconEdit::slotToolSelectCircle() void TDEIconEdit::slotToolSelectCircle()
{ {
grid->setTool(KIconEditGrid::SelectCircle); grid->setTool(TDEIconEditGrid::SelectCircle);
} }
void KIconEdit::slotSaved() void TDEIconEdit::slotSaved()
{ {
grid->setModified(false); grid->setModified(false);
} }
void KIconEdit::slotUpdateZoom( int s ) void TDEIconEdit::slotUpdateZoom( int s )
{ {
m_actZoomOut->setEnabled( s>1 ); m_actZoomOut->setEnabled( s>1 );
} }
void KIconEdit::slotUpdateStatusPos(int x, int y) void TDEIconEdit::slotUpdateStatusPos(int x, int y)
{ {
TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y); TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
statusbar->changeItem( str, 0); statusbar->changeItem( str, 0);
} }
void KIconEdit::slotUpdateStatusSize(int x, int y) void TDEIconEdit::slotUpdateStatusSize(int x, int y)
{ {
TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y); TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
statusbar->changeItem( str, 1); statusbar->changeItem( str, 1);
} }
void KIconEdit::slotUpdateStatusScaling(int s) void TDEIconEdit::slotUpdateStatusScaling(int s)
{ {
KIconEditProperties::self()->setGridScale( s ); TDEIconEditProperties::self()->setGridScale( s );
TQString str; TQString str;
str.sprintf("1:%d", s); str.sprintf("1:%d", s);
statusbar->changeItem( str, 2); statusbar->changeItem( str, 2);
} }
void KIconEdit::slotUpdateStatusColors(uint) void TDEIconEdit::slotUpdateStatusColors(uint)
{ {
TQString str = i18n("Colors: %1").arg(grid->numColors()); TQString str = i18n("Colors: %1").arg(grid->numColors());
statusbar->changeItem( str, 3); statusbar->changeItem( str, 3);
} }
void KIconEdit::slotUpdateStatusColors(uint n, uint *) void TDEIconEdit::slotUpdateStatusColors(uint n, uint *)
{ {
TQString str = i18n("Colors: %1").arg(n); TQString str = i18n("Colors: %1").arg(n);
statusbar->changeItem( str, 3); statusbar->changeItem( str, 3);
} }
void KIconEdit::slotUpdateStatusMessage(const TQString & msg) void TDEIconEdit::slotUpdateStatusMessage(const TQString & msg)
{ {
statusbar->changeItem( msg, 4); statusbar->changeItem( msg, 4);
} }
void KIconEdit::slotUpdateStatusName(const TQString & name) void TDEIconEdit::slotUpdateStatusName(const TQString & name)
{ {
m_name = name; m_name = name;
@ -475,32 +475,32 @@ void KIconEdit::slotUpdateStatusName(const TQString & name)
} }
void KIconEdit::slotUpdateStatusModified(bool) void TDEIconEdit::slotUpdateStatusModified(bool)
{ {
slotUpdateStatusName(m_name); slotUpdateStatusName(m_name);
} }
void KIconEdit::slotUpdatePaste(bool state) void TDEIconEdit::slotUpdatePaste(bool state)
{ {
m_actPaste->setEnabled(state); m_actPaste->setEnabled(state);
m_actPasteNew->setEnabled(state); m_actPasteNew->setEnabled(state);
} }
void KIconEdit::slotUpdateCopy(bool state) void TDEIconEdit::slotUpdateCopy(bool state)
{ {
m_actCopy->setEnabled(state); m_actCopy->setEnabled(state);
m_actCut->setEnabled(state); m_actCut->setEnabled(state);
} }
void KIconEdit::slotOpenBlank(const TQSize s) void TDEIconEdit::slotOpenBlank(const TQSize s)
{ {
grid->loadBlank( s.width(), s.height()); grid->loadBlank( s.width(), s.height());
} }
void KIconEdit::dragEnterEvent(TQDragEnterEvent* e) void TDEIconEdit::dragEnterEvent(TQDragEnterEvent* e)
{ {
e->accept(KURLDrag::canDecode(e)); e->accept(KURLDrag::canDecode(e));
} }
@ -510,7 +510,7 @@ void KIconEdit::dragEnterEvent(TQDragEnterEvent* e)
accept drop of a file - opens file in current window accept drop of a file - opens file in current window
old code to drop image, as image, should be removed old code to drop image, as image, should be removed
*/ */
void KIconEdit::dropEvent( TQDropEvent *e ) void TDEIconEdit::dropEvent( TQDropEvent *e )
{ {
//kdDebug(4640) << "Got TQDropEvent!" << endl; //kdDebug(4640) << "Got TQDropEvent!" << endl;

@ -76,12 +76,12 @@ KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent,
acceptdrop = false; acceptdrop = false;
KIconEditProperties *props = KIconEditProperties::self(); TDEIconEditProperties *props = TDEIconEditProperties::self();
viewport = new TQScrollView(this); viewport = new TQScrollView(this);
TQ_CHECK_PTR(viewport); TQ_CHECK_PTR(viewport);
_grid = new KIconEditGrid(image, history, viewport->viewport()); _grid = new TDEIconEditGrid(image, history, viewport->viewport());
TQ_CHECK_PTR(_grid); TQ_CHECK_PTR(_grid);
viewport->addChild(_grid); viewport->addChild(_grid);
_grid->setGrid(props->showGrid()); _grid->setGrid(props->showGrid());
@ -146,7 +146,7 @@ void KGridView::paintGrid()
void KGridView::setSizes() void KGridView::setSizes()
{ {
if(KIconEditProperties::self()->showRulers()) if(TDEIconEditProperties::self()->showRulers())
{ {
_hruler->setLittleMarkDistance(_grid->scaling()); _hruler->setLittleMarkDistance(_grid->scaling());
_vruler->setLittleMarkDistance(_grid->scaling()); _vruler->setLittleMarkDistance(_grid->scaling());
@ -208,7 +208,7 @@ void KGridView::scalingChange(int)
void KGridView::setShowRulers(bool mode) void KGridView::setShowRulers(bool mode)
{ {
KIconEditProperties::self()->setShowRulers( mode ); TDEIconEditProperties::self()->setShowRulers( mode );
setSizes(); setSizes();
TQResizeEvent e(size(), size()); TQResizeEvent e(size(), size());
resizeEvent(&e); resizeEvent(&e);
@ -276,7 +276,7 @@ void KGridView::resizeEvent(TQResizeEvent*)
setSizes(); setSizes();
if(KIconEditProperties::self()->showRulers()) if(TDEIconEditProperties::self()->showRulers())
{ {
_hruler->setGeometry(_vruler->width(), 0, width(), _hruler->height()); _hruler->setGeometry(_vruler->width(), 0, width(), _hruler->height());
_vruler->setGeometry(0, _hruler->height(), _vruler->width(), height()); _vruler->setGeometry(0, _hruler->height(), _vruler->width(), height());
@ -290,7 +290,7 @@ void KGridView::resizeEvent(TQResizeEvent*)
} }
KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name) TDEIconEditGrid::TDEIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name)
: KColorGrid(parent, name, 1) : KColorGrid(parent, name, 1)
{ {
img = image; img = image;
@ -323,7 +323,7 @@ KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *paren
connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() )); connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() ));
createCursors(); createCursors();
KIconEditProperties *props = KIconEditProperties::self(); TDEIconEditProperties *props = TDEIconEditProperties::self();
setTransparencyDisplayType(props->transparencyDisplayType()); setTransparencyDisplayType(props->transparencyDisplayType());
setTransparencySolidColor(props->transparencySolidColor()); setTransparencySolidColor(props->transparencySolidColor());
@ -332,12 +332,12 @@ KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *paren
setCheckerboardSize(props->checkerboardSize()); setCheckerboardSize(props->checkerboardSize());
} }
KIconEditGrid::~KIconEditGrid() TDEIconEditGrid::~TDEIconEditGrid()
{ {
kdDebug(4640) << "KIconEditGrid - destructor: done" << endl; kdDebug(4640) << "TDEIconEditGrid - destructor: done" << endl;
} }
void KIconEditGrid::paintEvent(TQPaintEvent *e) void TDEIconEditGrid::paintEvent(TQPaintEvent *e)
{ {
const TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize()); const TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
const TQRect paintCellsRect = cellsRect.intersect(e->rect()); const TQRect paintCellsRect = cellsRect.intersect(e->rect());
@ -625,7 +625,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e)
} }
} }
void KIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e) void TDEIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e)
{ {
TQWMatrix matrix; TQWMatrix matrix;
@ -708,7 +708,7 @@ void KIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e)
} }
} }
void KIconEditGrid::mousePressEvent( TQMouseEvent *e ) void TDEIconEditGrid::mousePressEvent( TQMouseEvent *e )
{ {
if(!e || (e->button() != Qt::LeftButton)) if(!e || (e->button() != Qt::LeftButton))
return; return;
@ -749,7 +749,7 @@ void KIconEditGrid::mousePressEvent( TQMouseEvent *e )
} }
} }
void KIconEditGrid::mouseMoveEvent( TQMouseEvent *e ) void TDEIconEditGrid::mouseMoveEvent( TQMouseEvent *e )
{ {
if(!e) return; if(!e) return;
@ -884,7 +884,7 @@ void KIconEditGrid::mouseMoveEvent( TQMouseEvent *e )
emit changed(TQPixmap(p)); emit changed(TQPixmap(p));
} }
void KIconEditGrid::mouseReleaseEvent( TQMouseEvent *e ) void TDEIconEditGrid::mouseReleaseEvent( TQMouseEvent *e )
{ {
if(!e || (e->button() != Qt::LeftButton)) if(!e || (e->button() != Qt::LeftButton))
return; return;
@ -987,14 +987,14 @@ void KIconEditGrid::mouseReleaseEvent( TQMouseEvent *e )
//emit colorschanged(numColors(), data()); //emit colorschanged(numColors(), data());
} }
//void KIconEditGrid::setColorSelection( const TQColor &color ) //void TDEIconEditGrid::setColorSelection( const TQColor &color )
void KIconEditGrid::setColorSelection( uint c ) void TDEIconEditGrid::setColorSelection( uint c )
{ {
currentcolor = c; currentcolor = c;
emit colorSelected(currentcolor); emit colorSelected(currentcolor);
} }
void KIconEditGrid::loadBlank( int w, int h ) void TDEIconEditGrid::loadBlank( int w, int h )
{ {
img->create(w, h, 32); img->create(w, h, 32);
img->setAlphaBuffer(true); img->setAlphaBuffer(true);
@ -1009,9 +1009,9 @@ void KIconEditGrid::loadBlank( int w, int h )
void KIconEditGrid::load( TQImage *image) void TDEIconEditGrid::load( TQImage *image)
{ {
kdDebug(4640) << "KIconEditGrid::load" << endl; kdDebug(4640) << "TDEIconEditGrid::load" << endl;
setUpdatesEnabled(false); setUpdatesEnabled(false);
@ -1048,7 +1048,7 @@ void KIconEditGrid::load( TQImage *image)
history->clear(); history->clear();
} }
const TQPixmap &KIconEditGrid::pixmap() const TQPixmap &TDEIconEditGrid::pixmap()
{ {
if(!img->isNull()) if(!img->isNull())
p = *img; p = *img;
@ -1056,13 +1056,13 @@ const TQPixmap &KIconEditGrid::pixmap()
return(p); return(p);
} }
void KIconEditGrid::getImage(TQImage *image) void TDEIconEditGrid::getImage(TQImage *image)
{ {
kdDebug(4640) << "KIconEditGrid::getImage" << endl; kdDebug(4640) << "TDEIconEditGrid::getImage" << endl;
*image = *img; *image = *img;
} }
bool KIconEditGrid::zoomTo(int scale) bool TDEIconEditGrid::zoomTo(int scale)
{ {
TQApplication::setOverrideCursor(waitCursor); TQApplication::setOverrideCursor(waitCursor);
setUpdatesEnabled(false); setUpdatesEnabled(false);
@ -1077,7 +1077,7 @@ bool KIconEditGrid::zoomTo(int scale)
return true; return true;
} }
bool KIconEditGrid::zoom(Direction d) bool TDEIconEditGrid::zoom(Direction d)
{ {
int f = (d == DirIn) ? (cellSize()+1) : (cellSize()-1); int f = (d == DirIn) ? (cellSize()+1) : (cellSize()-1);
TQApplication::setOverrideCursor(waitCursor); TQApplication::setOverrideCursor(waitCursor);
@ -1093,7 +1093,7 @@ bool KIconEditGrid::zoom(Direction d)
return true; return true;
} }
void KIconEditGrid::checkClipboard() void TDEIconEditGrid::checkClipboard()
{ {
bool ok = false; bool ok = false;
TQImage tmp = clipboardImage(ok); TQImage tmp = clipboardImage(ok);
@ -1105,7 +1105,7 @@ void KIconEditGrid::checkClipboard()
} }
} }
TQImage KIconEditGrid::clipboardImage(bool &ok) TQImage TDEIconEditGrid::clipboardImage(bool &ok)
{ {
//###### Remove me later. //###### Remove me later.
//Workaround TQt bug -- check whether format provided first. //Workaround TQt bug -- check whether format provided first.
@ -1141,7 +1141,7 @@ TQImage KIconEditGrid::clipboardImage(bool &ok)
} }
void KIconEditGrid::editSelectAll() void TDEIconEditGrid::editSelectAll()
{ {
start.setX(0); start.setX(0);
start.setY(0); start.setY(0);
@ -1152,7 +1152,7 @@ void KIconEditGrid::editSelectAll()
emit newmessage(i18n("All selected")); emit newmessage(i18n("All selected"));
} }
void KIconEditGrid::editClear() void TDEIconEditGrid::editClear()
{ {
clearImage(img); clearImage(img);
fill(TRANSPARENT); fill(TRANSPARENT);
@ -1163,7 +1163,7 @@ void KIconEditGrid::editClear()
emit newmessage(i18n("Cleared")); emit newmessage(i18n("Cleared"));
} }
TQImage KIconEditGrid::getSelection(bool cut) TQImage TDEIconEditGrid::getSelection(bool cut)
{ {
const TQRect rect = pntarray.boundingRect(); const TQRect rect = pntarray.boundingRect();
int nx = 0, ny = 0, nw = 0, nh = 0; int nx = 0, ny = 0, nw = 0, nh = 0;
@ -1211,19 +1211,19 @@ TQImage KIconEditGrid::getSelection(bool cut)
return tmp; return tmp;
} }
void KIconEditGrid::editCopy(bool cut) void TDEIconEditGrid::editCopy(bool cut)
{ {
kapp->clipboard()->setImage(getSelection(cut)); kapp->clipboard()->setImage(getSelection(cut));
isselecting = false; isselecting = false;
} }
void KIconEditGrid::editPaste(bool paste) void TDEIconEditGrid::editPaste(bool paste)
{ {
bool ok = false; bool ok = false;
TQImage tmp = clipboardImage(ok); TQImage tmp = clipboardImage(ok);
KIconEditProperties *props = KIconEditProperties::self(); TDEIconEditProperties *props = TDEIconEditProperties::self();
if(ok) if(ok)
{ {
@ -1247,7 +1247,7 @@ void KIconEditGrid::editPaste(bool paste)
} }
else else
{ {
//kdDebug(4640) << "KIconEditGrid: Pasting at: " << insrect.x() << " x " << insrect.y() << endl; //kdDebug(4640) << "TDEIconEditGrid: Pasting at: " << insrect.x() << " x " << insrect.y() << endl;
TQApplication::setOverrideCursor(waitCursor); TQApplication::setOverrideCursor(waitCursor);
for(int y = insrect.y(), ny = 0; y < numRows() && ny < insrect.height(); y++, ny++) for(int y = insrect.y(), ny = 0; y < numRows() && ny < insrect.height(); y++, ny++)
@ -1362,7 +1362,7 @@ void KIconEditGrid::editPaste(bool paste)
} }
void KIconEditGrid::editPasteAsNew() void TDEIconEditGrid::editPasteAsNew()
{ {
bool ok = false; bool ok = false;
TQImage tmp = clipboardImage(ok); TQImage tmp = clipboardImage(ok);
@ -1371,7 +1371,7 @@ void KIconEditGrid::editPasteAsNew()
{ {
if(isModified()) if(isModified())
{ {
KIconEdit *w = new KIconEdit(tmp); TDEIconEdit *w = new TDEIconEdit(tmp);
TQ_CHECK_PTR(w); TQ_CHECK_PTR(w);
} }
else else
@ -1397,9 +1397,9 @@ void KIconEditGrid::editPasteAsNew()
} }
void KIconEditGrid::editResize() void TDEIconEditGrid::editResize()
{ {
kdDebug(4640) << "KIconGrid::editResize" << endl; kdDebug(4640) << "TDEIconGrid::editResize" << endl;
KResizeDialog *rs = new KResizeDialog(this, 0, TQSize(numCols(), numRows())); KResizeDialog *rs = new KResizeDialog(this, 0, TQSize(numCols(), numRows()));
if(rs->exec()) if(rs->exec())
{ {
@ -1413,7 +1413,7 @@ void KIconEditGrid::editResize()
} }
void KIconEditGrid::setSize(const TQSize s) void TDEIconEditGrid::setSize(const TQSize s)
{ {
kdDebug(4640) << "::setSize: " << s.width() << " x " << s.height() << endl; kdDebug(4640) << "::setSize: " << s.width() << " x " << s.height() << endl;
@ -1424,7 +1424,7 @@ void KIconEditGrid::setSize(const TQSize s)
} }
void KIconEditGrid::createCursors() void TDEIconEditGrid::createCursors()
{ {
TQBitmap mask(22, 22); TQBitmap mask(22, 22);
TQPixmap pix; TQPixmap pix;
@ -1435,7 +1435,7 @@ void KIconEditGrid::createCursors()
if(pix.isNull()) if(pix.isNull())
{ {
cursor_colorpicker = cursor_normal; cursor_colorpicker = cursor_normal;
kdDebug(4640) << "KIconEditGrid: Error loading colorpicker-cursor.xpm" << endl; kdDebug(4640) << "TDEIconEditGrid: Error loading colorpicker-cursor.xpm" << endl;
} }
else else
{ {
@ -1448,7 +1448,7 @@ void KIconEditGrid::createCursors()
if(pix.isNull()) if(pix.isNull())
{ {
cursor_paint = cursor_normal; cursor_paint = cursor_normal;
kdDebug(4640) << "KIconEditGrid: Error loading paintbrush.xpm" << endl; kdDebug(4640) << "TDEIconEditGrid: Error loading paintbrush.xpm" << endl;
} }
else else
{ {
@ -1461,7 +1461,7 @@ void KIconEditGrid::createCursors()
if(pix.isNull()) if(pix.isNull())
{ {
cursor_flood = cursor_normal; cursor_flood = cursor_normal;
kdDebug(4640) << "KIconEditGrid: Error loading fill-cursor.xpm" << endl; kdDebug(4640) << "TDEIconEditGrid: Error loading fill-cursor.xpm" << endl;
} }
else else
{ {
@ -1474,7 +1474,7 @@ void KIconEditGrid::createCursors()
if(pix.isNull()) if(pix.isNull())
{ {
cursor_aim = cursor_normal; cursor_aim = cursor_normal;
kdDebug(4640) << "KIconEditGrid: Error loading aim-cursor.xpm" << endl; kdDebug(4640) << "TDEIconEditGrid: Error loading aim-cursor.xpm" << endl;
} }
else else
{ {
@ -1487,7 +1487,7 @@ void KIconEditGrid::createCursors()
if(pix.isNull()) if(pix.isNull())
{ {
cursor_spray = cursor_normal; cursor_spray = cursor_normal;
kdDebug(4640) << "KIconEditGrid: Error loading airbrush-cursor.xpm" << endl; kdDebug(4640) << "TDEIconEditGrid: Error loading airbrush-cursor.xpm" << endl;
} }
else else
{ {
@ -1500,7 +1500,7 @@ void KIconEditGrid::createCursors()
if(pix.isNull()) if(pix.isNull())
{ {
cursor_erase = cursor_normal; cursor_erase = cursor_normal;
kdDebug(4640) << "KIconEditGrid: Error loading eraser-cursor.xpm" << endl; kdDebug(4640) << "TDEIconEditGrid: Error loading eraser-cursor.xpm" << endl;
} }
else else
{ {
@ -1512,7 +1512,7 @@ void KIconEditGrid::createCursors()
void KIconEditGrid::setTool(DrawTool t) void TDEIconEditGrid::setTool(DrawTool t)
{ {
btndown = false; btndown = false;
tool = t; tool = t;
@ -1560,7 +1560,7 @@ void KIconEditGrid::setTool(DrawTool t)
} }
void KIconEditGrid::drawFlood(int x, int y, uint oldcolor) void TDEIconEditGrid::drawFlood(int x, int y, uint oldcolor)
{ {
if((!img->valid(x, y)) if((!img->valid(x, y))
|| (colorAt((y * numCols())+x) != oldcolor) || (colorAt((y * numCols())+x) != oldcolor)
@ -1580,7 +1580,7 @@ void KIconEditGrid::drawFlood(int x, int y, uint oldcolor)
} }
void KIconEditGrid::drawSpray(TQPoint point) void TDEIconEditGrid::drawSpray(TQPoint point)
{ {
int x = (point.x()-5); int x = (point.x()-5);
int y = (point.y()-5); int y = (point.y()-5);
@ -1601,7 +1601,7 @@ void KIconEditGrid::drawSpray(TQPoint point)
//This routine is from TQt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled //This routine is from TQt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled
//It seems like KIconEdit relied on the TQt1 semantics for makeEllipse, which broke //It seems like TDEIconEdit relied on the TQt1 semantics for makeEllipse, which broke
//the tool with reasonably recent TQt versions. //the tool with reasonably recent TQt versions.
//Thankfully, TQt includes the old code #ifdef'd, which is hence included here //Thankfully, TQt includes the old code #ifdef'd, which is hence included here
static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h ) static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h )
@ -1677,7 +1677,7 @@ static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h )
void KIconEditGrid::drawEllipse(bool drawit) void TDEIconEditGrid::drawEllipse(bool drawit)
{ {
if(drawit) if(drawit)
{ {
@ -1744,7 +1744,7 @@ void KIconEditGrid::drawEllipse(bool drawit)
} }
void KIconEditGrid::drawRect(bool drawit) void TDEIconEditGrid::drawRect(bool drawit)
{ {
if(drawit) if(drawit)
{ {
@ -1806,7 +1806,7 @@ void KIconEditGrid::drawRect(bool drawit)
} }
void KIconEditGrid::drawLine(bool drawit, bool drawStraight) void TDEIconEditGrid::drawLine(bool drawit, bool drawStraight)
{ {
if(drawit) if(drawit)
{ {
@ -1886,7 +1886,7 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight)
} }
void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action) void TDEIconEditGrid::drawPointArray(TQPointArray a, DrawAction action)
{ {
TQRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1, TQRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
a.boundingRect().width()*cellSize()+1, a.boundingRect().height()*cellSize()+1 ); a.boundingRect().width()*cellSize()+1, a.boundingRect().height()*cellSize()+1 );
@ -1952,20 +1952,20 @@ void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action)
history->addCommand( macro, false ); } history->addCommand( macro, false ); }
} }
void KIconEditGrid::updatePreviewPixmap() void TDEIconEditGrid::updatePreviewPixmap()
{ {
p = *img; p = *img;
emit changed(TQPixmap(p)); emit changed(TQPixmap(p));
} }
bool KIconEditGrid::isMarked(TQPoint point) bool TDEIconEditGrid::isMarked(TQPoint point)
{ {
return isMarked(point.x(), point.y()); return isMarked(point.x(), point.y());
} }
bool KIconEditGrid::isMarked(int x, int y) bool TDEIconEditGrid::isMarked(int x, int y)
{ {
if(((y * numCols()) + x) == selected) if(((y * numCols()) + x) == selected)
return true; return true;
@ -2157,7 +2157,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
} }
// this doesn't work the way it should but the way KPixmap does. // this doesn't work the way it should but the way KPixmap does.
void KIconEditGrid::mapToKDEPalette() void TDEIconEditGrid::mapToKDEPalette()
{ {
TQImage dest; TQImage dest;
@ -2207,7 +2207,7 @@ void KIconEditGrid::mapToKDEPalette()
} }
void KIconEditGrid::grayScale() void TDEIconEditGrid::grayScale()
{ {
for(int y = 0; y < numRows(); y++) for(int y = 0; y < numRows(); y++)
{ {
@ -2227,7 +2227,7 @@ void KIconEditGrid::grayScale()
} }
void KIconEditGrid::clearImage(TQImage *image) void TDEIconEditGrid::clearImage(TQImage *image)
{ {
if(image->depth() != 32) if(image->depth() != 32)
{ {
@ -2249,7 +2249,7 @@ void KIconEditGrid::clearImage(TQImage *image)
} }
void KIconEditGrid::setModified(bool m) void TDEIconEditGrid::setModified(bool m)
{ {
if(m != modified) if(m != modified)
{ {

@ -33,7 +33,7 @@
class KCommandHistory; class KCommandHistory;
class KRuler; class KRuler;
class KIconEditGrid; class TDEIconEditGrid;
class TQScrollView; class TQScrollView;
enum Direction { enum Direction {
@ -44,7 +44,7 @@ enum Direction {
class DrawCommand : public KCommand { class DrawCommand : public KCommand {
public: public:
DrawCommand( int xx, int yy, uint newcol, TQImage* img, KIconEditGrid* g ) { DrawCommand( int xx, int yy, uint newcol, TQImage* img, TDEIconEditGrid* g ) {
x = xx; x = xx;
y = yy; y = yy;
newcolor = newcol; newcolor = newcol;
@ -64,12 +64,12 @@ class DrawCommand : public KCommand {
uint newcolor; uint newcolor;
uint oldcolor; uint oldcolor;
TQImage* image; TQImage* image;
KIconEditGrid* grid; TDEIconEditGrid* grid;
}; };
class RepaintCommand : public KCommand { class RepaintCommand : public KCommand {
public: public:
RepaintCommand( TQRect a, KIconEditGrid* g ) { RepaintCommand( TQRect a, TDEIconEditGrid* g ) {
area = a; area = a;
grid = g; grid = g;
} }
@ -83,7 +83,7 @@ class RepaintCommand : public KCommand {
return "repainted"; return "repainted";
} }
protected: protected:
KIconEditGrid* grid; TDEIconEditGrid* grid;
TQRect area; TQRect area;
}; };
@ -97,7 +97,7 @@ public:
KRuler *hruler() { return _hruler;} KRuler *hruler() { return _hruler;}
KRuler *vruler() { return _vruler;} KRuler *vruler() { return _vruler;}
TQFrame *corner() { return _corner;} TQFrame *corner() { return _corner;}
KIconEditGrid *grid() { return _grid; } TDEIconEditGrid *grid() { return _grid; }
void setShowRulers(bool mode); void setShowRulers(bool mode);
void setAcceptDrop(bool a); void setAcceptDrop(bool a);
const TQRect viewRect(); const TQRect viewRect();
@ -117,25 +117,25 @@ protected:
void setSizes(); void setSizes();
TQFrame *_corner; TQFrame *_corner;
KIconEditGrid *_grid; TDEIconEditGrid *_grid;
KRuler *_hruler, *_vruler; KRuler *_hruler, *_vruler;
TQScrollView *viewport; TQScrollView *viewport;
bool acceptdrop; bool acceptdrop;
}; };
/** /**
* KIconEditGrid * TDEIconEditGrid
* @short KIconEditGrid * @short TDEIconEditGrid
* @author Thomas Tanghus <tanghus@kde.org> * @author Thomas Tanghus <tanghus@kde.org>
* @version 0.3 * @version 0.3
*/ */
class KIconEditGrid : public KColorGrid class TDEIconEditGrid : public KColorGrid
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0); TDEIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0);
virtual ~KIconEditGrid(); virtual ~TDEIconEditGrid();
enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle, enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle,
FilledCircle, Ellipse, FilledEllipse, Eraser, SelectRect, SelectCircle, Find }; FilledCircle, Ellipse, FilledEllipse, Eraser, SelectRect, SelectCircle, Find };

@ -33,49 +33,49 @@
#include "knew.h" #include "knew.h"
KIconTemplateContainer* KIconTemplateContainer::instance = 0; TDEIconTemplateContainer* TDEIconTemplateContainer::instance = 0;
void createStandardTemplates(KIconTemplateContainer *list) void createStandardTemplates(TDEIconTemplateContainer *list)
{ {
KIconLoader *kil = TDEGlobal::iconLoader(); TDEIconLoader *kil = TDEGlobal::iconLoader();
KIconTemplate it; TDEIconTemplate it;
it.path = kil->iconPath("standard", KIcon::User); it.path = kil->iconPath("standard", TDEIcon::User);
it.title = i18n("Standard File"); it.title = i18n("Standard File");
list->append(it); list->append(it);
it.path = kil->iconPath("source", KIcon::User); it.path = kil->iconPath("source", TDEIcon::User);
it.title = i18n("Source File"); it.title = i18n("Source File");
list->append(it); list->append(it);
it.path = kil->iconPath("compressed", KIcon::User); it.path = kil->iconPath("compressed", TDEIcon::User);
it.title = i18n("Compressed File"); it.title = i18n("Compressed File");
list->append(it); list->append(it);
it.path = kil->iconPath("folder", KIcon::User); it.path = kil->iconPath("folder", TDEIcon::User);
it.title = i18n("Standard Folder"); it.title = i18n("Standard Folder");
list->append(it); list->append(it);
it.path = kil->iconPath("package", KIcon::User); it.path = kil->iconPath("package", TDEIcon::User);
it.title = i18n("Standard Package"); it.title = i18n("Standard Package");
list->append(it); list->append(it);
it.path = kil->iconPath("mini-folder", KIcon::User); it.path = kil->iconPath("mini-folder", TDEIcon::User);
it.title = i18n("Mini Folder"); it.title = i18n("Mini Folder");
list->append(it); list->append(it);
it.path = kil->iconPath("mini-package", KIcon::User); it.path = kil->iconPath("mini-package", TDEIcon::User);
it.title = i18n("Mini Package"); it.title = i18n("Mini Package");
list->append(it); list->append(it);
} }
void KIconTemplateContainer::save() void TDEIconTemplateContainer::save()
{ {
TDEConfig *k = kapp->config(); TDEConfig *k = kapp->config();
k->setGroup("Templates"); k->setGroup("Templates");
TQStringList names; TQStringList names;
for (TQValueListIterator<KIconTemplate> iter = begin(); iter != end(); iter++) for (TQValueListIterator<TDEIconTemplate> iter = begin(); iter != end(); iter++)
{ {
names.append((*iter).title); names.append((*iter).title);
} }
@ -88,7 +88,7 @@ void KIconTemplateContainer::save()
} }
} }
KIconTemplateContainer::KIconTemplateContainer() : TQValueList<KIconTemplate>() TDEIconTemplateContainer::TDEIconTemplateContainer() : TQValueList<TDEIconTemplate>()
{ {
TQStrList names; TQStrList names;
TDEConfig *k = kapp->config(); TDEConfig *k = kapp->config();
@ -96,7 +96,7 @@ KIconTemplateContainer::KIconTemplateContainer() : TQValueList<KIconTemplate>()
k->readListEntry("Names", names); k->readListEntry("Names", names);
for(int i = 0; i < (int)names.count(); i++) for(int i = 0; i < (int)names.count(); i++)
{ {
KIconTemplate it; TDEIconTemplate it;
it.path = k->readPathEntry(names.at(i)); it.path = k->readPathEntry(names.at(i));
it.title = names.at(i); it.title = names.at(i);
//kdDebug(4640) << "Template: " << names.at(i) << "\n" << path.data() << endl; //kdDebug(4640) << "Template: " << names.at(i) << "\n" << path.data() << endl;
@ -109,21 +109,21 @@ KIconTemplateContainer::KIconTemplateContainer() : TQValueList<KIconTemplate>()
} }
} }
KIconTemplateContainer::~KIconTemplateContainer() TDEIconTemplateContainer::~TDEIconTemplateContainer()
{ {
clear(); clear();
} }
KIconListBoxItem::KIconListBoxItem( KIconTemplate t ) TDEIconListBoxItem::TDEIconListBoxItem( TDEIconTemplate t )
: TQListBoxItem(), icontemplate(t) : TQListBoxItem(), icontemplate(t)
{ {
//kdDebug(4640) << "KIconListBoxItem - " << t->path.data() << ", " << t->title.data() << endl; //kdDebug(4640) << "TDEIconListBoxItem - " << t->path.data() << ", " << t->title.data() << endl;
pm.load(t.path); pm.load(t.path);
setText( t.title ); setText( t.title );
} }
void KIconListBoxItem::reloadIcon() void TDEIconListBoxItem::reloadIcon()
{ {
pm.load(icontemplate.path); pm.load(icontemplate.path);
setText( icontemplate.title ); setText( icontemplate.title );
@ -131,7 +131,7 @@ void KIconListBoxItem::reloadIcon()
void KIconListBoxItem::paint( TQPainter *p ) void TDEIconListBoxItem::paint( TQPainter *p )
{ {
p->drawPixmap( 3, 0, pm ); p->drawPixmap( 3, 0, pm );
TQFontMetrics fm = p->fontMetrics(); TQFontMetrics fm = p->fontMetrics();
@ -143,12 +143,12 @@ void KIconListBoxItem::paint( TQPainter *p )
p->drawText( pm.width() + 5, yPos, text() ); p->drawText( pm.width() + 5, yPos, text() );
} }
int KIconListBoxItem::height(const TQListBox *lb ) const int TDEIconListBoxItem::height(const TQListBox *lb ) const
{ {
return TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 ); return TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 );
} }
int KIconListBoxItem::width(const TQListBox *lb ) const int TDEIconListBoxItem::width(const TQListBox *lb ) const
{ {
return pm.width() + lb->fontMetrics().width( text() ) + 6; return pm.width() + lb->fontMetrics().width( text() ) + 6;
} }
@ -202,12 +202,12 @@ NewFromTemplate::NewFromTemplate( TQWidget* parent )
TQHBoxLayout* l = new TQHBoxLayout( grp, 15 ); TQHBoxLayout* l = new TQHBoxLayout( grp, 15 );
templates = new KIconListBox( grp ); templates = new TDEIconListBox( grp );
connect( templates, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( checkSelection( int ) ) ); connect( templates, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( checkSelection( int ) ) );
l->addWidget( templates ); l->addWidget( templates );
for( int i = 0; i < (int) KIconTemplateContainer::self()->count(); i++ ) for( int i = 0; i < (int) TDEIconTemplateContainer::self()->count(); i++ )
templates->insertItem( new KIconListBoxItem( *KIconTemplateContainer::self()->at( i ) ) ); templates->insertItem( new TDEIconListBoxItem( *TDEIconTemplateContainer::self()->at( i ) ) );
} }
NewFromTemplate::~NewFromTemplate() NewFromTemplate::~NewFromTemplate()

@ -30,26 +30,26 @@
#include "kresize.h" #include "kresize.h"
class KIconListBox; class TDEIconListBox;
class KIconTemplateContainer; class TDEIconTemplateContainer;
class TQButtonGroup; class TQButtonGroup;
class TQRadioButton; class TQRadioButton;
class TQGroupBox; class TQGroupBox;
struct KIconTemplate struct TDEIconTemplate
{ {
TQString path; TQString path;
TQString title; TQString title;
}; };
class KIconListBoxItem : public TQListBoxItem class TDEIconListBoxItem : public TQListBoxItem
{ {
public: public:
KIconListBoxItem( KIconTemplate ); TDEIconListBoxItem( TDEIconTemplate );
const TQString path() { return icontemplate.path; } const TQString path() { return icontemplate.path; }
KIconTemplate& iconTemplate() { return icontemplate; } TDEIconTemplate& iconTemplate() { return icontemplate; }
void reloadIcon(); void reloadIcon();
protected: protected:
@ -58,40 +58,40 @@ protected:
virtual int width( const TQListBox * ) const; virtual int width( const TQListBox * ) const;
private: private:
TQPixmap pm; TQPixmap pm;
KIconTemplate icontemplate; TDEIconTemplate icontemplate;
}; };
class KIconListBox : public TQListBox class TDEIconListBox : public TQListBox
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconListBox( TQWidget *parent ) : TQListBox(parent) {} ; TDEIconListBox( TQWidget *parent ) : TQListBox(parent) {} ;
const TQString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); } const TQString path(int idx) { return ((TDEIconListBoxItem*)item(idx))->path(); }
KIconTemplate& iconTemplate(int idx) { return ((KIconListBoxItem*)item(idx))->iconTemplate(); } TDEIconTemplate& iconTemplate(int idx) { return ((TDEIconListBoxItem*)item(idx))->iconTemplate(); }
}; };
class KIconTemplateContainer : public TQValueList<KIconTemplate> class TDEIconTemplateContainer : public TQValueList<TDEIconTemplate>
{ {
public: public:
static KIconTemplateContainer* self() static TDEIconTemplateContainer* self()
{ {
if (!instance) if (!instance)
instance = new KIconTemplateContainer; instance = new TDEIconTemplateContainer;
return instance; return instance;
} }
void save(); void save();
private: private:
static KIconTemplateContainer* instance; static TDEIconTemplateContainer* instance;
const KIconTemplateContainer operator = (const KIconTemplateContainer&); const TDEIconTemplateContainer operator = (const TDEIconTemplateContainer&);
KIconTemplateContainer(const KIconTemplateContainer&); TDEIconTemplateContainer(const TDEIconTemplateContainer&);
KIconTemplateContainer(); TDEIconTemplateContainer();
~KIconTemplateContainer(); ~TDEIconTemplateContainer();
}; };
class NewSelect : public TQWidget class NewSelect : public TQWidget
@ -128,7 +128,7 @@ public slots:
void checkSelection(int); void checkSelection(int);
protected: protected:
KIconListBox *templates; TDEIconListBox *templates;
KWizard *wiz; KWizard *wiz;
TQGroupBox *grp; TQGroupBox *grp;
}; };

@ -42,7 +42,7 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
TDEAboutData aboutData( "kiconedit", I18N_NOOP("KIconEdit"), TDEAboutData aboutData( "kiconedit", I18N_NOOP("TDEIconEdit"),
VERSION, description, TDEAboutData::License_GPL, VERSION, description, TDEAboutData::License_GPL,
"(c) 1998, Thomas Tanghus"); "(c) 1998, Thomas Tanghus");
@ -63,27 +63,27 @@ int main(int argc, char **argv)
if (a.isRestored()) if (a.isRestored())
{ {
RESTORE(KIconEdit); RESTORE(TDEIconEdit);
} }
else else
{ {
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
for(int i = 0; i < args->count(); i++) for(int i = 0; i < args->count(); i++)
{ {
KIconEdit *ki = new KIconEdit(args->url(i), "kiconedit"); TDEIconEdit *ki = new TDEIconEdit(args->url(i), "kiconedit");
TQ_CHECK_PTR(ki); TQ_CHECK_PTR(ki);
} }
if (args->count() == 0) if (args->count() == 0)
{ {
KIconEdit *ki = new KIconEdit; TDEIconEdit *ki = new TDEIconEdit;
TQ_CHECK_PTR(ki); TQ_CHECK_PTR(ki);
} }
args->clear(); args->clear();
} }
int rc = a.exec(); int rc = a.exec();
delete KIconEditProperties::self(); delete TDEIconEditProperties::self();
return rc; return rc;
} }

@ -24,16 +24,16 @@
#include "properties.h" #include "properties.h"
KIconEditProperties* KIconEditProperties::m_self = 0; TDEIconEditProperties* TDEIconEditProperties::m_self = 0;
KIconEditProperties* KIconEditProperties::self() TDEIconEditProperties* TDEIconEditProperties::self()
{ {
if (!m_self) if (!m_self)
m_self = new KIconEditProperties(); m_self = new TDEIconEditProperties();
return m_self; return m_self;
} }
KIconEditProperties::KIconEditProperties() : TQObject() TDEIconEditProperties::TDEIconEditProperties() : TQObject()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
@ -51,11 +51,11 @@ KIconEditProperties::KIconEditProperties() : TQObject()
if(config->readEntry( "TransparencyDisplayType", "Checkerboard" ) == "Checkerboard") if(config->readEntry( "TransparencyDisplayType", "Checkerboard" ) == "Checkerboard")
{ {
m_transparencyDisplayType = KIconEditGrid::TRD_CHECKERBOARD; m_transparencyDisplayType = TDEIconEditGrid::TRD_CHECKERBOARD;
} }
else else
{ {
m_transparencyDisplayType = KIconEditGrid::TRD_SOLIDCOLOR; m_transparencyDisplayType = TDEIconEditGrid::TRD_SOLIDCOLOR;
} }
TQColor checkColor1(255, 255, 255); TQColor checkColor1(255, 255, 255);
@ -68,29 +68,29 @@ KIconEditProperties::KIconEditProperties() : TQObject()
if(checkerboardSize == "Small") if(checkerboardSize == "Small")
{ {
m_checkerboardSize = KIconEditGrid::CHK_SMALL; m_checkerboardSize = TDEIconEditGrid::CHK_SMALL;
} }
else else
if(checkerboardSize == "Medium") if(checkerboardSize == "Medium")
{ {
m_checkerboardSize = KIconEditGrid::CHK_MEDIUM; m_checkerboardSize = TDEIconEditGrid::CHK_MEDIUM;
} }
else else
{ {
m_checkerboardSize = KIconEditGrid::CHK_LARGE; m_checkerboardSize = TDEIconEditGrid::CHK_LARGE;
} }
TQColor solidColor(255, 255, 255); TQColor solidColor(255, 255, 255);
m_transparencySolidColor = config->readColorEntry( "TransparencySolidColor", &solidColor); m_transparencySolidColor = config->readColorEntry( "TransparencySolidColor", &solidColor);
} }
KIconEditProperties::~KIconEditProperties() TDEIconEditProperties::~TDEIconEditProperties()
{ {
kdDebug(4640) << "KIconEditProperties: Deleting properties" << endl; kdDebug(4640) << "TDEIconEditProperties: Deleting properties" << endl;
m_self = 0; m_self = 0;
} }
void KIconEditProperties::save() void TDEIconEditProperties::save()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
@ -110,10 +110,10 @@ void KIconEditProperties::save()
switch(m_transparencyDisplayType) switch(m_transparencyDisplayType)
{ {
case KIconEditGrid::TRD_SOLIDCOLOR: case TDEIconEditGrid::TRD_SOLIDCOLOR:
transparencyDisplayType = "SolidColor"; transparencyDisplayType = "SolidColor";
break; break;
case KIconEditGrid::TRD_CHECKERBOARD: case TDEIconEditGrid::TRD_CHECKERBOARD:
default: default:
transparencyDisplayType = "Checkerboard"; transparencyDisplayType = "Checkerboard";
break; break;
@ -127,13 +127,13 @@ void KIconEditProperties::save()
switch(m_checkerboardSize) switch(m_checkerboardSize)
{ {
case KIconEditGrid::CHK_SMALL: case TDEIconEditGrid::CHK_SMALL:
checkerboardSize = "Small"; checkerboardSize = "Small";
break; break;
case KIconEditGrid::CHK_MEDIUM: case TDEIconEditGrid::CHK_MEDIUM:
checkerboardSize = "Medium"; checkerboardSize = "Medium";
break; break;
case KIconEditGrid::CHK_LARGE: case TDEIconEditGrid::CHK_LARGE:
default: default:
checkerboardSize = "Large"; checkerboardSize = "Large";
break; break;

@ -26,11 +26,11 @@
#include "kicongrid.h" #include "kicongrid.h"
class KIconEditProperties : public TQObject class TDEIconEditProperties : public TQObject
{ {
public: public:
static KIconEditProperties* self(); static TDEIconEditProperties* self();
~KIconEditProperties(); ~TDEIconEditProperties();
TQString bgPixmap() { return m_bgPixmap; } TQString bgPixmap() { return m_bgPixmap; }
TQColor bgColor() { return m_bgColor; } TQColor bgColor() { return m_bgColor; }
@ -40,10 +40,10 @@ public:
bool showRulers() { return m_showRulers; } bool showRulers() { return m_showRulers; }
int gridScale() { return m_gridScale; } int gridScale() { return m_gridScale; }
KIconEditGrid::TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; } TDEIconEditGrid::TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
TQColor checkerboardColor1() const { return m_checkerboardColor1; } TQColor checkerboardColor1() const { return m_checkerboardColor1; }
TQColor checkerboardColor2() const { return m_checkerboardColor2; } TQColor checkerboardColor2() const { return m_checkerboardColor2; }
KIconEditGrid::CheckerboardSize checkerboardSize() const { return m_checkerboardSize; } TDEIconEditGrid::CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
TQColor transparencySolidColor() const { return m_transparencySolidColor; } TQColor transparencySolidColor() const { return m_transparencySolidColor; }
void setBgPixmap( const TQString &p ) { m_bgPixmap = p; } void setBgPixmap( const TQString &p ) { m_bgPixmap = p; }
@ -53,16 +53,16 @@ public:
void setPasteTransparent( bool b ) { m_pasteTransparent = b; } void setPasteTransparent( bool b ) { m_pasteTransparent = b; }
void setShowRulers( bool b ) { m_showRulers = b; } void setShowRulers( bool b ) { m_showRulers = b; }
void setGridScale( int s ) { m_gridScale = s; } void setGridScale( int s ) { m_gridScale = s; }
void setTransparencyDisplayType(KIconEditGrid::TransparencyDisplayType t) { m_transparencyDisplayType = t; } void setTransparencyDisplayType(TDEIconEditGrid::TransparencyDisplayType t) { m_transparencyDisplayType = t; }
void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; } void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; } void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
void setCheckerboardSize(KIconEditGrid::CheckerboardSize size) { m_checkerboardSize = size; } void setCheckerboardSize(TDEIconEditGrid::CheckerboardSize size) { m_checkerboardSize = size; }
void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; } void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
void save(); void save();
protected: protected:
KIconEditProperties(); TDEIconEditProperties();
TQString m_bgPixmap; TQString m_bgPixmap;
TQColor m_bgColor; TQColor m_bgColor;
TQWidget::BackgroundMode m_bgMode; TQWidget::BackgroundMode m_bgMode;
@ -70,13 +70,13 @@ protected:
bool m_pasteTransparent; bool m_pasteTransparent;
bool m_showRulers; bool m_showRulers;
int m_gridScale; int m_gridScale;
KIconEditGrid::TransparencyDisplayType m_transparencyDisplayType; TDEIconEditGrid::TransparencyDisplayType m_transparencyDisplayType;
TQColor m_checkerboardColor1; TQColor m_checkerboardColor1;
TQColor m_checkerboardColor2; TQColor m_checkerboardColor2;
KIconEditGrid::CheckerboardSize m_checkerboardSize; TDEIconEditGrid::CheckerboardSize m_checkerboardSize;
TQColor m_transparencySolidColor; TQColor m_transparencySolidColor;
static KIconEditProperties* m_self; static TDEIconEditProperties* m_self;
}; };
#endif //__PROPS_H__ #endif //__PROPS_H__

@ -606,13 +606,13 @@ static TQIconSet toolButtonIconSet (const TQString &iconName)
TQPixmap disabledIcon = TDEGlobal::iconLoader ()->iconEffect ()->apply ( TQPixmap disabledIcon = TDEGlobal::iconLoader ()->iconEffect ()->apply (
UserIcon (iconName), UserIcon (iconName),
KIcon::Toolbar, KIcon::DisabledState); TDEIcon::Toolbar, TDEIcon::DisabledState);
const TQPixmap iconSetNormalIcon = iconSet.pixmap (TQIconSet::Small, const TQPixmap iconSetNormalIcon = iconSet.pixmap (TQIconSet::Small,
TQIconSet::Normal); TQIconSet::Normal);
// I bet past or future versions of KIconEffect::apply() resize the // I bet past or future versions of TDEIconEffect::apply() resize the
// disabled icon if we claim it's in group KIcon::Toolbar. So resize // disabled icon if we claim it's in group TDEIcon::Toolbar. So resize
// it to match the TQIconSet::Normal icon, just in case. // it to match the TQIconSet::Normal icon, just in case.
disabledIcon = kpPixmapFX::scale (disabledIcon, disabledIcon = kpPixmapFX::scale (disabledIcon,
iconSetNormalIcon.width (), iconSetNormalIcon.width (),

@ -206,9 +206,9 @@ int kpToolToolBar::defaultIconSize ()
#endif #endif
if (desktopSize.width () >= 1024 && desktopSize.height () >= 768) if (desktopSize.width () >= 1024 && desktopSize.height () >= 768)
m_defaultIconSize = KIcon::SizeSmallMedium/*22x22*/; m_defaultIconSize = TDEIcon::SizeSmallMedium/*22x22*/;
else else
m_defaultIconSize = KIcon::SizeSmall/*16x16*/; m_defaultIconSize = TDEIcon::SizeSmall/*16x16*/;
} }

@ -75,7 +75,7 @@ void KookaPreferences::setupOCRPage()
konf->setGroup( CFG_GROUP_OCR_DIA ); konf->setGroup( CFG_GROUP_OCR_DIA );
TQFrame *page = addPage( i18n("OCR"), i18n("Optical Character Recognition" ), TQFrame *page = addPage( i18n("OCR"), i18n("Optical Character Recognition" ),
BarIcon("ocrImage", KIcon::SizeMedium ) ); BarIcon("ocrImage", TDEIcon::SizeMedium ) );
TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
@ -309,7 +309,7 @@ void KookaPreferences::setupStartupPage()
konf->setGroup( GROUP_STARTUP ); konf->setGroup( GROUP_STARTUP );
TQFrame *page = addPage( i18n("Startup"), i18n("Kooka Startup Preferences" ), TQFrame *page = addPage( i18n("Startup"), i18n("Kooka Startup Preferences" ),
BarIcon("gear", KIcon::SizeMedium ) ); BarIcon("gear", TDEIcon::SizeMedium ) );
TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
/* Description-Label */ /* Description-Label */
top->addWidget( new TQLabel( i18n("Note that changing these options will affect Kooka's next start!"), page )); top->addWidget( new TQLabel( i18n("Note that changing these options will affect Kooka's next start!"), page ));
@ -351,7 +351,7 @@ void KookaPreferences::setupSaveFormatPage( )
{ {
konf->setGroup( OP_FILE_GROUP ); konf->setGroup( OP_FILE_GROUP );
TQFrame *page = addPage( i18n("Image Saving"), i18n("Configure Image Save Assistant" ), TQFrame *page = addPage( i18n("Image Saving"), i18n("Configure Image Save Assistant" ),
BarIcon("filesave", KIcon::SizeMedium ) ); BarIcon("filesave", TDEIcon::SizeMedium ) );
TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
/* Skip the format asking if a format entry exists */ /* Skip the format asking if a format entry exists */
@ -377,7 +377,7 @@ void KookaPreferences::setupThumbnailPage()
konf->setGroup( THUMB_GROUP ); konf->setGroup( THUMB_GROUP );
TQFrame *page = addPage( i18n("Thumbnail View"), i18n("Thumbnail Gallery View" ), TQFrame *page = addPage( i18n("Thumbnail View"), i18n("Thumbnail Gallery View" ),
BarIcon("thumbnail", KIcon::SizeMedium ) ); BarIcon("thumbnail", TDEIcon::SizeMedium ) );
TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() ); TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
top->addWidget( new TQLabel( i18n("Here you can configure the appearance of the thumbnail view of your scan picture gallery."),page )); top->addWidget( new TQLabel( i18n("Here you can configure the appearance of the thumbnail view of your scan picture gallery."),page ));

@ -96,12 +96,12 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
m_mainWindow(parent), m_mainWindow(parent),
m_ocrResEdit(0) m_ocrResEdit(0)
{ {
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
scan_params = 0L; scan_params = 0L;
preview_canvas = 0L; preview_canvas = 0L;
m_mainDock = parent->createDockWidget( "Kookas MainDock", m_mainDock = parent->createDockWidget( "Kookas MainDock",
loader->loadIcon( "folder_image", KIcon::Small ), loader->loadIcon( "folder_image", TDEIcon::Small ),
0L, i18n("Image Viewer")); 0L, i18n("Image Viewer"));
m_mainDock->setEnableDocking(KDockWidget::DockNone ); m_mainDock->setEnableDocking(KDockWidget::DockNone );
m_mainDock->setDockSite( KDockWidget::DockFullSite ); m_mainDock->setDockSite( KDockWidget::DockFullSite );
@ -122,7 +122,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
/** Thumbview **/ /** Thumbview **/
m_dockThumbs = parent->createDockWidget( "Thumbs", m_dockThumbs = parent->createDockWidget( "Thumbs",
loader->loadIcon( "thumbnail", KIcon::Small ), loader->loadIcon( "thumbnail", TDEIcon::Small ),
0L, i18n("Thumbnails")); 0L, i18n("Thumbnails"));
m_dockThumbs->setDockSite(KDockWidget::DockFullSite ); m_dockThumbs->setDockSite(KDockWidget::DockFullSite );
@ -137,7 +137,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
/** Packager Dock **/ /** Packager Dock **/
/* A new packager to contain the already scanned images */ /* A new packager to contain the already scanned images */
m_dockPackager = parent->createDockWidget( "Scanpackager", m_dockPackager = parent->createDockWidget( "Scanpackager",
loader->loadIcon( "palette_color", KIcon::Small ), loader->loadIcon( "palette_color", TDEIcon::Small ),
0L, i18n("Gallery")); 0L, i18n("Gallery"));
m_dockPackager->setDockSite(KDockWidget::DockFullSite); m_dockPackager->setDockSite(KDockWidget::DockFullSite);
packager = new ScanPackager( m_dockPackager ); packager = new ScanPackager( m_dockPackager );
@ -156,7 +156,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
* Create a Kombobox that holds the last folders visible even on the preview page * Create a Kombobox that holds the last folders visible even on the preview page
*/ */
m_dockRecent = parent->createDockWidget( "Recent", m_dockRecent = parent->createDockWidget( "Recent",
loader->loadIcon( "image", KIcon::Small ), loader->loadIcon( "image", TDEIcon::Small ),
0L, i18n("Gallery Folders")); 0L, i18n("Gallery Folders"));
m_dockRecent->setDockSite(KDockWidget::DockFullSite); m_dockRecent->setDockSite(KDockWidget::DockFullSite);
@ -185,7 +185,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
/* the object from the kscan lib to handle low level scanning */ /* the object from the kscan lib to handle low level scanning */
m_dockScanParam = parent->createDockWidget( "Scan Parameter", m_dockScanParam = parent->createDockWidget( "Scan Parameter",
loader->loadIcon( "folder", KIcon::Small ), loader->loadIcon( "folder", TDEIcon::Small ),
0L, i18n("Scan Parameter")); 0L, i18n("Scan Parameter"));
// //
m_dockScanParam->setDockSite(KDockWidget::DockFullSite); m_dockScanParam->setDockSite(KDockWidget::DockFullSite);
@ -204,7 +204,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
* scan_params must be zero for that */ * scan_params must be zero for that */
m_dockPreview = parent->createDockWidget( "Preview ", m_dockPreview = parent->createDockWidget( "Preview ",
loader->loadIcon( "viewmag", KIcon::Small ), loader->loadIcon( "viewmag", TDEIcon::Small ),
0L, i18n("Scan Preview")); 0L, i18n("Scan Preview"));
preview_canvas = new Previewer( m_dockPreview ); preview_canvas = new Previewer( m_dockPreview );
@ -223,7 +223,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
/* Create a text editor part for ocr results */ /* Create a text editor part for ocr results */
m_dockOCRText = parent->createDockWidget( "OCRResults", m_dockOCRText = parent->createDockWidget( "OCRResults",
loader->loadIcon("edit", KIcon::Small ), loader->loadIcon("edit", TDEIcon::Small ),
0L, i18n("OCR Result Text")); 0L, i18n("OCR Result Text"));
// m_textEdit // m_textEdit
m_ocrResEdit = new ocrResEdit( m_dockOCRText ); m_ocrResEdit = new ocrResEdit( m_dockOCRText );

@ -87,7 +87,7 @@ int main( int argc, char *argv[] )
TDEApplication app; TDEApplication app;
TDEGlobal::locale()->insertCatalogue("libkscan"); TDEGlobal::locale()->insertCatalogue("libkscan");
KImageIO::registerFormats(); KImageIO::registerFormats();
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQCString devToUse = args->getOption( "d" ); TQCString devToUse = args->getOption( "d" );
@ -107,8 +107,8 @@ int main( int argc, char *argv[] )
Kooka *kooka = new Kooka(devToUse); Kooka *kooka = new Kooka(devToUse);
app.setMainWidget( kooka ); app.setMainWidget( kooka );
KWin::setIcons(kooka->winId(), loader->loadIcon( "scanner", KIcon::Desktop ), KWin::setIcons(kooka->winId(), loader->loadIcon( "scanner", TDEIcon::Desktop ),
loader->loadIcon("scanner", KIcon::Small) ); loader->loadIcon("scanner", TDEIcon::Small) );
kooka->show(); kooka->show();
app.processEvents(); app.processEvents();

@ -117,11 +117,11 @@ ScanPackager::ScanPackager( TQWidget *parent ) : KFileTreeView( parent )
m_currImportDir = m_currCopyDir; m_currImportDir = m_currCopyDir;
/* Preload frequently used icons */ /* Preload frequently used icons */
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
m_floppyPixmap = loader->loadIcon( "3floppy_unmount", KIcon::Small ); m_floppyPixmap = loader->loadIcon( "3floppy_unmount", TDEIcon::Small );
m_grayPixmap = loader->loadIcon( "palette_gray", KIcon::Small ); m_grayPixmap = loader->loadIcon( "palette_gray", TDEIcon::Small );
m_bwPixmap = loader->loadIcon( "palette_lineart", KIcon::Small ); m_bwPixmap = loader->loadIcon( "palette_lineart", TDEIcon::Small );
m_colorPixmap = loader->loadIcon( "palette_color", KIcon::Small ); m_colorPixmap = loader->loadIcon( "palette_color", TDEIcon::Small );
m_startup = true; m_startup = true;
@ -145,15 +145,15 @@ void ScanPackager::openRoots()
KFileTreeBranch* ScanPackager::openRoot( const KURL& root, bool ) KFileTreeBranch* ScanPackager::openRoot( const KURL& root, bool )
{ {
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
/* working on the global branch. FIXME */ /* working on the global branch. FIXME */
m_defaultBranch = addBranch( root, i18n("Kooka Gallery"), m_defaultBranch = addBranch( root, i18n("Kooka Gallery"),
loader->loadIcon( "folder_image", KIcon::Small ), loader->loadIcon( "folder_image", TDEIcon::Small ),
false /* do not showHidden */ ); false /* do not showHidden */ );
// TQ_CHECK_PTR( m_defaultBranch ); // TQ_CHECK_PTR( m_defaultBranch );
m_defaultBranch->setOpenPixmap( loader->loadIcon( "folder_blue_open", KIcon::Small )); m_defaultBranch->setOpenPixmap( loader->loadIcon( "folder_blue_open", TDEIcon::Small ));
setDirOnlyMode( m_defaultBranch, false ); setDirOnlyMode( m_defaultBranch, false );
m_defaultBranch->setShowExtensions( true ); // false ); m_defaultBranch->setShowExtensions( true ); // false );
@ -581,7 +581,7 @@ void ScanPackager::loadImageForItem( KFileTreeViewItem *item )
kdDebug(28000) << "subImage-count: " << img->subImagesCount() << endl; kdDebug(28000) << "subImage-count: " << img->subImagesCount() << endl;
if( img->subImagesCount() > 1 ) if( img->subImagesCount() > 1 )
{ {
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
kdDebug(28000) << "SubImages existing!" << endl; kdDebug(28000) << "SubImages existing!" << endl;
/* Start at the image with index 1, that makes one less than are actually in the /* Start at the image with index 1, that makes one less than are actually in the
@ -599,7 +599,7 @@ void ScanPackager::loadImageForItem( KFileTreeViewItem *item )
} }
prevItem = subImgItem; prevItem = subImgItem;
subImgItem->setPixmap( 0, loader->loadIcon( "editcopy", KIcon::Small )); subImgItem->setPixmap( 0, loader->loadIcon( "editcopy", TDEIcon::Small ));
subImgItem->setText( 0, i18n("Sub-image %1").arg( i ) ); subImgItem->setText( 0, i18n("Sub-image %1").arg( i ) );
KookaImage *subImgImg = new KookaImage( i, img ); KookaImage *subImgImg = new KookaImage( i, img );
subImgImg->setFileItem( newKfi ); subImgImg->setFileItem( newKfi );

@ -56,7 +56,7 @@ ThumbView::ThumbView( TQWidget *parent, const char *name )
m_pixWidth = 0; m_pixWidth = 0;
m_pixHeight = 0; m_pixHeight = 0;
m_thumbMargin = 5; m_thumbMargin = 5;
m_iconView = new KIconView( this, name ); m_iconView = new TDEIconView( this, name );
m_progress = new KProgress( this ); m_progress = new KProgress( this );
m_progress->hide(); m_progress->hide();

@ -56,7 +56,7 @@ class TQListViewItem;
class KProgress; class KProgress;
class TDEIO::PreviewJob; class TDEIO::PreviewJob;
class ThumbView: public TQVBox /* KIconView */ class ThumbView: public TQVBox /* TDEIconView */
{ {
Q_OBJECT Q_OBJECT
@ -134,7 +134,7 @@ private:
TQPixmap createPixmap( const TQPixmap& ) const; TQPixmap createPixmap( const TQPixmap& ) const;
bool deleteImage( KFileItem* ); bool deleteImage( KFileItem* );
KIconView *m_iconView; TDEIconView *m_iconView;
KProgress *m_progress; KProgress *m_progress;
KURL m_currentDir; KURL m_currentDir;

@ -105,7 +105,7 @@ void PMLibraryIconDrag::append( const TQIconDragItem &item, const TQRect &pr,
} }
PMLibraryIconView::PMLibraryIconView( TQWidget* parent, const char* name ) PMLibraryIconView::PMLibraryIconView( TQWidget* parent, const char* name )
: KIconView( parent, name ) : TDEIconView( parent, name )
{ {
m_pLibrary = NULL; m_pLibrary = NULL;
m_pCurrentLibrary = NULL; m_pCurrentLibrary = NULL;
@ -193,14 +193,14 @@ TQDragObject* PMLibraryIconView::dragObject( )
} }
PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQString& path, bool isSubLibrary ) PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQString& path, bool isSubLibrary )
: KIconViewItem( parent, text ) : TDEIconViewItem( parent, text )
{ {
m_path = path; m_path = path;
m_isSubLibrary = isSubLibrary; m_isSubLibrary = isSubLibrary;
} }
PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQImage& image, const TQString& path, bool isSubLibrary ) PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQImage& image, const TQString& path, bool isSubLibrary )
: KIconViewItem( parent, text, image ) : TDEIconViewItem( parent, text, image )
{ {
m_path = path; m_path = path;
m_isSubLibrary = isSubLibrary; m_isSubLibrary = isSubLibrary;

@ -60,7 +60,7 @@ private:
/** /**
* This class provides a view to browse objects, showing their previews. * This class provides a view to browse objects, showing their previews.
*/ */
class PMLibraryIconView: public KIconView class PMLibraryIconView: public TDEIconView
{ {
Q_OBJECT Q_OBJECT
@ -98,7 +98,7 @@ private:
* This class holds a library object's icon. It also remembers the path * This class holds a library object's icon. It also remembers the path
* where the file is. * where the file is.
*/ */
class PMLibraryIconViewItem: public KIconViewItem class PMLibraryIconViewItem: public TDEIconViewItem
{ {
public: public:
PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQString& path, bool isSubLibrary ); PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQString& path, bool isSubLibrary );

@ -83,7 +83,7 @@
* modules/effects/*: * modules/effects/*:
New module: KViewEffects. I implemented a simple gamma New module: KViewEffects. I implemented a simple gamma
correction filter using KIconEffect::toGamma(). correction filter using TDEIconEffect::toGamma().
* kview.desktop: * kview.desktop:
Changed MimeType field to support pbm, pnm, ppm and pgm. Changed MimeType field to support pbm, pnm, ppm and pgm.
Is the image/x-png still needed? Is the image/x-png still needed?

@ -216,7 +216,7 @@ void KViewEffects::applyGammaCorrection()
TQImage * corrected = workImage(); TQImage * corrected = workImage();
if( corrected ) if( corrected )
{ {
KIconEffect::toGamma( *corrected, m_gamma ); TDEIconEffect::toGamma( *corrected, m_gamma );
m_pViewer->canvas()->setImage( *corrected ); m_pViewer->canvas()->setImage( *corrected );
delete corrected; delete corrected;
m_lastgamma = m_gamma; m_lastgamma = m_gamma;

@ -353,7 +353,7 @@ void KViewPresenter::makeCurrent( TQListViewItem * item )
else else
{ {
m_pCurrentItem = static_cast<ImageListItem*>( item ); m_pCurrentItem = static_cast<ImageListItem*>( item );
m_pCurrentItem->setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "1rightarrow", KIcon::Small ) ); m_pCurrentItem->setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "1rightarrow", TDEIcon::Small ) );
m_pImageList->m_pListView->ensureItemVisible( m_pCurrentItem ); m_pImageList->m_pListView->ensureItemVisible( m_pCurrentItem );
} }
} }

@ -90,7 +90,7 @@ DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache
if (!busyIcon) if (!busyIcon)
{ {
busyIcon = new TQPixmap(TDEGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium)); busyIcon = new TQPixmap(TDEGlobal::iconLoader()->loadIcon("gear", TDEIcon::NoGroup, TDEIcon::SizeMedium));
URShadow = new TQPixmap(); URShadow = new TQPixmap();
BRShadow = new TQPixmap(); BRShadow = new TQPixmap();

@ -63,7 +63,7 @@ ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pag
if (!waitIcon) if (!waitIcon)
{ {
waitIcon = new TQPixmap(TDEGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium)); waitIcon = new TQPixmap(TDEGlobal::iconLoader()->loadIcon("gear", TDEIcon::NoGroup, TDEIcon::SizeMedium));
} }
} }

@ -46,7 +46,7 @@ SearchWidget::SearchWidget(TQWidget* parent, const char* name, WFlags fl)
layout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout"); layout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout");
stopButton = new TQPushButton(this, "stopButton"); stopButton = new TQPushButton(this, "stopButton");
stopButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("stop", KIcon::Small, KIcon::SizeSmall)); stopButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("stop", TDEIcon::Small, TDEIcon::SizeSmall));
layout->addWidget(stopButton); layout->addWidget(stopButton);
searchLabel = new TQLabel(this, "searchLabel"); searchLabel = new TQLabel(this, "searchLabel");
@ -59,12 +59,12 @@ SearchWidget::SearchWidget(TQWidget* parent, const char* name, WFlags fl)
searchLabel->setBuddy(searchText); searchLabel->setBuddy(searchText);
findPrevButton = new TQPushButton(this, "findPrevButton"); findPrevButton = new TQPushButton(this, "findPrevButton");
findPrevButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("back", KIcon::NoGroup, KIcon::SizeSmall)); findPrevButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("back", TDEIcon::NoGroup, TDEIcon::SizeSmall));
TQToolTip::add(findPrevButton, i18n("Find previous")); TQToolTip::add(findPrevButton, i18n("Find previous"));
layout->addWidget(findPrevButton); layout->addWidget(findPrevButton);
findNextButton = new TQPushButton(this, "findNextButton"); findNextButton = new TQPushButton(this, "findNextButton");
findNextButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("forward", KIcon::NoGroup, KIcon::SizeSmall)); findNextButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("forward", TDEIcon::NoGroup, TDEIcon::SizeSmall));
TQToolTip::add(findNextButton, i18n("Find next")); TQToolTip::add(findNextButton, i18n("Find next"));
layout->addWidget(findNextButton); layout->addWidget(findNextButton);

@ -44,9 +44,9 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
if( haveStdButt ) if( haveStdButt )
{ {
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
m_stdButt = new TQPushButton( this ); m_stdButt = new TQPushButton( this );
m_stdButt->setPixmap( loader->loadIcon( "undo",KIcon::Small )); m_stdButt->setPixmap( loader->loadIcon( "undo",TDEIcon::Small ));
/* connect the button click to setting the value */ /* connect the button click to setting the value */
connect( m_stdButt, TQT_SIGNAL(clicked()), connect( m_stdButt, TQT_SIGNAL(clicked()),

Loading…
Cancel
Save