Users Dialog OK

This commit is contained in:
Grégory Soutadé 2011-09-03 10:38:36 +02:00
parent 658ec606ed
commit db46080b50
3 changed files with 21 additions and 12 deletions

View File

@ -1,37 +1,40 @@
ROOT_DIR="/usr/local"
LIB_DIR=$(DESTDIR)$(ROOT_DIR)"/lib/kisscount/"
#LIB_DIR=$(DESTDIR)$(ROOT_DIR)"/lib/kisscount/"
SHARE_DIR=$(DESTDIR)$(ROOT_DIR)"/share/kisscount/"
DOC_DIR=$(DESTDIR)$(ROOT_DIR)"/share/doc/kisscount/"
BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/"
CXXFLAGS=`pkg-config --cflags QtCore QtGui QtSql` -Wall -Isrc -ggdb
QT_PACKAGES="QtCore QtGui QtSql"
CXXFLAGS=`pkg-config --cflags $(QT_PACKAGES)` -Wall -Isrc -ggdb
CXXFLAGS+=-I/usr/include/libxml2
CXXFLAGS+=-Wl,--rpath,"$(LIB_DIR)"
CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\""
# For developpers
#CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\""
LDFLAGS=`pkg-config --libs QtCore QtGui QtSql`
LDFLAGS=`pkg-config --libs $(QT_PACKAGES)`
LDFLAGS+=-lofx
LDFLAGS+=-lxml2
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' ' ')
HEADERS=$(shell find src -name '*.h' -type f)
MOCS=$(MOC_HEADERS:.hpp=.moc)
OBJS=$(SOURCES:.cpp=.o)
all: kc
clean:
find src -type f -name '*.[o~]' -exec rm -f \{\} \;
find src -type f -name '*.moc' -exec rm -f \{\} \;
rm -f kc
# %.o : src/model/%.cpp src/model/import/%.cpp src/model/export/%.cpp src/view/%.cpp src/view/grid/%.cpp src/controller/%.cpp src/%.cpp
%.o : src/model/%.cpp src/model/import/%.cpp src/model/export/%.cpp src/view/%.cpp src/controller/%.cpp src/%.cpp src/%.c
%.o : $(MOCS) $(SOURCES)
$(CXX) $(CXXFLAGS) -c $<
%.moc : src/view/%.hpp
moc -nw $^ -o $<
kc: $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
@ -47,9 +50,8 @@ package:
endif
install:
mkdir -p $(LIB_DIR) $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
mkdir -p $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
cp kc $(BIN_DIR)
find lib -name '*.so*' -exec cp -rf \{\} $(LIB_DIR) \;
cp -rf ressources/* $(SHARE_DIR)
cp -rf README* ChangeLog CONTRIBUTORS COPYING TODO $(DOC_DIR)

View File

@ -173,7 +173,11 @@ QString Database::HashPassword(const QString& password)
blk_SHA1_Final(sha, &sha_ctx);
for(int i=0; i<20; i++)
{
if (((int)sha[i]) <= 16)
res += "0" ;
res += QString::number((int)sha[i], 16);
}
return res;
}

View File

@ -33,6 +33,8 @@
*/
#include "wxUI.hpp"
#include "UsersDialog.hpp"
enum {BUTTON_CHANGE_USER_ID=-4, BUTTON_ABOUT_ID=-5, BUTTON_QUIT_ID=-6};
QString wxUI::months[12] ;
@ -82,7 +84,7 @@ wxUI::wxUI(KissCount* kiss, const QString& title)
wxUI::~wxUI()
{
int i;
//int i;
// for (i=0; i<(int)_panels.size(); i++)
// Disconnect(i, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxUI::OnButtonClicked), _panels[i], this);
@ -250,7 +252,8 @@ void wxUI::OnButtonChangeUser(QEvent& event)
void wxUI::ChangeUser()
{
// UsersDialog u(_kiss, this);
UsersDialog u(_kiss, this);
u.exec();
}
void wxUI::OnButtonAbout(QEvent& event)