Permalink
Browse files

7a4fcd5 - poprawki z komentarza

Poprawiono estetyczny wygląd i działanie Item::CountLines
Dodano "const" do getterów.
Dokonano redukcji wielkości obrazów. Zmniejszono z 1920 na 720.
  • Loading branch information...
Barto-Paja committed May 28, 2017
1 parent cd1a0d7 commit 06a7f9157b64ef4f6a1fd3885dc252af4b49e44e
Showing with 23 additions and 261 deletions.
  1. +2 −0 .gitignore
  2. +3 −249 SHS.pro.user
  3. +3 −3 album.cpp
  4. +3 −4 categories.cpp
  5. +1 −1 dialog.ui
  6. +1 −1 dialogt.cpp
  7. +7 −1 dialogt.ui
  8. BIN img/Ambulans_by_Ron.jpg
  9. BIN img/Policyjne_radiowozy.jpg
  10. BIN img/alarmylogo.png
  11. BIN img/architecture1920.jpg
  12. BIN img/bear1920.jpg
  13. BIN img/birds1920.jpg
  14. BIN img/budzik1920.jpg
  15. BIN img/camel1280.jpg
  16. BIN img/car1920.jpg
  17. BIN img/cat1280.jpg
  18. BIN img/chicken1280.jpg
  19. BIN img/clarinet1280.png
  20. BIN img/cruise1920.jpg
  21. BIN img/czajnik1920.jpg
  22. BIN img/dog1280.jpg
  23. BIN img/donkey1280.jpg
  24. BIN img/drums1280.png
  25. BIN img/duck1280.jpg
  26. BIN img/dzwonki1280.jpg
  27. BIN img/elephant1920.jpg
  28. BIN img/flute1280.jpg
  29. BIN img/giraffe1280.jpg
  30. BIN img/gitaraA1280.jpg
  31. BIN img/goat1280.jpg
  32. BIN img/goose1280.jpg
  33. BIN img/gustavo-belemmi-67037.jpg
  34. BIN img/helicopter1920.jpg
  35. BIN img/hippo1280.jpg
  36. BIN img/horse1280.jpg
  37. BIN img/instrumentylogo.jpg
  38. BIN img/klaskanie1920.jpg
  39. BIN img/kogut1280.jpg
  40. BIN img/krowa1280.jpg
  41. BIN img/lion1920.jpg
  42. BIN img/luis-llerena-14738.jpg
  43. BIN img/motor1920.jpg
  44. BIN img/owl1280.jpg
  45. BIN img/parrot1280.jpg
  46. BIN img/piano225907.jpg
  47. BIN img/pig1280.jpg
  48. BIN img/plusk1920.jpg
  49. BIN img/pukaniedodrzwi1920.jpg
  50. BIN img/samolot1920.jpg
  51. BIN img/sheep1280.jpg
  52. BIN img/snake1280.jpg
  53. BIN img/snake1920.jpg
  54. BIN img/squirrel-monkey1280.jpg
  55. BIN img/stork1280.jpg
  56. BIN img/strazpmpazdziora.jpg
  57. BIN img/suszarka1920.jpg
  58. BIN img/tczew920.jpg
  59. BIN img/telefon920.jpg
  60. BIN img/train.jpg
  61. BIN img/traktor1920.jpg
  62. BIN img/triangle-bell1280.jpg
  63. BIN img/trumpet222667.jpg
  64. BIN img/tuba1280.jpg
  65. BIN img/turkey1280.jpg
  66. BIN img/violin1280.png
  67. BIN img/wolf1280.jpg
  68. BIN img/wrobel1280.jpg
  69. BIN img/zEgzotycznelogo.jpg
  70. BIN img/zebra1280.jpg
  71. BIN img/zwierzetalogo.jpg
  72. +1 −0 item.cpp
  73. +2 −2 txt/zestawy.txt
