Timesheet programme

Hi community,

i would like to write a timesheet programme with qtRuby. Now I have a
lot of problems to do that. At the beginning it sounds very easy to
programme
a timesheet but it’s not like it seems…

So:
I uploaded a picture from the GUI I have created. The Software is still
working very fine, but i dont implemented a CalenderWidget, yet.
That is my problem at the moment. For every day i need a new
TableWidget, where the Projects with the working hours for each Projects
are.
And if i navigate to the day before to look in which Projects i worked i
need the created working hours at that day.

I hope you get my problem with my bad english.

My idea is that I can create an Array.

date = Array.new

every day i can write in date to create a new tablewidget object.

date[0] = TableWidget.new and next day
date[1] = TableWidget.new.

But i dont like this version of solution. It is verry terrible and after
one year I have an Array with 365+1 elements :D, haha.

Can you help me to solve the problem.

On Tue, Oct 15, 2013 at 1:45 PM, ulf georg [email protected] wrote:

Hi community,

i would like to write a timesheet programme with qtRuby.

Would be awesome if you could share the code, I am really interested in
building desktop applications using Ruby, but never found good resources
to
help me.

My idea is that I can create an Array.

Why an array, why can’t u store it into the DB and load from there?

Would be awesome if you could share the code, I am really interested in
building desktop applications using Ruby, but never found good resources
to
help me.
Write a pm message with your mail adress.

Why an array, why can’t u store it into the DB and load from there?
Do you know how I can create a internal DB with Ruby…

Have I understood correctly? I have only one TableWidget. And if I
change the date i look in my DB if any entries exists? If exists then
load in tablewidget and if not display a empty tablewidget?

Here’s an option you might consider:

I wrote a basic timesheet program using a Rails server on the local
network, and a host named “timesheet”. It uses a SQLite database backend
via Active Record. Even following a basic Rails tutorial gets you most
of the way there.

On Tue, Oct 15, 2013 at 2:31 PM, ulf georg [email protected] wrote:

Would be awesome if you could share the code, I am really interested in
building desktop applications using Ruby, but never found good resources
to
help me.
Write a pm message with your mail adress.

I have just send you my mail id.

Why an array, why can’t u store it into the DB and load from there?
Do you know how I can create a internal DB with Ruby…

Sequel is a light weight ruby library which can be used t communicate
with
databases. The exams provided in the website are straight forward and
simple.

http://sequel.rubyforge.org/

Have I understood correctly? I have only one TableWidget. And if I
change the date i look in my DB if any entries exists? If exists then
load in tablewidget and if not display a empty tablewidget?

yes

Try it with these files and instructions:

https://www.ruby-forum.com/topic/4415126#1113976

Thanks virtuoso.

I will try it and will give u a feedback. I hope it will work :).

it doesnt work. Same problem. I dont know what to do next… Same
message. sqlite3.h is missing. I followed the steps outlined in the link
above.

I solved the problem.

The problem was fixed with:
gem install sqlite3 --source http://rubygems.org/

I have just send you my mail id.
I send you the code…

Sequel is a light weight ruby library which can be used t communicate
with
databases. The exams provided in the website are straight forward and
simple.

http://sequel.rubyforge.org/

I installed the gem sequel. If I want to use it i get a error message
LoadError: no such file to load – sqlite3 (Sequel::AdapterNotFound)

Ok i have to install the gem sqlite3. First, i installed sqlite on
Windows in directory C:\sqlite and set this dir in the environment
variables.

in C:\sqlite\include are the files
sqlite3.h
sqlite3ext.h

and in C:\sqlite\liby are the files
shell.c
sqlite3.c

Now if i want to install the gem

gem install --local sqlite3-1.3.8.gem --platform=ruby –
–with-sqlite3-include=/c:/sqlite/ --with-sqlite3-lib=/c:/sqlite3/liby/

The mkmf.log file:
find_header: checking for sqlite3.h… -------------------- no

“cl -nologo -E -I. -ID:/GS/Ruby187/ruby/lib/ruby/1.8/i386-mswin32 -I.
-I/c:/sqlite/ -MD -Zi -O2b2xg- -G6 -W3 conftest.c -P”
checked program was:
/* begin /
1: #include <sqlite3.h>
/
end */


C:\Users\ulf>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mswin32]

C:\Users\ulf>gem -v
2.0.3

It doens’t work. sqlite3.h is missing. What is going wrong?