You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
159 lines
4.1 KiB
159 lines
4.1 KiB
15 years ago
|
/*
|
||
11 years ago
|
tdeiconedit - a small graphics drawing program for creating KDE icons
|
||
15 years ago
|
Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org)
|
||
|
|
||
|
This program is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU General Public
|
||
|
License as published by the Free Software Foundation; either
|
||
|
version 2 of the License, or (at your option) any later version.
|
||
|
|
||
|
This program is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
11 years ago
|
#ifndef __TDEICONEDIT_H__
|
||
|
#define __TDEICONEDIT_H__
|
||
15 years ago
|
|
||
15 years ago
|
#include <tqwidget.h>
|
||
|
#include <tqpixmap.h>
|
||
|
#include <tqptrlist.h>
|
||
15 years ago
|
|
||
12 years ago
|
#include <tdemainwindow.h>
|
||
15 years ago
|
#include <kiconloader.h>
|
||
12 years ago
|
#include <tdemenubar.h>
|
||
15 years ago
|
#include <kstatusbar.h>
|
||
12 years ago
|
#include <tdetoolbar.h>
|
||
|
#include <tdeaccel.h>
|
||
15 years ago
|
#include <kurl.h>
|
||
12 years ago
|
#include <tdeaction.h>
|
||
15 years ago
|
|
||
|
#include "knew.h"
|
||
11 years ago
|
#include "tdeicon.h"
|
||
|
#include "tdeiconconfig.h"
|
||
|
#include "tdeicongrid.h"
|
||
15 years ago
|
#include "kresize.h"
|
||
|
#include "properties.h"
|
||
|
|
||
12 years ago
|
class TDEIconEdit;
|
||
15 years ago
|
class KCommandHistory;
|
||
12 years ago
|
typedef TQPtrList<TDEIconEdit> WindowList;
|
||
15 years ago
|
|
||
15 years ago
|
class TQWhatsThis;
|
||
|
class TQToolButton;
|
||
|
class TQLabel;
|
||
15 years ago
|
class PaletteToolBar;
|
||
|
|
||
|
/**
|
||
12 years ago
|
* TDEIconEdit
|
||
|
* @short TDEIconEdit
|
||
15 years ago
|
* @author Thomas Tanghus <tanghus@kde.org>
|
||
|
* @version 0.4
|
||
|
*/
|
||
12 years ago
|
class TDEIconEdit : public TDEMainWindow
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
11 years ago
|
TDEIconEdit( KURL url = KURL(), const char *name = "tdeiconedit");
|
||
|
TDEIconEdit( const TQImage image, const char *name = "tdeiconedit");
|
||
12 years ago
|
~TDEIconEdit();
|
||
15 years ago
|
|
||
13 years ago
|
virtual TQSize sizeHint() const;
|
||
15 years ago
|
static WindowList windowList;
|
||
|
|
||
|
signals:
|
||
15 years ago
|
void newname(const TQString &);
|
||
15 years ago
|
|
||
|
public slots:
|
||
12 years ago
|
virtual void saveProperties(TDEConfig*);
|
||
|
virtual void readProperties(TDEConfig*);
|
||
15 years ago
|
void updateProperties();
|
||
|
|
||
|
protected slots:
|
||
15 years ago
|
void slotNewWin(const TQString & url = 0);
|
||
15 years ago
|
void slotNew();
|
||
|
void slotOpen();
|
||
|
void slotClose();
|
||
|
void slotSave();
|
||
|
void slotSaveAs();
|
||
|
void slotPrint();
|
||
|
void slotZoomIn();
|
||
|
void slotZoomOut();
|
||
|
void slotZoom1();
|
||
|
void slotZoom2();
|
||
|
void slotZoom5();
|
||
|
void slotZoom10();
|
||
|
void slotCopy();
|
||
|
void slotCut();
|
||
|
void slotPaste();
|
||
|
void slotClear();
|
||
|
void slotSaved();
|
||
|
void slotSelectAll();
|
||
|
void slotOpenRecent(const KURL&);
|
||
|
void slotToolPointer();
|
||
|
void slotToolFreehand();
|
||
|
void slotToolRectangle();
|
||
|
void slotToolFilledRectangle();
|
||
|
void slotToolCircle();
|
||
|
void slotToolFilledCircle();
|
||
|
void slotToolEllipse();
|
||
|
void slotToolFilledEllipse();
|
||
|
void slotToolSpray();
|
||
|
void slotToolFlood();
|
||
|
void slotToolLine();
|
||
|
void slotToolEraser();
|
||
|
void slotToolSelectRect();
|
||
|
void slotToolSelectCircle();
|
||
|
void slotConfigureSettings();
|
||
|
void slotConfigureKeys();
|
||
|
void slotShowGrid();
|
||
|
void slotUpdateZoom( int );
|
||
|
void slotUpdateStatusColors(uint);
|
||
|
void slotUpdateStatusColors(uint, uint*);
|
||
|
void slotUpdateStatusPos(int, int);
|
||
|
void slotUpdateStatusSize(int, int);
|
||
15 years ago
|
void slotUpdateStatusMessage(const TQString &);
|
||
|
void slotUpdateStatusName(const TQString &);
|
||
15 years ago
|
void slotUpdateStatusModified(bool);
|
||
|
void slotUpdateStatusScaling(int);
|
||
|
void slotUpdatePaste(bool);
|
||
|
void slotUpdateCopy(bool);
|
||
15 years ago
|
void slotOpenBlank(const TQSize);
|
||
|
void addRecent(const TQString &);
|
||
15 years ago
|
|
||
15 years ago
|
virtual void dragEnterEvent(TQDragEnterEvent* event);
|
||
|
virtual void dropEvent(TQDropEvent *e);
|
||
15 years ago
|
|
||
|
protected:
|
||
|
void init();
|
||
|
void setupActions();
|
||
|
bool setupStatusBar();
|
||
|
void writeConfig();
|
||
|
void updateAccels();
|
||
|
|
||
|
virtual bool queryClose();
|
||
15 years ago
|
virtual TQWidget *createContainer( TQWidget*, int, const TQDomElement&, int& );
|
||
15 years ago
|
|
||
|
KCommandHistory* history;
|
||
|
PaletteToolBar *m_paletteToolBar;
|
||
|
KStatusBar *statusbar;
|
||
12 years ago
|
TDEIconEditGrid *grid;
|
||
15 years ago
|
KGridView *gridview;
|
||
12 years ago
|
TDEIconEditIcon *icon;
|
||
15 years ago
|
TQImage img;
|
||
|
TQString m_name;
|
||
15 years ago
|
|
||
12 years ago
|
TDEAction *m_actCopy, *m_actPaste, *m_actCut, *m_actPasteNew;
|
||
|
TDEAction *m_actZoomIn, *m_actZoomOut;
|
||
|
TDERecentFilesAction *m_actRecent;
|
||
15 years ago
|
};
|
||
|
|
||
11 years ago
|
#endif //__TDEICONEDIT_H__
|