@@ -1,3 +1,5 @@
SHS.pro.user
SHS.pro.user
SHS.pro.user
*.user
SHS.pro.user

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -50,9 +50,9 @@ void Album::SetupGui(QString &f)
{
int n;
QFile p(f);
Item::CountLines(p,n=0);
n=n/3;
for(int i=0; i<n; i++)
Item::CountLines(p,n);
for(int i=0; i<(n/3); i++)
{
l_myLabels << new myQLabel(this);
l_myLabels.at(i)->SetRef(i);
@@ -47,12 +47,11 @@ void Categories::SetupGui(QVector<Item>& v_it, QString& file)
int n;
Item::Import(v_it,file);
Item::CountLines(f,n=0);
Item::CountLines(f,n);
ui->gridLayout->setSpacing(10);
n=n/3;
for(int i=0;i<n;i++)
for(int i=0;i<(n/3);i++)
{
l_myLabels << new myQLabel(this);
l_myLabels.at(i)->SetRef(i);
@@ -61,7 +60,7 @@ void Categories::SetupGui(QVector<Item>& v_it, QString& file)
l_myLabels.at(i)->setAlignment(Qt::AlignCenter);
}
for(int i=0;i<n;i++)
for(int i=0;i<(n/3);i++)
{
ui->gridLayout->addWidget(l_myLabels.at(i),(i/3),(i%3));
connect(l_myLabels.at(i),SIGNAL(Pressed(int)),this,SLOT(Pressed(int)));
@@ -23,7 +23,7 @@
</rect>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>TextLabel</string>
@@ -90,7 +90,7 @@ void DialogT::questsource(QString source)
Item::Import( v_categoryitems, source);
QFile cont(source);
Item::CountLines(cont,t=0);
Item::CountLines(cont,t);
ui->label->setPixmap(v_categoryitems[idx].SeeImg().scaled(640,300,Qt::KeepAspectRatio));
setAnswer(v_categoryitems[idx].SeeName());
@@ -22,8 +22,14 @@
<height>301</height>
</rect>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>TextLabel</string>
BIN -1.13 MB (12%) img/Ambulans_by_Ron.jpg
Binary file not shown.
BIN -4.86 MB (5.3%) img/Policyjne_radiowozy.jpg
Binary file not shown.
BIN -118 KB img/alarmylogo.png
Binary file not shown.
Binary file not shown.
BIN -967 KB (20%) img/bear1920.jpg
Binary file not shown.
BIN +52.3 KB img/birds1920.jpg
Binary file not shown.
BIN -264 KB (16%) img/budzik1920.jpg
Binary file not shown.
BIN -119 KB (41%) img/camel1280.jpg
Binary file not shown.
BIN -413 KB (22%) img/car1920.jpg
Binary file not shown.
BIN -112 KB (47%) img/cat1280.jpg
Binary file not shown.
BIN -113 KB (55%) img/chicken1280.jpg
Binary file not shown.
BIN -108 KB (22%) img/clarinet1280.png
Binary file not shown.
BIN -483 KB (18%) img/cruise1920.jpg
Binary file not shown.
BIN -341 KB (19%) img/czajnik1920.jpg
Binary file not shown.
BIN -137 KB (47%) img/dog1280.jpg
Binary file not shown.
BIN -228 KB (47%) img/donkey1280.jpg
Binary file not shown.
BIN -946 KB (37%) img/drums1280.png
Binary file not shown.
BIN -92.3 KB (40%) img/duck1280.jpg
Binary file not shown.
BIN -159 KB (50%) img/dzwonki1280.jpg
Binary file not shown.
BIN -826 KB (17%) img/elephant1920.jpg
Binary file not shown.
BIN -84.4 KB (27%) img/flute1280.jpg
Binary file not shown.
BIN -204 KB (41%) img/giraffe1280.jpg
Binary file not shown.
BIN -49.9 KB (48%) img/gitaraA1280.jpg
Binary file not shown.
BIN -259 KB (51%) img/goat1280.jpg
Binary file not shown.
BIN -228 KB (42%) img/goose1280.jpg
Binary file not shown.
BIN -6.05 MB (3.7%) img/gustavo-belemmi-67037.jpg
Diff not rendered.
BIN -288 KB (25%) img/helicopter1920.jpg
Diff not rendered.
BIN -262 KB (43%) img/hippo1280.jpg
Diff not rendered.
BIN -116 KB (52%) img/horse1280.jpg
Diff not rendered.
BIN +31.9 KB (150%) img/instrumentylogo.jpg
Diff not rendered.
BIN -420 KB (18%) img/klaskanie1920.jpg
Diff not rendered.
BIN -117 KB (52%) img/kogut1280.jpg
Diff not rendered.
BIN -413 KB (38%) img/krowa1280.jpg
Diff not rendered.
BIN -582 KB (20%) img/lion1920.jpg
Diff not rendered.
Diff not rendered.
BIN -477 KB (19%) img/motor1920.jpg
Diff not rendered.
BIN -222 KB (49%) img/owl1280.jpg
Diff not rendered.
BIN -121 KB (52%) img/parrot1280.jpg
Diff not rendered.
BIN -2.12 MB (5.9%) img/piano225907.jpg
Diff not rendered.
BIN -217 KB (45%) img/pig1280.jpg
Diff not rendered.
BIN -565 KB (10%) img/plusk1920.jpg
Diff not rendered.
BIN -738 KB (14%) img/pukaniedodrzwi1920.jpg
Diff not rendered.
BIN -388 KB (14%) img/samolot1920.jpg
Diff not rendered.
BIN -184 KB (44%) img/sheep1280.jpg
Diff not rendered.
BIN -278 KB (46%) img/snake1280.jpg
Diff not rendered.
BIN -397 KB (24%) img/snake1920.jpg
Diff not rendered.
BIN -175 KB (47%) img/squirrel-monkey1280.jpg
Diff not rendered.
BIN -196 KB (50%) img/stork1280.jpg
Diff not rendered.
BIN -353 KB (32%) img/strazpmpazdziora.jpg
Diff not rendered.
BIN -213 KB (20%) img/suszarka1920.jpg
Diff not rendered.
BIN -513 KB (20%) img/tczew920.jpg
Diff not rendered.
BIN -389 KB (18%) img/telefon920.jpg
Diff not rendered.
BIN -14.4 MB (2.5%) img/train.jpg
Diff not rendered.
BIN -865 KB (21%) img/traktor1920.jpg
Diff not rendered.
BIN -4.39 KB (97%) img/triangle-bell1280.jpg
Diff not rendered.
BIN -19.2 MB (1.4%) img/trumpet222667.jpg
Diff not rendered.
BIN -127 KB (72%) img/tuba1280.jpg
Diff not rendered.
BIN -313 KB (47%) img/turkey1280.jpg
Diff not rendered.
BIN -491 KB (16%) img/violin1280.png
Diff not rendered.
BIN -182 KB (48%) img/wolf1280.jpg
Diff not rendered.
BIN -166 KB (43%) img/wrobel1280.jpg
Diff not rendered.
BIN +53.1 KB (140%) img/zEgzotycznelogo.jpg
Diff not rendered.
BIN -229 KB (48%) img/zebra1280.jpg
Diff not rendered.
BIN +25.2 KB (150%) img/zwierzetalogo.jpg
Diff not rendered.
@@ -37,6 +37,7 @@ int Item::CountLines(QFile &f, int& i)
QString buffer;
QTextStream stream(&f);
i=0; // <-- resetowanie zmiennej
f.open(QFile::ReadOnly);
while(!stream.atEnd())
{
@@ -4,7 +4,7 @@ Zwierzęta
./img/zEgzotycznelogo.jpg
:/txt/txt/ZwierzetaEgzotyczne.txt
Zwierzęta Egzotyczne
./img/luis-llerena-14738.jpg
./img/birds1920.jpg
:/txt/txt/Ptaki.txt
Ptaki
./img/instrumentylogo.jpg
@@ -13,6 +13,6 @@ Instrumenty
./img/gustavo-belemmi-67037.jpg
:/txt/txt/Pojazdy.txt
Pojazdy
./img/alarmylogo.png
./img/architecture1920.jpg
:/txt/txt/Inne.txt
Inne

0 comments on commit 06a7f91

Please sign in to comment.