Commit b396a204 authored by Halla Rempt's avatar Halla Rempt

Maybe this fixed the circuitous compilation problems with the ui library.

svn path=/trunk/koffice/; revision=378844
parent 996ea0fd
......@@ -149,7 +149,7 @@ void KisPaintDevice::init()
void KisPaintDevice::extent(Q_INT32 &x, Q_INT32 &y, Q_INT32 &w, Q_INT32 &h) const
{
m_datamanager->extent(x, y, w, h);
m_datamanager -> extent(x, y, w, h);
}
void KisPaintDevice::accept(KisScaleVisitor& visitor)
......
......@@ -58,11 +58,10 @@ KisEmbossFilter::KisEmbossFilter(KisView * view) : KisFilter(name(), view)
void KisEmbossFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFilterConfiguration* configuration, const QRect& rect, KisTileCommand* ktc)
{
#if 0 // AUTO_LAYERS
kdDebug() << "Embossfilter called!\n";
Q_INT32 width = src->width();
Q_INT32 height = src->height();
Q_INT32 x, y, width, height;
src.extent(x, y, width, height);
// create a QUANTUM array that holds the data the filter works on
......@@ -139,7 +138,6 @@ void KisEmbossFilter::process(KisPaintDeviceSP src, KisPaintDeviceSP dst, KisFil
++lineIt;
++dstLineIt;
}
#endif
}
// This method have been ported from Pieter Z. Voloshyn algorithm code.
......
......@@ -15,9 +15,8 @@ INCLUDES = -I$(srcdir)/../core \
-I$(srcdir)/../core/paintop \
-I$(srcdir)/../ui \
-I$(srcdir)/../paintops \
-I$(srcdir)/../ui/dialogs \
-I$(srcdir)/../ui/widgets \
-I../ui/dialogs \
-I../ui \
$(KOFFICE_INCLUDES) $(KOPAINTER_INCLUDES) -I$(srcdir)/../core/strategy/ $(all_includes)
kritadefaulttools_la_SOURCES = \
......
......@@ -6,11 +6,10 @@ INCLUDES = -I$(srcdir)/../core \
-I$(srcdir)/../core/tiles \
-I$(srcdir)/../core/tool \
-I$(srcdir)/../core/paintop \
-I$(srcdir)/ui/dialogs \
$(KOFFICE_INCLUDES) $(KOPAINTER_INCLUDES) $(all_includes)
noinst_LTLIBRARIES = libkisui.la
libkisui_la_LIBADD = ./labels/libkislabel.la ./dialogs/libkisdialogs.la ./widgets/libkiswidgets.la
libkisui_la_LIBADD = ./labels/libkislabel.la ./widgets/libkiswidgets.la
libkisui_la_SOURCES = kis_dlg_preferences.cc \
kis_dlg_progress.cc \
kis_canvas.cc \
......@@ -43,7 +42,18 @@ libkisui_la_SOURCES = kis_dlg_preferences.cc \
kis_double_widget.cc \
kis_dlg_apply_profile.cc \
kis_dockframedocker.cc \
kis_basedocker.cc
kis_basedocker.cc \
kis_previewview.cc \
wdgmatrix.ui \
wdghistogram.ui \
kis_previewwidgetbase.ui \
wdgselectionoptions.ui \
kis_preview_dialog.ui \
wdgnewimage.ui \
wdgcolorsettings.ui \
wdgapplyprofile.ui \
wdgdockertab.ui
noinst_HEADERS = kis_dlg_preferences.h \
kis_dlg_progress.h \
......@@ -76,9 +86,17 @@ noinst_HEADERS = kis_dlg_preferences.h \
kis_double_widget.h \
kis_dlg_apply_profile.h \
kis_dockframedocker.h \
kis_basedocker.h
kis_basedocker.h \
wdgmatrix.h \
wdghistogram.h \
kis_previewwidgetbase.h \
wdgnewimage.h \
wdgcolorsettings.h \
wdgapplyprofile.h \
wdgdockertab.h
libkisui_la_METASOURCES = AUTO
SUBDIRS = labels dialogs widgets
SUBDIRS = labels widgets
INCLUDES = -I$(srcdir)/.. \
-I$(srcdir)/../../core \
-I$(srcdir)/../../core/tool \
$(KOFFICE_INCLUDES) -I$(interfacedir) $(KOPAINTER_INCLUDES) $(all_includes)
noinst_LTLIBRARIES = libkisdialogs.la
libkisdialogs_la_SOURCES = dummy.cc \
wdgmatrix.ui \
wdghistogram.ui \
kis_previewwidgetbase.ui \
wdgselectionoptions.ui \
kis_preview_dialog.ui \
wdgnewimage.ui \
wdgcolorsettings.ui \
wdgapplyprofile.ui \
wdgdockertab.ui
noinst_HEADERS = wdgmatrix.h \
wdghistogram.h \
kis_previewwidgetbase.h \
wdgnewimage.h \
wdgcolorsettings.h \
wdgapplyprofile.h \
wdgdockertab.h
METASOURCES = AUTO
This directory contains all the Qt Designer .ui files and the files
that are generated from those files. The custom code that uses the
designed widgets and dialogs can be found one dir up.
// A dummy file to allow the build process convert the .ui files.
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>WdgNewImage</class>
<widget class="QWidget">
<property name="name">
<cstring>WdgNewImage</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>486</height>
</rect>
</property>
<property name="caption">
<string>New Image</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KLineEdit" row="0" column="1">
<property name="name">
<cstring>kleName</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Name:</string>
</property>
<property name="buddy" stdset="0">
<cstring>kleName</cstring>
</property>
</widget>
<widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox6</cstring>
</property>
<property name="title">
<string>Mode</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QComboBox" row="0" column="1">
<property name="name">
<cstring>cmbColorSpace</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
<property name="text">
<string>&amp;Color mode:</string>
</property>
<property name="buddy" stdset="0">
<cstring>cmbColorSpace</cstring>
</property>
</widget>
<widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chkAlphaChannel</cstring>
</property>
<property name="text">
<string>&amp;Alpha channel</string>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<property name="name">
<cstring>cmbProfile</cstring>
</property>
</widget>
<widget class="QComboBox" row="2" column="1">
<property name="name">
<cstring>cmbDepth</cstring>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel7</cstring>
</property>
<property name="text">
<string>&amp;Depth:</string>
</property>
<property name="buddy" stdset="0">
<cstring>cmbDepth</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
<property name="text">
<string>&amp;Profile:</string>
</property>
<property name="buddy" stdset="0">
<cstring>cmbProfile</cstring>
</property>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox7</cstring>
</property>
<property name="title">
<string>Content</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel9</cstring>
</property>
<property name="text">
<string>Background:</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="1">
<property name="name">
<cstring>comboBox11</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
<property name="text">
<string>Description:</string>
</property>
</widget>
<widget class="QTextEdit" row="1" column="1">
<property name="name">
<cstring>textEdit1</cstring>
</property>
<property name="textFormat">
<enum>PlainText</enum>
</property>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox5</cstring>
</property>
<property name="title">
<string>Size:</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="2" column="0" rowspan="2" colspan="1">
<property name="name">
<cstring>textLabel4</cstring>
</property>
<property name="text">
<string>&amp;Resolution</string>
</property>
<property name="buddy" stdset="0">
<cstring>kinResolution</cstring>
</property>
<property name="toolTip" stdset="0">
<string>Pixels per inch</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
<property name="text">
<string>&amp;Height:</string>
</property>
<property name="buddy" stdset="0">
<cstring>kinHeight</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>&amp;Width:</string>
</property>
<property name="buddy" stdset="0">
<cstring>kinWidth</cstring>
</property>
</widget>
<widget class="KIntNumInput" row="0" column="1">
<property name="name">
<cstring>kinWidth</cstring>
</property>
<property name="minValue">
<number>0</number>
</property>
<property name="maxValue">
<number>5000</number>
</property>
</widget>
<widget class="KIntNumInput" row="1" column="1" rowspan="2" colspan="1">
<property name="name">
<cstring>kinHeight</cstring>
</property>
<property name="minValue">
<number>0</number>
</property>
<property name="maxValue">
<number>5000</number>
</property>
</widget>
<widget class="KIntNumInput" row="3" column="1">
<property name="name">
<cstring>kinResolution</cstring>
</property>
<property name="value">
<number>100</number>
</property>
<property name="minValue">
<number>0</number>
</property>
<property name="maxValue">
<number>2000</number>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
</includehints>
</UI>
......@@ -19,6 +19,7 @@
#ifndef _KIS_AUTOBRUSH_H_
#define _KIS_AUTOBRUSH_H_
#include <qobject.h>
#include "kis_wdg_autobrush.h"
#include "kis_brush.h"
......
......@@ -20,7 +20,7 @@
#ifndef KIS_BIRDEYE_BOX_H
#define KIS_BIRDEYE_BOX_H
#include "dialogs/wdgbirdeye.h"
#include "wdgbirdeye.h"
class QPixmap;
......
......@@ -35,7 +35,6 @@
#include "kis_controlframe.h"
#include "kis_iconwidget.h"
#include "kis_previewwidget.h"
#include "kis_brush.h"
#include "kis_pattern.h"
#include "kis_gradient.h"
......
......@@ -23,7 +23,7 @@
#include <kdialogbase.h>
#include "kis_global.h"
#include "dialogs/wdgapplyprofile.h"
#include "wdgapplyprofile.h"
#include "kis_types.h"
#include "kis_image.h"
......
......@@ -34,7 +34,7 @@
#include "kis_colorspace_registry.h"
#include "kis_dlg_create_img.h"
#include "dialogs/wdgnewimage.h"
#include "wdgnewimage.h"
#include "kis_profile.h"
#include "kis_resource.h"
#include "kis_resourceserver.h"
......
......@@ -25,7 +25,7 @@
#include <qcolor.h>
#include "kis_global.h"
#include "dialogs/wdgnewimage.h"
#include "wdgnewimage.h"
class QButtonGroup;
......
......@@ -33,7 +33,7 @@
#include "kis_colorspace_registry.h"
#include "kis_dlg_image_properties.h"
#include "dialogs/wdgnewimage.h"
#include "wdgnewimage.h"
#include "kis_profile.h"
#include "kis_resource.h"
#include "kis_resourceserver.h"
......
......@@ -25,7 +25,7 @@
#include <qcolor.h>
#include "kis_global.h"
#include "dialogs/wdgnewimage.h"
#include "wdgnewimage.h"
#include "kis_types.h"
#include "kis_image.h"
......
......@@ -39,7 +39,7 @@
#include "kis_cursor.h"
#include "kis_config.h"
#include "kis_dlg_preferences.h"
#include "dialogs/wdgcolorsettings.h"
#include "wdgcolorsettings.h"
#include "kis_resourceserver.h"
#include "kis_factory.h"
#include "kis_colorspace_registry.h"
......
......@@ -23,7 +23,7 @@
#include <klocale.h>
#include "dialogs/wdgmatrix.h"
#include "wdgmatrix.h"
#include "kis_dlg_transform.h"
/**
......
......@@ -39,7 +39,7 @@
#include <koFrameButton.h>
#include "kis_dockframedocker.h"
#include "dialogs/wdgdockertab.h"
#include "wdgdockertab.h"
// static const unsigned char img0_wdgdockertab[] = {
// 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
......
......@@ -23,7 +23,7 @@
#include "kis_types.h"
#include "kis_channelinfo.h"
#include "dialogs/wdghistogram.h"
#include "wdghistogram.h"
/**
* The histogram widget takes a paint device or an image and
......
/*
* kis_previewview.cc - part of Krita
*
* Copyright (c) 2001 John Califf <jwcaliff@compuzone.net>
* Copyright (c) 2004 Bart Coppens <kde@bartcoppens.be>
*
* 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 General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <qpainter.h>
#include <qpoint.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qcolor.h>
#include <kdebug.h>
#include "kis_undo_adapter.h"
#include "kis_global.h"
#include "kis_layer.h"
#include "kis_image.h"
#include "kis_painter.h"
#include "kis_types.h"
#include "color_strategy/kis_strategy_colorspace.h"
#include "kis_previewview.h"
// The View
KisPreviewView::KisPreviewView(QWidget* parent, const char * name, WFlags f)
: QWidget(parent, name, f), m_undo(0), /* seems to work nicely */
m_pos(QPoint(0,0)), m_zoom(1.0)
{
m_moving = false;
updateView(m_pos);
}
KisLayerSP KisPreviewView::getSourceLayer()
{
return m_sourcelayer;
}
KisLayerSP KisPreviewView::getPreviewLayer()
{
return m_clippedview;
}
void KisPreviewView::updateView()
{
updateView(m_pos);
}
void KisPreviewView::updateView(QPoint delta)
{
if (!m_clippedview || !m_sourcelayer) return;
KisPainter gc;
KisPaintDeviceSP pd(m_sourcelayer.data());
gc.begin(m_clippedview.data());
gc.bitBlt(0, 0, COMPOSITE_OVER, pd, delta.x(), delta.y(), -1, -1);
gc.end();
}
void KisPreviewView::setSourceLayer(KisLayerSP lay)
{
m_sourcelayer = lay;
KisPainter gc;
KisPaintDeviceSP pd(m_sourcelayer.data());
Q_INT32 w = static_cast<Q_INT32>(size().width() / m_zoom);
Q_INT32 h = static_cast<Q_INT32>(size().height() / m_zoom);
m_image = new KisImage(m_undo, w, h, lay->colorStrategy(), "preview");
m_image -> setProfile(lay -> profile());
m_clippedview = new KisLayer(m_image, m_image -> nextLayerName(), OPACITY_OPAQUE);
gc.begin(m_clippedview.data());
gc.bitBlt(0, 0, COMPOSITE_OVER, pd, m_pos.x(), m_pos.y(), -1, -1);
gc.end();
m_image -> add(m_clippedview, -1);
update();
emit updated();
}
void KisPreviewView::setZoom(double zoom) {
m_zoom = zoom;
clampDelta(m_pos);
setSourceLayer(m_sourcelayer); // so that it automatically resizes m_clippedview
}
void KisPreviewView::zoomIn() {
if (m_zoom * 1.5 < 8) {
setZoom(m_zoom * 1.5);
}
}
void KisPreviewView::zoomOut() {
if (m_zoom / 1.5 > 1/8) {
setZoom(m_zoom / 1.5);
}
}
void KisPreviewView::updatedPreview() {
update();
}
void KisPreviewView::render(QPainter &painter, KisImageSP image)