/***************************************************************************
                          tagimgdlg.h  -  description
                             -------------------
    begin                : Sat Nov 27 1999
    copyright            : (C) 1999 by Yacovlev Alexander & Dmitry Poplavsky
                           (C) 2002, 2006 Andras Mantia
    email                : pdima@mail.univ.kiev.ua, amantia@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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef TAGIMGDLG_H
#define TAGIMGDLG_H

//Generated area. DO NOT EDIT!!!(begin)
#include <tqwidget.h>
#include <tqlabel.h>
#include <klineedit.h>
#include <tqpushbutton.h>
#include <tqcombobox.h>
//Generated area. DO NOT EDIT!!!(end)

#include "tagwidget.h"
#include "qtag.h"

class PictureView;
class TQSpinBox;
class TQImage;

/**
  *@author Dmitry Poplavsky & Yacovlev Alexander
  */

class TagImgDlg : public TQWidget, TagWidget {
   Q_OBJECT
  
public: 
  TagImgDlg(const DTDStruct *dtd, TQWidget *parent=0, const char *name=0);
  ~TagImgDlg();

public:
  void initDialog();
  //Generated area. DO NOT EDIT!!!(begin)
  TQLabel *labelImgSource;
  KLineEdit *lineImgSource;
  TQPushButton *buttonImgSource;
  TQPushButton *buttonRecalcImgSize;
  TQLabel *TQLabel_4;
  KLineEdit *lineWidth;
  TQLabel *TQLabel_5;
  KLineEdit *lineHeight;
  TQLabel *TQLabel_6;
  KLineEdit *lineHSpace;
  TQLabel *TQLabel_7;
  KLineEdit *lineVSpace;
  TQLabel *TQLabel_8;
  KLineEdit *lineAltText;
  TQLabel *TQLabel_9;
  TQSpinBox *spinBorder;
  TQLabel *TQLabel_10;
  TQComboBox *comboAlign;
  PictureView *widgetImg;
  TQPushButton *buttonOk;
  TQPushButton *buttonCancel;
  //Generated area. DO NOT EDIT!!!(end)

private:
  TQImage *img;
  TQString imgFileName;
  bool isTmpFile;
  const DTDStruct *m_dtd;

public slots: // Public slots
  /** Choose new image */
  void slotImageSet( const KURL& imageURL);
  /** select image */
  void slotFileSelect();
  void slotLineFileSelect();

  void readAttributes( TQDict<TQString> *d );
  void writeAttributes( TQDict<TQString> *d );
  /** recalculate image size */
  void slotRecalcImgSize();
};

#endif

