Fix compilation issues

This commit is contained in:
Grégory Soutadé 2011-09-03 20:40:21 +02:00
parent db46080b50
commit e6ff989bfa
5 changed files with 32 additions and 54 deletions

View File

@ -17,25 +17,33 @@ LDFLAGS+=-lxml2
CXX=$(HOST)g++ CXX=$(HOST)g++
MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ')
SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ') SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ')
MOCS=$(MOC_HEADERS:.hpp=.moc)
OBJS=$(SOURCES:.cpp=.o) OBJS=$(SOURCES:.cpp=.o)
MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ')
MOCS=$(MOC_HEADERS:.hpp=.objs)
MOCS_OBJS=$(MOC_HEADERS:.hpp=.moc)
all: kc all: mojito kc
clean: clean:
find src -type f -name '*.[o~]' -exec rm -f \{\} \; find src -type f -name '*.[o~]' -exec rm -f \{\} \;
find src -type f -name '*.moc' -exec rm -f \{\} \; find src -type f -name '*.moc' -exec rm -f \{\} \;
find src -type f -name '*.objs' -exec rm -f \{\} \;
rm -f kc rm -f kc
%.o : $(MOCS) $(SOURCES) %.o : %.cpp
$(CXX) $(CXXFLAGS) -c $< $(CXX) $(CXXFLAGS) -c $< -o $@
%.moc : src/view/%.hpp %.objs : %.moc
moc -nw $^ -o $< $(CXX) $(CXXFLAGS) -x c++ $< -c -o $@
kc: $(OBJS) %.moc : %.hpp
moc -nw $< -o $@
mojito : $(MOCS_OBJS)
kc: $(MOCS) $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
generate_locales: generate_locales:

View File

@ -1,24 +0,0 @@
/*
Copyright 2010-2011 Grégory Soutadé
This file is part of KissCount.
KissCount 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 3 of the License, or
(at your option) any later version.
KissCount 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 KissCount. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KISSPANEL_H
#define KISSPANEL_H
#endif

View File

@ -46,6 +46,4 @@ namespace view {
#define LANG_ROOT RESSOURCES_ROOT "po/" #define LANG_ROOT RESSOURCES_ROOT "po/"
#include "KissPanel.hpp"
#endif #endif

View File

@ -17,6 +17,8 @@
along with KissCount. If not, see <http://www.gnu.org/licenses/>. along with KissCount. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <QMessageBox>
/*#include "AccountPanel.hpp" /*#include "AccountPanel.hpp"
#include "PreferencesPanel.hpp" #include "PreferencesPanel.hpp"
#include "UsersDialog.hpp" #include "UsersDialog.hpp"
@ -35,8 +37,6 @@
#include "UsersDialog.hpp" #include "UsersDialog.hpp"
enum {BUTTON_CHANGE_USER_ID=-4, BUTTON_ABOUT_ID=-5, BUTTON_QUIT_ID=-6};
QString wxUI::months[12] ; QString wxUI::months[12] ;
QColor wxUI::categoryColors[MAX_CATEGORY] = {QColor(0x00, 0x45, 0x86), QColor wxUI::categoryColors[MAX_CATEGORY] = {QColor(0x00, 0x45, 0x86),
QColor(0xFF, 0x3E, 0x0E), QColor(0xFF, 0x3E, 0x0E),
@ -240,12 +240,12 @@ void wxUI::ShowPanel(KissPanel* panel)
// Layout(); // Layout();
} }
void wxUI::OnButtonClicked(QEvent& event) void wxUI::OnButtonClicked()
{ {
// ShowPanel(_panels[event.GetId()]); // ShowPanel(_panels[event.GetId()]);
} }
void wxUI::OnButtonChangeUser(QEvent& event) void wxUI::OnButtonChangeUser()
{ {
ChangeUser(); ChangeUser();
} }
@ -256,22 +256,15 @@ void wxUI::ChangeUser()
u.exec(); u.exec();
} }
void wxUI::OnButtonAbout(QEvent& event) void wxUI::OnButtonAbout()
{ {
// wxMessageBox( _("Personal accounting software\n\nhttp://indefero.soutade.fr/p/kisscount/\n\nLicenced under GNU GPL v3\n\nCopyright (C) 2010-2011 Grégory Soutadé"), QMessageBox::information(this, "KissCount " APP_VERSION, _("Personal accounting software\n\nhttp://indefero.soutade.fr/p/kisscount/\n\nLicenced under GNU GPL v3\n\nCopyright (C) 2010-2011 Grégory Soutadé"));
// wxT("KissCount " APP_VERSION "\n\n"),
// wxOK | wxICON_INFORMATION, this );
} }
void wxUI::OnButtonQuit(QEvent& event) void wxUI::OnButtonQuit()
{ {
// wxMessageDialog dialog(this, _("Quit KissCount ?"), wxT("KissCount"), wxYES_NO); if (QMessageBox::question(this, "KissCount", _("Quit KissCount ?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
// if (dialog.ShowModal() == wxID_NO) close();
// {
// return;
// }
// Close(true);
} }
void wxUI::GenerateMonth(int month, int year) void wxUI::GenerateMonth(int month, int year)

View File

@ -42,6 +42,8 @@ class PreferencesPanel;
class wxUI: public QFrame class wxUI: public QFrame
{ {
Q_OBJECT;
public: public:
static const int MAX_CATEGORY = 12; static const int MAX_CATEGORY = 12;
static QString months[MAX_CATEGORY]; static QString months[MAX_CATEGORY];
@ -67,10 +69,11 @@ public:
int _language; int _language;
void OnButtonClicked(QEvent& event); private slots:
void OnButtonChangeUser(QEvent& event); void OnButtonClicked();
void OnButtonAbout(QEvent& event); void OnButtonChangeUser();
void OnButtonQuit(QEvent& event); void OnButtonAbout();
void OnButtonQuit();
private: private:
KissCount *_kiss; KissCount *_kiss;