+++ /dev/null
-# Makefile temporal
-#
-# $Id$
-#
-
-CXXFLAGS=-Wall -g `pkg-config --cflags libglademm-2.0`
-LDFLAGS=`pkg-config --libs libglademm-2.0`
-
-TARGETS=main
-
-all: $(TARGETS)
-
-h_files=$(wildcard *.h)
-cpp_files=$(wildcard *.cpp)
-o_files=$(cpp_files:.cpp=.o)
-
-main: $(o_files)
-
-clean:
- rm -f $(TARGETS) $(o_files)
--- /dev/null
+
+SUBDIRS = src dialogs pixmaps
+
--- /dev/null
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(configure.in)
+AM_INIT_AUTOMAKE(plaqui_constructor, 0.1)
+AM_MAINTAINER_MODE
+
+AC_ISC_POSIX
+AC_PROG_CXX
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+
+## pkg_modules="libgnomeui-2.0"
+PKG_CHECK_MODULES(PACKAGE,
+ gtkmm-2.0 >= 2.0.0 \
+ libglademm-2.0 >= 2.0.0)
+
+AC_SUBST(PACKAGE_CFLAGS)
+AC_SUBST(PACKAGE_LIBS)
+
+AC_OUTPUT([
+Makefile
+dialogs/Makefile
+pixmaps/Makefile
+src/Makefile
+])
+
+echo
+echo "Todo listo. Ahora para compilar solo ejecute make"
+echo
+echo "The PlaQui Development Team"
+
--- /dev/null
+plaquidir = $(datadir)/plaqui-constructor/dialogs
+
+plaqui_DATA = constructor.glade
+
+EXTRA_DIST = $(plaqui_DATA)
+
--- /dev/null
+plaquiimgdir = $(datadir)/plaqui-constructor/pixmaps
+plaquidlgdir = $(datadir)/plaqui-constructor/dialogs
+
+# Imagenes que se cargar "on the fly"
+plaquiimg_DATA = \
+and_e.png \
+and_n.png \
+and_o.png \
+and_s.png \
+bomba_e.png \
+bomba_null.png \
+bomba_o.png \
+canio_n.png \
+canio_s.png \
+codo_e.png \
+codo_n.png \
+codo_o.png \
+codo_s.png \
+drain_e.png \
+drain_n.png \
+drain_o.png \
+drain_s.png \
+exclusa_h.png \
+exclusa_s.png \
+not_e.png \
+not_n.png \
+not_o.png \
+not_s.png \
+null.png \
+or_e.png \
+or_n.png \
+or_o.png \
+or_s.png \
+tanque_e.png \
+tanque_null.png \
+tanque_o.png \
+y_e.png \
+y_n.png \
+y_o.png \
+y_s.png
+
+# Imagenes que necesita el dialogo, deben estar en el mismo
+# directorio que el .glade
+plaquidlg_DATA = ico_bomba.png \
+ico_canio.png \
+ico_codo.png \
+ico_exclusa.png \
+ico_tanque.png \
+ico_y.png \
+not_e.png \
+drain_n.png \
+and_e.png \
+or_e.png
+
+EXTRA_DIST = $(plaquiimg_DATA) $(plaquidlg_DATA)
+
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = \
+ -I../include \
+ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ @PACKAGE_CFLAGS@
+
+bin_PROGRAMS = plaqui-constructor
+
+plaqui_constructor_SOURCES = and.cpp \
+ cistern.cpp \
+ cisternptywnd.cpp \
+ conduct.cpp \
+ constructor.cpp \
+ drain.cpp \
+ exclusa.cpp \
+ exclusaptywnd.cpp \
+ item.cpp \
+ itemptywnd.cpp \
+ main.cpp \
+ not.cpp \
+ or.cpp \
+ propertywnd.cpp \
+ pump.cpp \
+ pumpptywnd.cpp \
+ splitter.cpp \
+ union.cpp \
+ workplace.cpp
+
+plaqui_constructor_LDADD = @PACKAGE_LIBS@
+
And::And()
{
- imageN = Gdk::Pixbuf::create_from_file("and_n.png");
- imageS = Gdk::Pixbuf::create_from_file("and_s.png");
- imageE = Gdk::Pixbuf::create_from_file("and_e.png");
- imageO = Gdk::Pixbuf::create_from_file("and_o.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_s.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageE;
set_size_request(image->get_width(), image->get_height());
Cistern::Cistern()
{
- imageE = Gdk::Pixbuf::create_from_file("tanque_e.png");
- imageO = Gdk::Pixbuf::create_from_file("tanque_o.png");
- null = Gdk::Pixbuf::create_from_file("tanque_null.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_null.png");
imgActual = 0;
image = imageE;
set_size_request(image->get_width(), image->get_height());
- Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "cistern_pty_wnd");
+ Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "cistern_pty_wnd");
ref->get_widget_derived("cistern_pty_wnd",cistern_pty_wnd);
cistern_pty_wnd->cistern = this;
cistern_pty_wnd->set_title("Propiedades del Tanque");
refGlade->get_widget("btn_select_color", btn_select_color);
refGlade->get_widget("color_preview",color_preview);
- Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "color_select_dlg");
+ Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "color_select_dlg");
ref->get_widget("color_select_dlg",color_select_dlg);
ref->get_widget("dlg_select_color_cancel",dlg_select_color_cancel);
ref->get_widget("dlg_select_color_ok",dlg_select_color_ok);
Conduct::Conduct()
{
- imageN = Gdk::Pixbuf::create_from_file("canio_n.png");
- imageS = Gdk::Pixbuf::create_from_file("canio_s.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/canio_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/canio_s.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageN;
set_size_request(image->get_width(), image->get_height());
set_title("Constructor");
- ico_canio = Gdk::Pixbuf::create_from_file("canio_n.png");
- ico_y = Gdk::Pixbuf::create_from_file("y_n.png");
- ico_codo = Gdk::Pixbuf::create_from_file("codo_o.png");
- ico_tanque = Gdk::Pixbuf::create_from_file("tanque_e.png");
- ico_exclusa = Gdk::Pixbuf::create_from_file("exclusa_h.png");
- ico_drain = Gdk::Pixbuf::create_from_file("drain_n.png");
- ico_bomba = Gdk::Pixbuf::create_from_file("bomba_e.png");
- ico_and = Gdk::Pixbuf::create_from_file("and_e.png");
- ico_or = Gdk::Pixbuf::create_from_file("or_e.png");
- ico_not = Gdk::Pixbuf::create_from_file("not_e.png");
+ ico_canio = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/canio_n.png");
+ ico_y = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_n.png");
+ ico_codo = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_o.png");
+ ico_tanque = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_e.png");
+ ico_exclusa = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/exclusa_h.png");
+ ico_drain = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_n.png");
+ ico_bomba = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_e.png");
+ ico_and = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_e.png");
+ ico_or = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_e.png");
+ ico_not = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_e.png");
refGlade->get_widget("btn_canio", btn_canio);
refGlade->get_widget("btn_codo", btn_codo);
Drain::Drain()
{
- imageE = Gdk::Pixbuf::create_from_file("drain_e.png");
- imageO = Gdk::Pixbuf::create_from_file("drain_o.png");
- imageN = Gdk::Pixbuf::create_from_file("drain_n.png");
- imageS = Gdk::Pixbuf::create_from_file("drain_s.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_o.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_s.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageN;
set_size_request(image->get_width(), image->get_height());
Exclusa::Exclusa()
{
- imageN = Gdk::Pixbuf::create_from_file("exclusa_h.png");
- imageS = Gdk::Pixbuf::create_from_file("exclusa_s.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/exclusa_h.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/exclusa_s.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageN;
set_size_request(image->get_width(), image->get_height());
- Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "exclusa_pty_wnd");
+ Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "exclusa_pty_wnd");
ref->get_widget_derived("exclusa_pty_wnd",exclusa_pty_wnd);
exclusa_pty_wnd->exclusa = this;
name = "exclusa";
CItem::CItem()
{
Glib::RefPtr<Gnome::Glade::Xml> ref;
- ref = Gnome::Glade::Xml::create("constructor.glade", "item_pty_wnd");
+ ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "item_pty_wnd");
ref->get_widget_derived("item_pty_wnd",property_wnd);
caudal_max = 0.0;
is_union = true;
Glib::RefPtr<Gnome::Glade::Xml> refXml;
try
{
- refXml = Gnome::Glade::Xml::create("constructor.glade");
+ refXml = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade");
}
catch(const Gnome::Glade::XmlError& ex)
{
Not::Not()
{
- imageN = Gdk::Pixbuf::create_from_file("not_n.png");
- imageS = Gdk::Pixbuf::create_from_file("not_s.png");
- imageE = Gdk::Pixbuf::create_from_file("not_e.png");
- imageO = Gdk::Pixbuf::create_from_file("not_o.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_s.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageE;
set_size_request(image->get_width(), image->get_height());
Or::Or()
{
- imageN = Gdk::Pixbuf::create_from_file("or_n.png");
- imageS = Gdk::Pixbuf::create_from_file("or_s.png");
- imageE = Gdk::Pixbuf::create_from_file("or_e.png");
- imageO = Gdk::Pixbuf::create_from_file("or_o.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_s.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageE;
set_size_request(image->get_width(), image->get_height());
Pump::Pump()
{
- imageE = Gdk::Pixbuf::create_from_file("bomba_e.png");
- imageO = Gdk::Pixbuf::create_from_file("bomba_o.png");
- null = Gdk::Pixbuf::create_from_file("bomba_null.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_null.png");
imgActual = 0;
image = imageE;
set_size_request(image->get_width(), image->get_height());
- Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "pump_pty_wnd");
+ Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "pump_pty_wnd");
ref->get_widget_derived("pump_pty_wnd",pump_pty_wnd);
pump_pty_wnd->pump = this;
name = "bomba";
refGlade->get_widget("txt_pump_name",txt_pump_name);
refGlade->get_widget("color_preview",color_preview);
- Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "color_select_dlg");
+ Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "color_select_dlg");
ref->get_widget("color_select_dlg",color_select_dlg);
ref->get_widget("dlg_select_color_cancel",dlg_select_color_cancel);
ref->get_widget("dlg_select_color_ok",dlg_select_color_ok);
Splitter::Splitter()
{
- imageN = Gdk::Pixbuf::create_from_file("codo_n.png");
- imageS = Gdk::Pixbuf::create_from_file("codo_s.png");
- imageE = Gdk::Pixbuf::create_from_file("codo_e.png");
- imageO = Gdk::Pixbuf::create_from_file("codo_o.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_s.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageO;
set_size_request(image->get_width(), image->get_height());
Union::Union()
{
- imageN = Gdk::Pixbuf::create_from_file("y_n.png");
- imageS = Gdk::Pixbuf::create_from_file("y_s.png");
- imageE = Gdk::Pixbuf::create_from_file("y_e.png");
- imageO = Gdk::Pixbuf::create_from_file("y_o.png");
- null = Gdk::Pixbuf::create_from_file("null.png");
+ imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_n.png");
+ imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_s.png");
+ imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_e.png");
+ imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_o.png");
+ null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png");
imgActual = 0;
image = imageN;
set_size_request(image->get_width(), image->get_height());
{
std::list<t_line>::iterator i = lista_lineas.begin();
while ( i != lista_lineas.end() ){
- if ( (*i).logic->get_id() == _id || (*i).store->get_id == _id)
+ if ( ((*i).logic->get_id() == _id) || ((*i).store->get_id() == _id) )
lista_lineas.erase(i);
i++;
}