FET Forum

FET Support (English) => Programming Help => Topic started by: Mejda on June 01, 2012, 10:35:16 AM

Title: how I print timetables
Post by: Mejda on June 01, 2012, 10:35:16 AM
Hi Liviu,
I want to identify the location in program when I modify the paper which includes all times tables of teachers after printing   because for single timetables I modify functions singleTeachersTimetableDaysHorizontalHtml() and singleTeachersTimetableDaysVerticalHtml () .. but for this paper I can't identify function responsible for his generation
thank you :)
Title: Re: how I print timetables
Post by: Volker Dirr on June 01, 2012, 01:12:48 PM
i am not sure if i understood your request correct.
please tell me more detailed about which html file you are talking.
or are you talking about printing an a paper (not in the html file)?
then please have a look in src/interface/timetableprintform.cpp
Title: Re: how I print timetables
Post by: Mejda on June 01, 2012, 01:27:35 PM
Hi,
yes I speak about printing paper so I want to add in the paper printed (wich contained all teacher) the liste of names of teachers 
I search just location when I do this modification
thank you
Title: Re: how I print timetables
Post by: Zsolt Udvari on June 01, 2012, 04:01:01 PM
You can open the generated htmls in excel and you can easely correct  and format if you want only print.
Title: Re: how I print timetables
Post by: Mejda on June 01, 2012, 05:21:20 PM
Sorry I do not understood your suggestion but I want with printing interface of my application I have this forme. because when I want to do modification in single timetables I do it in functions of which I spoke above but this paper I cant modify it
(I want add paper before papers contains timetables which contain liste of teachers names)  :)
Title: Re: how I print timetables
Post by: Volker Dirr on June 01, 2012, 05:44:04 PM
you must do that in src/interface/timetableprintform.cpp
you need to add html code to the Qstring tmp.

so you must modify line 865-866.
between the if and the for command your code is needed. do it with a switch like i done it a few lines later.

if(RBDaysHorizontal->isChecked()){
                switch(CBTables->currentIndex()){
case 0: ...
                        ***your code***
default: assert(0==1);
}
for(int iNi=0; iNi<includedNamesIndex.size(); iNi++){
switch(CBTables->currentIndex()){
case 0: ...
                                ***my code***
default: assert(0==1);
}


do it similar in the following places.
Title: Re: how I print timetables
Post by: Mejda on June 03, 2012, 11:18:04 AM
Ok thank you Volker Dirr, it is ok I happened to see the names of teachers but I want them be links not simple text have you a method to insert links in pdf files  :)
Title: Re: how I print timetables
Post by: Volker Dirr on June 03, 2012, 01:10:26 PM
i guess you done already the links in the html source.
if the links are not converted from html to pdf, then i fear you can't solve that in the fet source.
you must fix that problem in the html2pdf converter you are using. so please ask the guys of that software why the html links are not converted or how to do it.