Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle

This commit is contained in:
DrSlony
2015-08-11 11:55:03 +02:00
parent effb46c3e1
commit 0e0cfb9b25
452 changed files with 133354 additions and 99460 deletions

View File

@@ -7,7 +7,7 @@
* 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.
*
*
* RawTherapee 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
@@ -37,29 +37,33 @@ Cairo::RefPtr<Cairo::ImageSurface> FileThumbnailButtonSet::colorLabelIcon_3;
Cairo::RefPtr<Cairo::ImageSurface> FileThumbnailButtonSet::colorLabelIcon_4;
Cairo::RefPtr<Cairo::ImageSurface> FileThumbnailButtonSet::colorLabelIcon_5;
FileThumbnailButtonSet::FileThumbnailButtonSet (FileBrowserEntry* myEntry) {
FileThumbnailButtonSet::FileThumbnailButtonSet (FileBrowserEntry* myEntry)
{
if (!iconsLoaded) {
unRankIcon = safe_create_from_png ("ratednotg.png");
rankIcon = safe_create_from_png ("rated.png");
gRankIcon = safe_create_from_png ("grayrated.png");
trashIcon = safe_create_from_png ("trash-thumbnail.png");
unTrashIcon = safe_create_from_png ("undelete-thumbnail.png");
processIcon = safe_create_from_png ("processing-thumbnail.png");
unRankIcon = safe_create_from_png ("ratednotg.png");
rankIcon = safe_create_from_png ("rated.png");
gRankIcon = safe_create_from_png ("grayrated.png");
trashIcon = safe_create_from_png ("trash-thumbnail.png");
unTrashIcon = safe_create_from_png ("undelete-thumbnail.png");
processIcon = safe_create_from_png ("processing-thumbnail.png");
colorLabelIcon_0 = safe_create_from_png ("cglabel0.png"); //("nocolorlabel.png");
colorLabelIcon_1 = safe_create_from_png ("clabel1.png");
colorLabelIcon_2 = safe_create_from_png ("clabel2.png");
colorLabelIcon_3 = safe_create_from_png ("clabel3.png");
colorLabelIcon_4 = safe_create_from_png ("clabel4.png");
colorLabelIcon_5 = safe_create_from_png ("clabel5.png");
iconsLoaded = true;
colorLabelIcon_0 = safe_create_from_png ("cglabel0.png"); //("nocolorlabel.png");
colorLabelIcon_1 = safe_create_from_png ("clabel1.png");
colorLabelIcon_2 = safe_create_from_png ("clabel2.png");
colorLabelIcon_3 = safe_create_from_png ("clabel3.png");
colorLabelIcon_4 = safe_create_from_png ("clabel4.png");
colorLabelIcon_5 = safe_create_from_png ("clabel5.png");
iconsLoaded = true;
}
add (new LWButton (processIcon, 6, myEntry, LWButton::Left, LWButton::Center, M("FILEBROWSER_POPUPPROCESS")));
add (new LWButton (unRankIcon, 0, myEntry, LWButton::Left, LWButton::Center, M("FILEBROWSER_UNRANK_TOOLTIP")));
for (int i=0; i<5; i++)
add (new LWButton (rankIcon, i+1, myEntry, LWButton::Left));
for (int i = 0; i < 5; i++) {
add (new LWButton (rankIcon, i + 1, myEntry, LWButton::Left));
}
add (new LWButton (trashIcon, 7, myEntry, LWButton::Right, LWButton::Center, M("FILEBROWSER_POPUPTRASH")));
add (new LWButton (colorLabelIcon_0, 8, myEntry, LWButton::Right, LWButton::Center, M("FILEBROWSER_COLORLABEL_TOOLTIP")));
@@ -71,24 +75,45 @@ FileThumbnailButtonSet::FileThumbnailButtonSet (FileBrowserEntry* myEntry) {
buttons[6]->setToolTip (M("FILEBROWSER_RANK5_TOOLTIP"));
}
void FileThumbnailButtonSet::setRank (int stars) {
void FileThumbnailButtonSet::setRank (int stars)
{
for (int i=1; i<=5; i++)
buttons[i+1]->setIcon (i<=stars ? rankIcon : gRankIcon);
for (int i = 1; i <= 5; i++) {
buttons[i + 1]->setIcon (i <= stars ? rankIcon : gRankIcon);
}
}
void FileThumbnailButtonSet::setColorLabel (int colorLabel) {
void FileThumbnailButtonSet::setColorLabel (int colorLabel)
{
if (colorLabel==0) buttons[8]->setIcon (colorLabelIcon_0); //transparent label
if (colorLabel==1) buttons[8]->setIcon (colorLabelIcon_1);
if (colorLabel==2) buttons[8]->setIcon (colorLabelIcon_2);
if (colorLabel==3) buttons[8]->setIcon (colorLabelIcon_3);
if (colorLabel==4) buttons[8]->setIcon (colorLabelIcon_4);
if (colorLabel==5) buttons[8]->setIcon (colorLabelIcon_5);
if (colorLabel == 0) {
buttons[8]->setIcon (colorLabelIcon_0); //transparent label
}
if (colorLabel == 1) {
buttons[8]->setIcon (colorLabelIcon_1);
}
if (colorLabel == 2) {
buttons[8]->setIcon (colorLabelIcon_2);
}
if (colorLabel == 3) {
buttons[8]->setIcon (colorLabelIcon_3);
}
if (colorLabel == 4) {
buttons[8]->setIcon (colorLabelIcon_4);
}
if (colorLabel == 5) {
buttons[8]->setIcon (colorLabelIcon_5);
}
}
void FileThumbnailButtonSet::setInTrash (bool inTrash) {
void FileThumbnailButtonSet::setInTrash (bool inTrash)
{
buttons[7]->setIcon (inTrash ? unTrashIcon : trashIcon);
buttons[7]->setToolTip (inTrash ? M("FILEBROWSER_POPUPUNTRASH") : M("FILEBROWSER_POPUPTRASH"));
buttons[7]->setIcon (inTrash ? unTrashIcon : trashIcon);
buttons[7]->setToolTip (inTrash ? M("FILEBROWSER_POPUPUNTRASH") : M("FILEBROWSER_POPUPTRASH"));
}