freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][reorg-maingui] [ftinspect] Rename all pri


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][reorg-maingui] [ftinspect] Rename all private member variables with an underscore suffix.
Date: Wed, 29 Jun 2022 14:27:42 +0000

Charlie Jiang pushed to branch reorg-maingui at FreeType / FreeType Demo Programs

Commits:

  • e61795ff
    by Charlie Jiang at 2022-06-29T22:24:57+08:00
    [ftinspect] Rename all private member variables with an underscore suffix.
    
    (pure mechnical commit)
    
    * src/ftinspect/**: Renaming. Also some variables with abbreviations
    were renamed.
    
    This will enable nicer getter/setters, as discussed in #13.
    

18 changed files:

Changes:

  • src/ftinspect/engine/engine.cpp
    ... ... @@ -87,7 +87,7 @@ faceRequester(FTC_FaceID ftcFaceID,
    87 87
                  "Pointer size must be at least the size of int"
    
    88 88
                  " in order to treat FTC_FaceID correctly");
    
    89 89
     
    
    90
    -  const FaceID& faceID = engine->faceIDMap.key(val);
    
    90
    +  const FaceID& faceID = engine->faceIDMap_.key(val);
    
    91 91
     
    
    92 92
       // this is the only place where we have to check the validity of the font
    
    93 93
       // index; note that the validity of both the face and named instance index
    
    ... ... @@ -96,7 +96,7 @@ faceRequester(FTC_FaceID ftcFaceID,
    96 96
           || faceID.fontIndex >= engine->numberOfOpenedFonts())
    
    97 97
         return FT_Err_Invalid_Argument;
    
    98 98
     
    
    99
    -  QString font = engine->fileManager[faceID.fontIndex].filePath();
    
    99
    +  QString font = engine->fontFileManager_[faceID.fontIndex].filePath();
    
    100 100
       long faceIndex = faceID.faceIndex;
    
    101 101
     
    
    102 102
       if (faceID.namedInstanceIndex > 0)
    
    ... ... @@ -117,32 +117,32 @@ faceRequester(FTC_FaceID ftcFaceID,
    117 117
     
    
    118 118
     Engine::Engine()
    
    119 119
     {
    
    120
    -  ftSize = NULL;
    
    120
    +  ftSize_ = NULL;
    
    121 121
       // we reserve value 0 for the `invalid face ID'
    
    122
    -  faceCounter = 1;
    
    122
    +  faceCounter_ = 1;
    
    123 123
     
    
    124 124
       FT_Error error;
    
    125 125
     
    
    126
    -  error = FT_Init_FreeType(&library);
    
    126
    +  error = FT_Init_FreeType(&library_);
    
    127 127
       if (error)
    
    128 128
       {
    
    129 129
         // XXX error handling
    
    130 130
       }
    
    131 131
     
    
    132
    -  error = FTC_Manager_New(library, 0, 0, 0,
    
    133
    -                          faceRequester, this, &cacheManager);
    
    132
    +  error = FTC_Manager_New(library_, 0, 0, 0,
    
    133
    +                          faceRequester, this, &cacheManager_);
    
    134 134
       if (error)
    
    135 135
       {
    
    136 136
         // XXX error handling
    
    137 137
       }
    
    138 138
     
    
    139
    -  error = FTC_SBitCache_New(cacheManager, &sbitsCache);
    
    139
    +  error = FTC_SBitCache_New(cacheManager_, &sbitsCache_);
    
    140 140
       if (error)
    
    141 141
       {
    
    142 142
         // XXX error handling
    
    143 143
       }
    
    144 144
     
    
    145
    -  error = FTC_ImageCache_New(cacheManager, &imageCache);
    
    145
    +  error = FTC_ImageCache_New(cacheManager_, &imageCache_);
    
    146 146
       if (error)
    
    147 147
       {
    
    148 148
         // XXX error handling
    
    ... ... @@ -154,8 +154,8 @@ Engine::Engine()
    154 154
     
    
    155 155
     Engine::~Engine()
    
    156 156
     {
    
    157
    -  FTC_Manager_Done(cacheManager);
    
    158
    -  FT_Done_FreeType(library);
    
    157
    +  FTC_Manager_Done(cacheManager_);
    
    158
    +  FT_Done_FreeType(library_);
    
    159 159
     }
    
    160 160
     
    
    161 161
     
    
    ... ... @@ -167,28 +167,28 @@ Engine::numberOfFaces(int fontIndex)
    167 167
     
    
    168 168
       // search triplet (fontIndex, 0, 0)
    
    169 169
       FTC_FaceID ftcFaceID = reinterpret_cast<FTC_FaceID>
    
    170
    -                           (faceIDMap.value(FaceID(fontIndex,
    
    170
    +                           (faceIDMap_.value(FaceID(fontIndex,
    
    171 171
                                                        0,
    
    172 172
                                                        0)));
    
    173 173
       if (ftcFaceID)
    
    174 174
       {
    
    175 175
         // found
    
    176
    -    if (!FTC_Manager_LookupFace(cacheManager, ftcFaceID, &face))
    
    176
    +    if (!FTC_Manager_LookupFace(cacheManager_, ftcFaceID, &face))
    
    177 177
           numFaces = face->num_faces;
    
    178 178
       }
    
    179 179
       else
    
    180 180
       {
    
    181 181
         // not found; try to load triplet (fontIndex, 0, 0)
    
    182
    -    ftcFaceID = reinterpret_cast<FTC_FaceID>(faceCounter);
    
    183
    -    faceIDMap.insert(FaceID(fontIndex, 0, 0),
    
    184
    -                     faceCounter++);
    
    182
    +    ftcFaceID = reinterpret_cast<FTC_FaceID>(faceCounter_);
    
    183
    +    faceIDMap_.insert(FaceID(fontIndex, 0, 0),
    
    184
    +                     faceCounter_++);
    
    185 185
     
    
    186
    -    if (!FTC_Manager_LookupFace(cacheManager, ftcFaceID, &face))
    
    186
    +    if (!FTC_Manager_LookupFace(cacheManager_, ftcFaceID, &face))
    
    187 187
           numFaces = face->num_faces;
    
    188 188
         else
    
    189 189
         {
    
    190
    -      faceIDMap.remove(FaceID(fontIndex, 0, 0));
    
    191
    -      faceCounter--;
    
    190
    +      faceIDMap_.remove(FaceID(fontIndex, 0, 0));
    
    191
    +      faceCounter_--;
    
    192 192
         }
    
    193 193
       }
    
    194 194
     
    
    ... ... @@ -207,28 +207,28 @@ Engine::numberOfNamedInstances(int fontIndex,
    207 207
     
    
    208 208
       // search triplet (fontIndex, faceIndex, 0)
    
    209 209
       FTC_FaceID ftcFaceID = reinterpret_cast<FTC_FaceID>
    
    210
    -                           (faceIDMap.value(FaceID(fontIndex,
    
    210
    +                           (faceIDMap_.value(FaceID(fontIndex,
    
    211 211
                                                        faceIndex,
    
    212 212
                                                        0)));
    
    213 213
       if (ftcFaceID)
    
    214 214
       {
    
    215 215
         // found
    
    216
    -    if (!FTC_Manager_LookupFace(cacheManager, ftcFaceID, &face))
    
    216
    +    if (!FTC_Manager_LookupFace(cacheManager_, ftcFaceID, &face))
    
    217 217
           numNamedInstances = static_cast<int>((face->style_flags >> 16) + 1);
    
    218 218
       }
    
    219 219
       else
    
    220 220
       {
    
    221 221
         // not found; try to load triplet (fontIndex, faceIndex, 0)
    
    222
    -    ftcFaceID = reinterpret_cast<FTC_FaceID>(faceCounter);
    
    223
    -    faceIDMap.insert(FaceID(fontIndex, faceIndex, 0),
    
    224
    -                     faceCounter++);
    
    222
    +    ftcFaceID = reinterpret_cast<FTC_FaceID>(faceCounter_);
    
    223
    +    faceIDMap_.insert(FaceID(fontIndex, faceIndex, 0),
    
    224
    +                     faceCounter_++);
    
    225 225
     
    
    226
    -    if (!FTC_Manager_LookupFace(cacheManager, ftcFaceID, &face))
    
    226
    +    if (!FTC_Manager_LookupFace(cacheManager_, ftcFaceID, &face))
    
    227 227
           numNamedInstances = static_cast<int>((face->style_flags >> 16) + 1);
    
    228 228
         else
    
    229 229
         {
    
    230
    -      faceIDMap.remove(FaceID(fontIndex, faceIndex, 0));
    
    231
    -      faceCounter--;
    
    230
    +      faceIDMap_.remove(FaceID(fontIndex, faceIndex, 0));
    
    231
    +      faceCounter_--;
    
    232 232
         }
    
    233 233
       }
    
    234 234
     
    
    ... ... @@ -242,60 +242,60 @@ Engine::loadFont(int fontIndex,
    242 242
                      int namedInstanceIndex)
    
    243 243
     {
    
    244 244
       int numGlyphs = -1;
    
    245
    -  fontType = FontType_Other;
    
    245
    +  fontType_ = FontType_Other;
    
    246 246
     
    
    247 247
       update();
    
    248 248
     
    
    249 249
       // search triplet (fontIndex, faceIndex, namedInstanceIndex)
    
    250
    -  scaler.face_id = reinterpret_cast<FTC_FaceID>
    
    251
    -                     (faceIDMap.value(FaceID(fontIndex,
    
    250
    +  scaler_.face_id = reinterpret_cast<FTC_FaceID>
    
    251
    +                     (faceIDMap_.value(FaceID(fontIndex,
    
    252 252
                                                  faceIndex,
    
    253 253
                                                  namedInstanceIndex)));
    
    254
    -  if (scaler.face_id)
    
    254
    +  if (scaler_.face_id)
    
    255 255
       {
    
    256 256
         // found
    
    257
    -    if (!FTC_Manager_LookupSize(cacheManager, &scaler, &ftSize))
    
    258
    -      numGlyphs = ftSize->face->num_glyphs;
    
    257
    +    if (!FTC_Manager_LookupSize(cacheManager_, &scaler_, &ftSize_))
    
    258
    +      numGlyphs = ftSize_->face->num_glyphs;
    
    259 259
       }
    
    260 260
       else
    
    261 261
       {
    
    262 262
         // not found; try to load triplet
    
    263 263
         // (fontIndex, faceIndex, namedInstanceIndex)
    
    264
    -    scaler.face_id = reinterpret_cast<FTC_FaceID>(faceCounter);
    
    265
    -    faceIDMap.insert(FaceID(fontIndex,
    
    264
    +    scaler_.face_id = reinterpret_cast<FTC_FaceID>(faceCounter_);
    
    265
    +    faceIDMap_.insert(FaceID(fontIndex,
    
    266 266
                                 faceIndex,
    
    267 267
                                 namedInstanceIndex),
    
    268
    -                     faceCounter++);
    
    268
    +                     faceCounter_++);
    
    269 269
     
    
    270
    -    if (!FTC_Manager_LookupSize(cacheManager, &scaler, &ftSize))
    
    271
    -      numGlyphs = ftSize->face->num_glyphs;
    
    270
    +    if (!FTC_Manager_LookupSize(cacheManager_, &scaler_, &ftSize_))
    
    271
    +      numGlyphs = ftSize_->face->num_glyphs;
    
    272 272
         else
    
    273 273
         {
    
    274
    -      faceIDMap.remove(FaceID(fontIndex,
    
    274
    +      faceIDMap_.remove(FaceID(fontIndex,
    
    275 275
                                   faceIndex,
    
    276 276
                                   namedInstanceIndex));
    
    277
    -      faceCounter--;
    
    277
    +      faceCounter_--;
    
    278 278
         }
    
    279 279
       }
    
    280 280
     
    
    281 281
       if (numGlyphs < 0)
    
    282 282
       {
    
    283
    -    ftSize = NULL;
    
    284
    -    curFamilyName = QString();
    
    285
    -    curStyleName = QString();
    
    283
    +    ftSize_ = NULL;
    
    284
    +    curFamilyName_ = QString();
    
    285
    +    curStyleName_ = QString();
    
    286 286
       }
    
    287 287
       else
    
    288 288
       {
    
    289
    -    curFamilyName = QString(ftSize->face->family_name);
    
    290
    -    curStyleName = QString(ftSize->face->style_name);
    
    289
    +    curFamilyName_ = QString(ftSize_->face->family_name);
    
    290
    +    curStyleName_ = QString(ftSize_->face->style_name);
    
    291 291
     
    
    292
    -    const char* moduleName = FT_FACE_DRIVER_NAME( ftSize->face );
    
    292
    +    const char* moduleName = FT_FACE_DRIVER_NAME( ftSize_->face );
    
    293 293
     
    
    294 294
         // XXX cover all available modules
    
    295 295
         if (!strcmp(moduleName, "cff"))
    
    296
    -      fontType = FontType_CFF;
    
    296
    +      fontType_ = FontType_CFF;
    
    297 297
         else if (!strcmp(moduleName, "truetype"))
    
    298
    -      fontType = FontType_TrueType;
    
    298
    +      fontType_ = FontType_TrueType;
    
    299 299
       }
    
    300 300
     
    
    301 301
       return numGlyphs;
    
    ... ... @@ -308,11 +308,11 @@ Engine::removeFont(int fontIndex, bool closeFile)
    308 308
       // we iterate over all triplets that contain the given font index
    
    309 309
       // and remove them
    
    310 310
       QMap<FaceID, FTC_IDType>::iterator iter
    
    311
    -    = faceIDMap.lowerBound(FaceID(fontIndex, 0, 0));
    
    311
    +    = faceIDMap_.lowerBound(FaceID(fontIndex, 0, 0));
    
    312 312
     
    
    313 313
       for (;;)
    
    314 314
       {
    
    315
    -    if (iter == faceIDMap.end())
    
    315
    +    if (iter == faceIDMap_.end())
    
    316 316
           break;
    
    317 317
     
    
    318 318
         FaceID faceID = iter.key();
    
    ... ... @@ -320,13 +320,13 @@ Engine::removeFont(int fontIndex, bool closeFile)
    320 320
           break;
    
    321 321
     
    
    322 322
         FTC_FaceID ftcFaceID = reinterpret_cast<FTC_FaceID>(iter.value());
    
    323
    -    FTC_Manager_RemoveFaceID(cacheManager, ftcFaceID);
    
    323
    +    FTC_Manager_RemoveFaceID(cacheManager_, ftcFaceID);
    
    324 324
     
    
    325
    -    iter = faceIDMap.erase(iter);
    
    325
    +    iter = faceIDMap_.erase(iter);
    
    326 326
       }
    
    327 327
     
    
    328 328
       if (closeFile)
    
    329
    -    fileManager.remove(fontIndex);
    
    329
    +    fontFileManager_.remove(fontIndex);
    
    330 330
     }
    
    331 331
     
    
    332 332
     
    
    ... ... @@ -338,10 +338,10 @@ Engine::glyphName(int index)
    338 338
       if (index < 0)
    
    339 339
         throw std::runtime_error("Invalid glyph index");
    
    340 340
     
    
    341
    -  if (ftSize && FT_HAS_GLYPH_NAMES(ftSize->face))
    
    341
    +  if (ftSize_ && FT_HAS_GLYPH_NAMES(ftSize_->face))
    
    342 342
       {
    
    343 343
         char buffer[256];
    
    344
    -    if (!FT_Get_Glyph_Name(ftSize->face,
    
    344
    +    if (!FT_Get_Glyph_Name(ftSize_->face,
    
    345 345
                                static_cast<unsigned int>(index),
    
    346 346
                                buffer,
    
    347 347
                                sizeof(buffer)))
    
    ... ... @@ -366,9 +366,9 @@ Engine::loadOutline(int glyphIndex)
    366 366
     
    
    367 367
       // the `scaler' object is set up by the
    
    368 368
       // `update' and `loadFont' methods
    
    369
    -  if (FTC_ImageCache_LookupScaler(imageCache,
    
    370
    -                                  &scaler,
    
    371
    -                                  loadFlags | FT_LOAD_NO_BITMAP,
    
    369
    +  if (FTC_ImageCache_LookupScaler(imageCache_,
    
    370
    +                                  &scaler_,
    
    371
    +                                  loadFlags_ | FT_LOAD_NO_BITMAP,
    
    372 372
                                       static_cast<unsigned int>(glyphIndex),
    
    373 373
                                       &glyph,
    
    374 374
                                       NULL))
    
    ... ... @@ -389,52 +389,52 @@ Engine::loadOutline(int glyphIndex)
    389 389
     int
    
    390 390
     Engine::numberOfOpenedFonts()
    
    391 391
     {
    
    392
    -  return fileManager.size();
    
    392
    +  return fontFileManager_.size();
    
    393 393
     }
    
    394 394
     
    
    395 395
     
    
    396 396
     void
    
    397 397
     Engine::openFonts(QStringList fontFileNames)
    
    398 398
     {
    
    399
    -  fileManager.append(fontFileNames);
    
    399
    +  fontFileManager_.append(fontFileNames);
    
    400 400
     }
    
    401 401
     
    
    402 402
     
    
    403 403
     void
    
    404 404
     Engine::setSizeByPixel(double pixelSize)
    
    405 405
     {
    
    406
    -  this->pixelSize = pixelSize;
    
    407
    -  pointSize = pixelSize * 72.0 / dpi;
    
    408
    -  usingPixelSize = true;
    
    406
    +  this->pixelSize_ = pixelSize;
    
    407
    +  pointSize_ = pixelSize * 72.0 / dpi_;
    
    408
    +  usingPixelSize_ = true;
    
    409 409
     }
    
    410 410
     
    
    411 411
     void
    
    412 412
     Engine::setSizeByPoint(double pointSize)
    
    413 413
     {
    
    414
    -  this->pointSize = pointSize;
    
    415
    -  pixelSize = pointSize * dpi / 72.0;
    
    416
    -  usingPixelSize = false;
    
    414
    +  this->pointSize_ = pointSize;
    
    415
    +  pixelSize_ = pointSize * dpi_ / 72.0;
    
    416
    +  usingPixelSize_ = false;
    
    417 417
     }
    
    418 418
     
    
    419 419
     
    
    420 420
     void
    
    421 421
     Engine::setLcdFilter(FT_LcdFilter filter)
    
    422 422
     {
    
    423
    -  FT_Library_SetLcdFilter(library, filter);
    
    423
    +  FT_Library_SetLcdFilter(library_, filter);
    
    424 424
     }
    
    425 425
     
    
    426 426
     
    
    427 427
     void
    
    428 428
     Engine::setCFFHintingMode(int mode)
    
    429 429
     {
    
    430
    -  FT_Error error = FT_Property_Set(library,
    
    430
    +  FT_Error error = FT_Property_Set(library_,
    
    431 431
                                        "cff",
    
    432 432
                                        "hinting-engine",
    
    433 433
                                        &mode);
    
    434 434
       if (!error)
    
    435 435
       {
    
    436 436
         // reset the cache
    
    437
    -    FTC_Manager_Reset(cacheManager);
    
    437
    +    FTC_Manager_Reset(cacheManager_);
    
    438 438
       }
    
    439 439
     }
    
    440 440
     
    
    ... ... @@ -442,14 +442,14 @@ Engine::setCFFHintingMode(int mode)
    442 442
     void
    
    443 443
     Engine::setTTInterpreterVersion(int version)
    
    444 444
     {
    
    445
    -  FT_Error error = FT_Property_Set(library,
    
    445
    +  FT_Error error = FT_Property_Set(library_,
    
    446 446
                                        "truetype",
    
    447 447
                                        "interpreter-version",
    
    448 448
                                        &version);
    
    449 449
       if (!error)
    
    450 450
       {
    
    451 451
         // reset the cache
    
    452
    -    FTC_Manager_Reset(cacheManager);
    
    452
    +    FTC_Manager_Reset(cacheManager_);
    
    453 453
       }
    
    454 454
     }
    
    455 455
     
    
    ... ... @@ -457,20 +457,20 @@ Engine::setTTInterpreterVersion(int version)
    457 457
     void
    
    458 458
     Engine::update()
    
    459 459
     {
    
    460
    -  loadFlags = FT_LOAD_DEFAULT;
    
    461
    -  if (doAutoHinting)
    
    462
    -    loadFlags |= FT_LOAD_FORCE_AUTOHINT;
    
    463
    -  loadFlags |= FT_LOAD_NO_BITMAP; // XXX handle bitmap fonts also
    
    460
    +  loadFlags_ = FT_LOAD_DEFAULT;
    
    461
    +  if (doAutoHinting_)
    
    462
    +    loadFlags_ |= FT_LOAD_FORCE_AUTOHINT;
    
    463
    +  loadFlags_ |= FT_LOAD_NO_BITMAP; // XXX handle bitmap fonts also
    
    464 464
     
    
    465
    -  if (doHinting)
    
    465
    +  if (doHinting_)
    
    466 466
       {
    
    467 467
         unsigned long target;
    
    468 468
     
    
    469
    -    if (antiAliasingMode == AntiAliasing_None)
    
    469
    +    if (antiAliasingMode_ == AntiAliasing_None)
    
    470 470
           target = FT_LOAD_TARGET_MONO;
    
    471 471
         else
    
    472 472
         {
    
    473
    -      switch (antiAliasingMode)
    
    473
    +      switch (antiAliasingMode_)
    
    474 474
           {
    
    475 475
           case AntiAliasing_Light:
    
    476 476
             target = FT_LOAD_TARGET_LIGHT;
    
    ... ... @@ -491,33 +491,33 @@ Engine::update()
    491 491
           }
    
    492 492
         }
    
    493 493
     
    
    494
    -    loadFlags |= target;
    
    494
    +    loadFlags_ |= target;
    
    495 495
       }
    
    496 496
       else
    
    497 497
       {
    
    498
    -    loadFlags |= FT_LOAD_NO_HINTING;
    
    498
    +    loadFlags_ |= FT_LOAD_NO_HINTING;
    
    499 499
     
    
    500
    -    if (antiAliasingMode == AntiAliasing_None)
    
    501
    -      loadFlags |= FT_LOAD_MONOCHROME;
    
    500
    +    if (antiAliasingMode_ == AntiAliasing_None)
    
    501
    +      loadFlags_ |= FT_LOAD_MONOCHROME;
    
    502 502
       }
    
    503 503
     
    
    504 504
       // XXX handle color fonts also
    
    505 505
     
    
    506
    -  scaler.pixel = 0; // use 26.6 format
    
    506
    +  scaler_.pixel = 0; // use 26.6 format
    
    507 507
     
    
    508
    -  if (usingPixelSize)
    
    508
    +  if (usingPixelSize_)
    
    509 509
       {
    
    510
    -    scaler.width = static_cast<unsigned int>(pixelSize * 64.0);
    
    511
    -    scaler.height = static_cast<unsigned int>(pixelSize * 64.0);
    
    512
    -    scaler.x_res = 0;
    
    513
    -    scaler.y_res = 0;
    
    510
    +    scaler_.width = static_cast<unsigned int>(pixelSize_ * 64.0);
    
    511
    +    scaler_.height = static_cast<unsigned int>(pixelSize_ * 64.0);
    
    512
    +    scaler_.x_res = 0;
    
    513
    +    scaler_.y_res = 0;
    
    514 514
       }
    
    515 515
       else
    
    516 516
       {
    
    517
    -    scaler.width = static_cast<unsigned int>(pointSize * 64.0);
    
    518
    -    scaler.height = static_cast<unsigned int>(pointSize * 64.0);
    
    519
    -    scaler.x_res = dpi;
    
    520
    -    scaler.y_res = dpi;
    
    517
    +    scaler_.width = static_cast<unsigned int>(pointSize_ * 64.0);
    
    518
    +    scaler_.height = static_cast<unsigned int>(pointSize_ * 64.0);
    
    519
    +    scaler_.x_res = dpi_;
    
    520
    +    scaler_.y_res = dpi_;
    
    521 521
       }
    
    522 522
     }
    
    523 523
     
    
    ... ... @@ -530,15 +530,15 @@ Engine::queryEngine()
    530 530
       // query engines and check for alternatives
    
    531 531
     
    
    532 532
       // CFF
    
    533
    -  error = FT_Property_Get(library,
    
    533
    +  error = FT_Property_Get(library_,
    
    534 534
                               "cff",
    
    535 535
                               "hinting-engine",
    
    536
    -                          &defaults.cffHintingEngineDefault);
    
    536
    +                          &engineDefaults_.cffHintingEngineDefault);
    
    537 537
       if (error)
    
    538 538
       {
    
    539 539
         // no CFF engine
    
    540
    -    defaults.cffHintingEngineDefault = -1;
    
    541
    -    defaults.cffHintingEngineOther = -1;
    
    540
    +    engineDefaults_.cffHintingEngineDefault = -1;
    
    541
    +    engineDefaults_.cffHintingEngineOther = -1;
    
    542 542
       }
    
    543 543
       else
    
    544 544
       {
    
    ... ... @@ -550,36 +550,36 @@ Engine::queryEngine()
    550 550
     
    
    551 551
         int i;
    
    552 552
         for (i = 0; i < 2; i++)
    
    553
    -      if (defaults.cffHintingEngineDefault == engines[i])
    
    553
    +      if (engineDefaults_.cffHintingEngineDefault == engines[i])
    
    554 554
             break;
    
    555 555
     
    
    556
    -    defaults.cffHintingEngineOther = engines[(i + 1) % 2];
    
    556
    +    engineDefaults_.cffHintingEngineOther = engines[(i + 1) % 2];
    
    557 557
     
    
    558
    -    error = FT_Property_Set(library,
    
    558
    +    error = FT_Property_Set(library_,
    
    559 559
                                 "cff",
    
    560 560
                                 "hinting-engine",
    
    561
    -                            &defaults.cffHintingEngineOther);
    
    561
    +                            &engineDefaults_.cffHintingEngineOther);
    
    562 562
         if (error)
    
    563
    -      defaults.cffHintingEngineOther = -1;
    
    563
    +      engineDefaults_.cffHintingEngineOther = -1;
    
    564 564
     
    
    565 565
         // reset
    
    566
    -    FT_Property_Set(library,
    
    566
    +    FT_Property_Set(library_,
    
    567 567
                         "cff",
    
    568 568
                         "hinting-engine",
    
    569
    -                    &defaults.cffHintingEngineDefault);
    
    569
    +                    &engineDefaults_.cffHintingEngineDefault);
    
    570 570
       }
    
    571 571
     
    
    572 572
       // TrueType
    
    573
    -  error = FT_Property_Get(library,
    
    573
    +  error = FT_Property_Get(library_,
    
    574 574
                               "truetype",
    
    575 575
                               "interpreter-version",
    
    576
    -                          &defaults.ttInterpreterVersionDefault);
    
    576
    +                          &engineDefaults_.ttInterpreterVersionDefault);
    
    577 577
       if (error)
    
    578 578
       {
    
    579 579
         // no TrueType engine
    
    580
    -    defaults.ttInterpreterVersionDefault = -1;
    
    581
    -    defaults.ttInterpreterVersionOther = -1;
    
    582
    -    defaults.ttInterpreterVersionOther1 = -1;
    
    580
    +    engineDefaults_.ttInterpreterVersionDefault = -1;
    
    581
    +    engineDefaults_.ttInterpreterVersionOther = -1;
    
    582
    +    engineDefaults_.ttInterpreterVersionOther1 = -1;
    
    583 583
       }
    
    584 584
       else
    
    585 585
       {
    
    ... ... @@ -592,32 +592,32 @@ Engine::queryEngine()
    592 592
     
    
    593 593
         int i;
    
    594 594
         for (i = 0; i < 3; i++)
    
    595
    -      if (defaults.ttInterpreterVersionDefault == interpreters[i])
    
    595
    +      if (engineDefaults_.ttInterpreterVersionDefault == interpreters[i])
    
    596 596
             break;
    
    597 597
     
    
    598
    -    defaults.ttInterpreterVersionOther = interpreters[(i + 1) % 3];
    
    598
    +    engineDefaults_.ttInterpreterVersionOther = interpreters[(i + 1) % 3];
    
    599 599
     
    
    600
    -    error = FT_Property_Set(library,
    
    600
    +    error = FT_Property_Set(library_,
    
    601 601
                                 "truetype",
    
    602 602
                                 "interpreter-version",
    
    603
    -                            &defaults.ttInterpreterVersionOther);
    
    603
    +                            &engineDefaults_.ttInterpreterVersionOther);
    
    604 604
         if (error)
    
    605
    -      defaults.ttInterpreterVersionOther = -1;
    
    605
    +      engineDefaults_.ttInterpreterVersionOther = -1;
    
    606 606
     
    
    607
    -    defaults.ttInterpreterVersionOther1 = interpreters[(i + 2) % 3];
    
    607
    +    engineDefaults_.ttInterpreterVersionOther1 = interpreters[(i + 2) % 3];
    
    608 608
     
    
    609
    -    error = FT_Property_Set(library,
    
    609
    +    error = FT_Property_Set(library_,
    
    610 610
                                 "truetype",
    
    611 611
                                 "interpreter-version",
    
    612
    -                            &defaults.ttInterpreterVersionOther1);
    
    612
    +                            &engineDefaults_.ttInterpreterVersionOther1);
    
    613 613
         if (error)
    
    614
    -      defaults.ttInterpreterVersionOther1 = -1;
    
    614
    +      engineDefaults_.ttInterpreterVersionOther1 = -1;
    
    615 615
     
    
    616 616
         // reset
    
    617
    -    FT_Property_Set(library,
    
    617
    +    FT_Property_Set(library_,
    
    618 618
                         "truetype",
    
    619 619
                         "interpreter-version",
    
    620
    -                    &defaults.ttInterpreterVersionDefault);
    
    620
    +                    &engineDefaults_.ttInterpreterVersionDefault);
    
    621 621
       }
    
    622 622
     }
    
    623 623
     
    

  • src/ftinspect/engine/engine.hpp
    ... ... @@ -80,10 +80,10 @@ public:
    80 80
     
    
    81 81
       //////// Getters
    
    82 82
     
    
    83
    -  FT_Library ftLibrary() const { return library; }
    
    84
    -  int currentFontType() const { return fontType; }
    
    85
    -  const QString& currentFamilyName() { return curFamilyName; }
    
    86
    -  const QString& currentStyleName() { return curStyleName; }
    
    83
    +  FT_Library ftLibrary() const { return library_; }
    
    84
    +  int currentFontType() const { return fontType_; }
    
    85
    +  const QString& currentFamilyName() { return curFamilyName_; }
    
    86
    +  const QString& currentStyleName() { return curStyleName_; }
    
    87 87
       int numberOfOpenedFonts();
    
    88 88
       QString glyphName(int glyphIndex);
    
    89 89
       long numberOfFaces(int fontIndex);
    
    ... ... @@ -93,31 +93,31 @@ public:
    93 93
       // XXX We should prepend '_' to all private member variable so we can create
    
    94 94
       // getter without naming conflict... e.g. var named _fontFileManager while
    
    95 95
       // getter named fontFileManager
    
    96
    -  FontFileManager& fontFileManager() { return fileManager; }
    
    97
    -  EngineDefaultValues& engineDefaults() { return defaults; }
    
    96
    +  FontFileManager& fontFileManager() { return fontFileManager_; }
    
    97
    +  EngineDefaultValues& engineDefaults() { return engineDefaults_; }
    
    98 98
     
    
    99 99
       //////// Setters (direct or indirect)
    
    100 100
     
    
    101
    -  void setDPI(int d) { dpi = d; }
    
    101
    +  void setDPI(int d) { dpi_ = d; }
    
    102 102
       void setSizeByPixel(double pixelSize);
    
    103 103
       void setSizeByPoint(double pointSize);
    
    104
    -  void setHinting(bool hinting) { doHinting = hinting; }
    
    105
    -  void setAutoHinting(bool autoHinting) { doAutoHinting = autoHinting; }
    
    104
    +  void setHinting(bool hinting) { doHinting_ = hinting; }
    
    105
    +  void setAutoHinting(bool autoHinting) { doAutoHinting_ = autoHinting; }
    
    106 106
       void setHorizontalHinting(bool horHinting)
    
    107 107
       {
    
    108
    -    doHorizontalHinting = horHinting;
    
    108
    +    doHorizontalHinting_ = horHinting;
    
    109 109
       }
    
    110 110
       void setVerticalHinting(bool verticalHinting)
    
    111 111
       {
    
    112
    -    doVerticalHinting = verticalHinting;
    
    112
    +    doVerticalHinting_ = verticalHinting;
    
    113 113
       }
    
    114 114
       void setBlueZoneHinting(bool blueZoneHinting)
    
    115 115
       {
    
    116
    -    doBlueZoneHinting = blueZoneHinting;
    
    116
    +    doBlueZoneHinting_ = blueZoneHinting;
    
    117 117
       }
    
    118
    -  void setShowSegments(bool showSegments) { this->showSegments = showSegments; }
    
    119
    -  void setGamma(double gamma) { this->gamma = gamma; }
    
    120
    -  void setAntiAliasingMode(AntiAliasing mode) { antiAliasingMode = mode; }
    
    118
    +  void setShowSegments(bool showSegments) { showSegments_ = showSegments; }
    
    119
    +  void setGamma(double gamma) { gamma_ = gamma; }
    
    120
    +  void setAntiAliasingMode(AntiAliasing mode) { antiAliasingMode_ = mode; }
    
    121 121
     
    
    122 122
       // Note: These 3 functions now takes actual mode/version from FreeType,
    
    123 123
       // instead of values from enum in MainGUI!
    
    ... ... @@ -134,42 +134,42 @@ public:
    134 134
     
    
    135 135
     private:
    
    136 136
       using FTC_IDType = uintptr_t;
    
    137
    -  FTC_IDType faceCounter; // a running number used to initialize `faceIDMap'
    
    138
    -  QMap<FaceID, FTC_IDType> faceIDMap;
    
    137
    +  FTC_IDType faceCounter_; // a running number used to initialize `faceIDMap'
    
    138
    +  QMap<FaceID, FTC_IDType> faceIDMap_;
    
    139 139
     
    
    140
    -  FontFileManager fileManager;
    
    140
    +  FontFileManager fontFileManager_;
    
    141 141
     
    
    142
    -  QString curFamilyName;
    
    143
    -  QString curStyleName;
    
    142
    +  QString curFamilyName_;
    
    143
    +  QString curStyleName_;
    
    144 144
     
    
    145
    -  FT_Library library;
    
    146
    -  FTC_Manager cacheManager;
    
    147
    -  FTC_ImageCache imageCache;
    
    148
    -  FTC_SBitCache sbitsCache;
    
    145
    +  FT_Library library_;
    
    146
    +  FTC_Manager cacheManager_;
    
    147
    +  FTC_ImageCache imageCache_;
    
    148
    +  FTC_SBitCache sbitsCache_;
    
    149 149
     
    
    150
    -  FTC_ScalerRec scaler;
    
    151
    -  FT_Size ftSize;
    
    150
    +  FTC_ScalerRec scaler_;
    
    151
    +  FT_Size ftSize_;
    
    152 152
     
    
    153
    -  EngineDefaultValues defaults;
    
    153
    +  EngineDefaultValues engineDefaults_;
    
    154 154
     
    
    155
    -  int fontType;
    
    155
    +  int fontType_;
    
    156 156
     
    
    157
    -  bool usingPixelSize = false;
    
    158
    -  double pointSize;
    
    159
    -  double pixelSize;
    
    160
    -  unsigned int dpi;
    
    157
    +  bool usingPixelSize_ = false;
    
    158
    +  double pointSize_;
    
    159
    +  double pixelSize_;
    
    160
    +  unsigned int dpi_;
    
    161 161
     
    
    162
    -  bool doHinting;
    
    163
    -  bool doAutoHinting;
    
    164
    -  bool doHorizontalHinting;
    
    165
    -  bool doVerticalHinting;
    
    166
    -  bool doBlueZoneHinting;
    
    167
    -  bool showSegments;
    
    168
    -  AntiAliasing antiAliasingMode;
    
    162
    +  bool doHinting_;
    
    163
    +  bool doAutoHinting_;
    
    164
    +  bool doHorizontalHinting_;
    
    165
    +  bool doVerticalHinting_;
    
    166
    +  bool doBlueZoneHinting_;
    
    167
    +  bool showSegments_;
    
    168
    +  AntiAliasing antiAliasingMode_;
    
    169 169
     
    
    170
    -  double gamma;
    
    170
    +  double gamma_;
    
    171 171
     
    
    172
    -  unsigned long loadFlags;
    
    172
    +  unsigned long loadFlags_;
    
    173 173
     
    
    174 174
       void queryEngine();
    
    175 175
     
    

  • src/ftinspect/engine/fontfilemanager.cpp
    ... ... @@ -7,14 +7,14 @@
    7 7
     
    
    8 8
     FontFileManager::FontFileManager()
    
    9 9
     {
    
    10
    -  fontWatcher = new QFileSystemWatcher(this);
    
    10
    +  fontWatcher_ = new QFileSystemWatcher(this);
    
    11 11
       // if the current input file is invalid we retry once a second to load it
    
    12
    -  watchTimer = new QTimer;
    
    13
    -  watchTimer->setInterval(1000);
    
    12
    +  watchTimer_ = new QTimer;
    
    13
    +  watchTimer_->setInterval(1000);
    
    14 14
     
    
    15
    -  connect(fontWatcher, &QFileSystemWatcher::fileChanged,
    
    15
    +  connect(fontWatcher_, &QFileSystemWatcher::fileChanged,
    
    16 16
               this, &FontFileManager::onTimerOrWatcherFire);
    
    17
    -  connect(watchTimer, &QTimer::timeout,
    
    17
    +  connect(watchTimer_, &QTimer::timeout,
    
    18 18
               this, &FontFileManager::onTimerOrWatcherFire);
    
    19 19
     }
    
    20 20
     
    
    ... ... @@ -25,7 +25,7 @@ FontFileManager::~FontFileManager()
    25 25
     int
    
    26 26
     FontFileManager::size()
    
    27 27
     {
    
    28
    -  return fontFileNameList.size();
    
    28
    +  return fontFileNameList_.size();
    
    29 29
     }
    
    30 30
     
    
    31 31
     void
    
    ... ... @@ -42,7 +42,7 @@ FontFileManager::append(QStringList newFileNames)
    42 42
         // Uniquify elements
    
    43 43
         auto absPath = info.absoluteFilePath();
    
    44 44
         auto existing = false;
    
    45
    -    for (auto& existingName : fontFileNameList)
    
    45
    +    for (auto& existingName : fontFileNameList_)
    
    46 46
           if (existingName.absoluteFilePath() == absPath)
    
    47 47
           {
    
    48 48
             existing = true;
    
    ... ... @@ -51,7 +51,7 @@ FontFileManager::append(QStringList newFileNames)
    51 51
         if (existing)
    
    52 52
           continue;
    
    53 53
     
    
    54
    -    fontFileNameList.append(info);
    
    54
    +    fontFileNameList_.append(info);
    
    55 55
       }
    
    56 56
     }
    
    57 57
     
    
    ... ... @@ -61,42 +61,42 @@ FontFileManager::remove(int index)
    61 61
       if (index < 0 || index >= size())
    
    62 62
         return;
    
    63 63
     
    
    64
    -  fontWatcher->removePath(fontFileNameList[index].filePath());
    
    65
    -  fontFileNameList.removeAt(index);
    
    64
    +  fontWatcher_->removePath(fontFileNameList_[index].filePath());
    
    65
    +  fontFileNameList_.removeAt(index);
    
    66 66
     }
    
    67 67
     
    
    68 68
     QFileInfo&
    
    69 69
     FontFileManager::operator[](int index)
    
    70 70
     {
    
    71
    -  return fontFileNameList[index];
    
    71
    +  return fontFileNameList_[index];
    
    72 72
     }
    
    73 73
     
    
    74 74
     void
    
    75 75
     FontFileManager::updateWatching(int index)
    
    76 76
     {
    
    77
    -  QFileInfo& fileInfo = fontFileNameList[index];
    
    77
    +  QFileInfo& fileInfo = fontFileNameList_[index];
    
    78 78
     
    
    79
    -  auto watching = fontWatcher->files();
    
    79
    +  auto watching = fontWatcher_->files();
    
    80 80
       if (!watching.empty())
    
    81
    -    fontWatcher->removePaths(watching);
    
    81
    +    fontWatcher_->removePaths(watching);
    
    82 82
     
    
    83 83
       // Qt's file watcher doesn't handle symlinks;
    
    84 84
       // we thus fall back to polling
    
    85 85
       if (fileInfo.isSymLink() || !fileInfo.exists())
    
    86
    -    watchTimer->start();
    
    86
    +    watchTimer_->start();
    
    87 87
       else
    
    88
    -    fontWatcher->addPath(fileInfo.filePath());
    
    88
    +    fontWatcher_->addPath(fileInfo.filePath());
    
    89 89
     }
    
    90 90
     
    
    91 91
     void
    
    92 92
     FontFileManager::timerStart()
    
    93 93
     {
    
    94
    -  watchTimer->start();
    
    94
    +  watchTimer_->start();
    
    95 95
     }
    
    96 96
     
    
    97 97
     void
    
    98 98
     FontFileManager::onTimerOrWatcherFire()
    
    99 99
     {
    
    100
    -  watchTimer->stop();
    
    100
    +  watchTimer_->stop();
    
    101 101
       emit currentFileChanged();
    
    102 102
     }

  • src/ftinspect/engine/fontfilemanager.hpp
    ... ... @@ -36,7 +36,7 @@ private slots:
    36 36
       void onTimerOrWatcherFire();
    
    37 37
     
    
    38 38
     private:
    
    39
    -  QList<QFileInfo> fontFileNameList;
    
    40
    -  QFileSystemWatcher* fontWatcher;
    
    41
    -  QTimer* watchTimer;
    
    39
    +  QList<QFileInfo> fontFileNameList_;
    
    40
    +  QFileSystemWatcher* fontWatcher_;
    
    41
    +  QTimer* watchTimer_;
    
    42 42
     };
    \ No newline at end of file

  • src/ftinspect/maingui.cpp
    ... ... @@ -16,7 +16,7 @@
    16 16
     
    
    17 17
     MainGUI::MainGUI()
    
    18 18
     {
    
    19
    -  engine = NULL;
    
    19
    +  engine_ = NULL;
    
    20 20
     
    
    21 21
       setGraphicsDefaults();
    
    22 22
       createLayout();
    
    ... ... @@ -40,12 +40,12 @@ MainGUI::~MainGUI()
    40 40
     void
    
    41 41
     MainGUI::update(Engine* e)
    
    42 42
     {
    
    43
    -  if (engine)
    
    44
    -    disconnect(&engine->fontFileManager(), &FontFileManager::currentFileChanged,
    
    43
    +  if (engine_)
    
    44
    +    disconnect(&engine_->fontFileManager(), &FontFileManager::currentFileChanged,
    
    45 45
             this, &MainGUI::watchCurrentFont);
    
    46 46
     
    
    47
    -  engine = e;
    
    48
    -  connect(&engine->fontFileManager(), &FontFileManager::currentFileChanged,
    
    47
    +  engine_ = e;
    
    48
    +  connect(&engine_->fontFileManager(), &FontFileManager::currentFileChanged,
    
    49 49
               this, &MainGUI::watchCurrentFont);
    
    50 50
     }
    
    51 51
     
    
    ... ... @@ -94,7 +94,7 @@ MainGUI::aboutQt()
    94 94
     void
    
    95 95
     MainGUI::loadFonts()
    
    96 96
     {
    
    97
    -  int oldSize = engine->numberOfOpenedFonts();
    
    97
    +  int oldSize = engine_->numberOfOpenedFonts();
    
    98 98
     
    
    99 99
       QStringList files = QFileDialog::getOpenFileNames(
    
    100 100
                             this,
    
    ... ... @@ -104,11 +104,11 @@ MainGUI::loadFonts()
    104 104
                             NULL,
    
    105 105
                             QFileDialog::ReadOnly);
    
    106 106
     
    
    107
    -  engine->openFonts(files);
    
    107
    +  engine_->openFonts(files);
    
    108 108
     
    
    109 109
       // if we have new fonts, set the current index to the first new one
    
    110
    -  if (oldSize < engine->numberOfOpenedFonts())
    
    111
    -    currentFontIndex = oldSize;
    
    110
    +  if (oldSize < engine_->numberOfOpenedFonts())
    
    111
    +    currentFontIndex_ = oldSize;
    
    112 112
     
    
    113 113
       showFont();
    
    114 114
     }
    
    ... ... @@ -117,20 +117,20 @@ MainGUI::loadFonts()
    117 117
     void
    
    118 118
     MainGUI::closeFont()
    
    119 119
     {
    
    120
    -  if (currentFontIndex < engine->numberOfOpenedFonts())
    
    120
    +  if (currentFontIndex_ < engine_->numberOfOpenedFonts())
    
    121 121
       {
    
    122
    -    engine->removeFont(currentFontIndex);
    
    122
    +    engine_->removeFont(currentFontIndex_);
    
    123 123
       }
    
    124 124
     
    
    125 125
       // show next font after deletion, i.e., retain index if possible
    
    126
    -  int num = engine->numberOfOpenedFonts();
    
    126
    +  int num = engine_->numberOfOpenedFonts();
    
    127 127
       if (num)
    
    128 128
       {
    
    129
    -    if (currentFontIndex >= num)
    
    130
    -      currentFontIndex = num - 1;
    
    129
    +    if (currentFontIndex_ >= num)
    
    130
    +      currentFontIndex_ = num - 1;
    
    131 131
       }
    
    132 132
       else
    
    133
    -    currentFontIndex = 0;
    
    133
    +    currentFontIndex_ = 0;
    
    134 134
     
    
    135 135
       showFont();
    
    136 136
     }
    
    ... ... @@ -148,12 +148,12 @@ MainGUI::showFont()
    148 148
     {
    
    149 149
       // we do lazy computation of FT_Face objects
    
    150 150
     
    
    151
    -  if (currentFontIndex < engine->numberOfOpenedFonts())
    
    151
    +  if (currentFontIndex_ < engine_->numberOfOpenedFonts())
    
    152 152
       {
    
    153
    -    QFileInfo& fileInfo = engine->fontFileManager()[currentFontIndex];
    
    153
    +    QFileInfo& fileInfo = engine_->fontFileManager()[currentFontIndex_];
    
    154 154
         QString fontName = fileInfo.fileName();
    
    155 155
     
    
    156
    -    engine->fontFileManager().updateWatching(currentFontIndex);
    
    156
    +    engine_->fontFileManager().updateWatching(currentFontIndex_);
    
    157 157
         if (fileInfo.isSymLink())
    
    158 158
         {
    
    159 159
           fontName.prepend("<i>");
    
    ... ... @@ -166,39 +166,39 @@ MainGUI::showFont()
    166 166
           // implies that deletion of a symlink doesn't make `engine->loadFont'
    
    167 167
           // fail since it operates on a file handle pointing to the target.
    
    168 168
           // For this reason, we remove the font to enforce a reload.
    
    169
    -      engine->removeFont(currentFontIndex, false);
    
    169
    +      engine_->removeFont(currentFontIndex_, false);
    
    170 170
         }
    
    171 171
     
    
    172
    -    fontFilenameLabel->setText(fontName);
    
    172
    +    fontFilenameLabel_->setText(fontName);
    
    173 173
       }
    
    174 174
       else
    
    175
    -    fontFilenameLabel->clear();
    
    175
    +    fontFilenameLabel_->clear();
    
    176 176
     
    
    177 177
       syncSettings();
    
    178
    -  currentNumberOfFaces
    
    179
    -    = engine->numberOfFaces(currentFontIndex);
    
    180
    -  currentNumberOfNamedInstances
    
    181
    -    = engine->numberOfNamedInstances(currentFontIndex,
    
    182
    -                                     currentFaceIndex);
    
    183
    -  currentNumberOfGlyphs
    
    184
    -    = engine->loadFont(currentFontIndex,
    
    185
    -                       currentFaceIndex,
    
    186
    -                       currentNamedInstanceIndex);
    
    187
    -
    
    188
    -  if (currentNumberOfGlyphs < 0)
    
    178
    +  currentNumberOfFaces_
    
    179
    +    = engine_->numberOfFaces(currentFontIndex_);
    
    180
    +  currentNumberOfNamedInstances_
    
    181
    +    = engine_->numberOfNamedInstances(currentFontIndex_,
    
    182
    +                                     currentFaceIndex_);
    
    183
    +  currentNumberOfGlyphs_
    
    184
    +    = engine_->loadFont(currentFontIndex_,
    
    185
    +                       currentFaceIndex_,
    
    186
    +                       currentNamedInstanceIndex_);
    
    187
    +
    
    188
    +  if (currentNumberOfGlyphs_ < 0)
    
    189 189
       {
    
    190 190
         // there might be various reasons why the current
    
    191 191
         // (file, face, instance) triplet is invalid or missing;
    
    192 192
         // we thus start our timer to periodically test
    
    193 193
         // whether the font starts working
    
    194
    -    if (currentFontIndex > 0
    
    195
    -        && currentFontIndex < engine->numberOfOpenedFonts())
    
    196
    -      engine->fontFileManager().timerStart();
    
    194
    +    if (currentFontIndex_ > 0
    
    195
    +        && currentFontIndex_ < engine_->numberOfOpenedFonts())
    
    196
    +      engine_->fontFileManager().timerStart();
    
    197 197
       }
    
    198 198
     
    
    199
    -  fontNameLabel->setText(QString("%1 %2")
    
    200
    -                         .arg(engine->currentFamilyName())
    
    201
    -                         .arg(engine->currentStyleName()));
    
    199
    +  fontNameLabel_->setText(QString("%1 %2")
    
    200
    +                         .arg(engine_->currentFamilyName())
    
    201
    +                         .arg(engine_->currentStyleName()));
    
    202 202
     
    
    203 203
       checkCurrentFontIndex();
    
    204 204
       checkCurrentFaceIndex();
    
    ... ... @@ -214,24 +214,24 @@ void
    214 214
     MainGUI::syncSettings()
    
    215 215
     {
    
    216 216
       // Spinbox value cannot become negative
    
    217
    -  engine->setDPI(static_cast<unsigned int>(dpiSpinBox->value()));
    
    217
    +  engine_->setDPI(static_cast<unsigned int>(dpiSpinBox_->value()));
    
    218 218
     
    
    219
    -  if (unitsComboBox->currentIndex() == Units_px)
    
    220
    -    engine->setSizeByPixel(sizeDoubleSpinBox->value());
    
    219
    +  if (unitsComboBox_->currentIndex() == Units_px)
    
    220
    +    engine_->setSizeByPixel(sizeDoubleSpinBox_->value());
    
    221 221
       else
    
    222
    -    engine->setSizeByPoint(sizeDoubleSpinBox->value());
    
    222
    +    engine_->setSizeByPoint(sizeDoubleSpinBox_->value());
    
    223 223
     
    
    224
    -  engine->setHinting(hintingCheckBox->isChecked());
    
    225
    -  engine->setAutoHinting(autoHintingCheckBox->isChecked());
    
    226
    -  engine->setHorizontalHinting(horizontalHintingCheckBox->isChecked());
    
    227
    -  engine->setVerticalHinting(verticalHintingCheckBox->isChecked());
    
    228
    -  engine->setBlueZoneHinting(blueZoneHintingCheckBox->isChecked());
    
    229
    -  engine->setShowSegments(segmentDrawingCheckBox->isChecked());
    
    224
    +  engine_->setHinting(hintingCheckBox_->isChecked());
    
    225
    +  engine_->setAutoHinting(autoHintingCheckBox_->isChecked());
    
    226
    +  engine_->setHorizontalHinting(horizontalHintingCheckBox_->isChecked());
    
    227
    +  engine_->setVerticalHinting(verticalHintingCheckBox_->isChecked());
    
    228
    +  engine_->setBlueZoneHinting(blueZoneHintingCheckBox_->isChecked());
    
    229
    +  engine_->setShowSegments(segmentDrawingCheckBox_->isChecked());
    
    230 230
     
    
    231
    -  engine->setGamma(gammaSlider->value());
    
    231
    +  engine_->setGamma(gammaSlider_->value());
    
    232 232
     
    
    233
    -  engine->setAntiAliasingMode(static_cast<Engine::AntiAliasing>(
    
    234
    -      antiAliasingComboBoxx->currentIndex()));
    
    233
    +  engine_->setAntiAliasingMode(static_cast<Engine::AntiAliasing>(
    
    234
    +      antiAliasingComboBoxx_->currentIndex()));
    
    235 235
     }
    
    236 236
     
    
    237 237
     
    
    ... ... @@ -246,57 +246,57 @@ MainGUI::clearStatusBar()
    246 246
     void
    
    247 247
     MainGUI::checkHinting()
    
    248 248
     {
    
    249
    -  if (hintingCheckBox->isChecked())
    
    249
    +  if (hintingCheckBox_->isChecked())
    
    250 250
       {
    
    251
    -    if (engine->currentFontType() == Engine::FontType_CFF)
    
    251
    +    if (engine_->currentFontType() == Engine::FontType_CFF)
    
    252 252
         {
    
    253
    -      for (int i = 0; i < hintingModeComboBoxx->count(); i++)
    
    253
    +      for (int i = 0; i < hintingModeComboBoxx_->count(); i++)
    
    254 254
           {
    
    255
    -        if (hintingModesCFFHash.key(i, -1) != -1)
    
    256
    -          hintingModeComboBoxx->setItemEnabled(i, true);
    
    255
    +        if (hintingModesCFFHash_.key(i, -1) != -1)
    
    256
    +          hintingModeComboBoxx_->setItemEnabled(i, true);
    
    257 257
             else
    
    258
    -          hintingModeComboBoxx->setItemEnabled(i, false);
    
    258
    +          hintingModeComboBoxx_->setItemEnabled(i, false);
    
    259 259
           }
    
    260 260
     
    
    261
    -      hintingModeComboBoxx->setCurrentIndex(currentCFFHintingMode);
    
    261
    +      hintingModeComboBoxx_->setCurrentIndex(currentCFFHintingMode_);
    
    262 262
         }
    
    263
    -    else if (engine->currentFontType() == Engine::FontType_TrueType)
    
    263
    +    else if (engine_->currentFontType() == Engine::FontType_TrueType)
    
    264 264
         {
    
    265
    -      for (int i = 0; i < hintingModeComboBoxx->count(); i++)
    
    265
    +      for (int i = 0; i < hintingModeComboBoxx_->count(); i++)
    
    266 266
           {
    
    267
    -        if (hintingModesTrueTypeHash.key(i, -1) != -1)
    
    268
    -          hintingModeComboBoxx->setItemEnabled(i, true);
    
    267
    +        if (hintingModesTrueTypeHash_.key(i, -1) != -1)
    
    268
    +          hintingModeComboBoxx_->setItemEnabled(i, true);
    
    269 269
             else
    
    270
    -          hintingModeComboBoxx->setItemEnabled(i, false);
    
    270
    +          hintingModeComboBoxx_->setItemEnabled(i, false);
    
    271 271
           }
    
    272 272
     
    
    273
    -      hintingModeComboBoxx->setCurrentIndex(currentTTInterpreterVersion);
    
    273
    +      hintingModeComboBoxx_->setCurrentIndex(currentTTInterpreterVersion_);
    
    274 274
         }
    
    275 275
         else
    
    276 276
         {
    
    277
    -      hintingModeLabel->setEnabled(false);
    
    278
    -      hintingModeComboBoxx->setEnabled(false);
    
    277
    +      hintingModeLabel_->setEnabled(false);
    
    278
    +      hintingModeComboBoxx_->setEnabled(false);
    
    279 279
         }
    
    280 280
     
    
    281
    -    for (int i = 0; i < hintingModesAlwaysDisabled.size(); i++)
    
    282
    -      hintingModeComboBoxx->setItemEnabled(hintingModesAlwaysDisabled[i],
    
    281
    +    for (int i = 0; i < hintingModesAlwaysDisabled_.size(); i++)
    
    282
    +      hintingModeComboBoxx_->setItemEnabled(hintingModesAlwaysDisabled_[i],
    
    283 283
                                                false);
    
    284 284
     
    
    285
    -    autoHintingCheckBox->setEnabled(true);
    
    285
    +    autoHintingCheckBox_->setEnabled(true);
    
    286 286
         checkAutoHinting();
    
    287 287
       }
    
    288 288
       else
    
    289 289
       {
    
    290
    -    hintingModeLabel->setEnabled(false);
    
    291
    -    hintingModeComboBoxx->setEnabled(false);
    
    290
    +    hintingModeLabel_->setEnabled(false);
    
    291
    +    hintingModeComboBoxx_->setEnabled(false);
    
    292 292
     
    
    293
    -    autoHintingCheckBox->setEnabled(false);
    
    294
    -    horizontalHintingCheckBox->setEnabled(false);
    
    295
    -    verticalHintingCheckBox->setEnabled(false);
    
    296
    -    blueZoneHintingCheckBox->setEnabled(false);
    
    297
    -    segmentDrawingCheckBox->setEnabled(false);
    
    293
    +    autoHintingCheckBox_->setEnabled(false);
    
    294
    +    horizontalHintingCheckBox_->setEnabled(false);
    
    295
    +    verticalHintingCheckBox_->setEnabled(false);
    
    296
    +    blueZoneHintingCheckBox_->setEnabled(false);
    
    297
    +    segmentDrawingCheckBox_->setEnabled(false);
    
    298 298
     
    
    299
    -    antiAliasingComboBoxx->setItemEnabled(Engine::AntiAliasing_Light, false);
    
    299
    +    antiAliasingComboBoxx_->setItemEnabled(Engine::AntiAliasing_Light, false);
    
    300 300
       }
    
    301 301
     
    
    302 302
       drawGlyph();
    
    ... ... @@ -306,17 +306,17 @@ MainGUI::checkHinting()
    306 306
     void
    
    307 307
     MainGUI::checkHintingMode()
    
    308 308
     {
    
    309
    -  int index = hintingModeComboBoxx->currentIndex();
    
    309
    +  int index = hintingModeComboBoxx_->currentIndex();
    
    310 310
     
    
    311
    -  if (engine->currentFontType() == Engine::FontType_CFF)
    
    311
    +  if (engine_->currentFontType() == Engine::FontType_CFF)
    
    312 312
       {
    
    313
    -    engine->setCFFHintingMode(hintingModesCFFHash.key(index));
    
    314
    -    currentCFFHintingMode = index;
    
    313
    +    engine_->setCFFHintingMode(hintingModesCFFHash_.key(index));
    
    314
    +    currentCFFHintingMode_ = index;
    
    315 315
       }
    
    316
    -  else if (engine->currentFontType() == Engine::FontType_TrueType)
    
    316
    +  else if (engine_->currentFontType() == Engine::FontType_TrueType)
    
    317 317
       {
    
    318
    -    engine->setTTInterpreterVersion(hintingModesTrueTypeHash.key(index));
    
    319
    -    currentTTInterpreterVersion = index;
    
    318
    +    engine_->setTTInterpreterVersion(hintingModesTrueTypeHash_.key(index));
    
    319
    +    currentTTInterpreterVersion_ = index;
    
    320 320
       }
    
    321 321
     
    
    322 322
       // this enforces reloading of the font
    
    ... ... @@ -327,36 +327,36 @@ MainGUI::checkHintingMode()
    327 327
     void
    
    328 328
     MainGUI::checkAutoHinting()
    
    329 329
     {
    
    330
    -  if (autoHintingCheckBox->isChecked())
    
    330
    +  if (autoHintingCheckBox_->isChecked())
    
    331 331
       {
    
    332
    -    hintingModeLabel->setEnabled(false);
    
    333
    -    hintingModeComboBoxx->setEnabled(false);
    
    332
    +    hintingModeLabel_->setEnabled(false);
    
    333
    +    hintingModeComboBoxx_->setEnabled(false);
    
    334 334
     
    
    335
    -    horizontalHintingCheckBox->setEnabled(true);
    
    336
    -    verticalHintingCheckBox->setEnabled(true);
    
    337
    -    blueZoneHintingCheckBox->setEnabled(true);
    
    338
    -    segmentDrawingCheckBox->setEnabled(true);
    
    335
    +    horizontalHintingCheckBox_->setEnabled(true);
    
    336
    +    verticalHintingCheckBox_->setEnabled(true);
    
    337
    +    blueZoneHintingCheckBox_->setEnabled(true);
    
    338
    +    segmentDrawingCheckBox_->setEnabled(true);
    
    339 339
     
    
    340
    -    antiAliasingComboBoxx->setItemEnabled(Engine::AntiAliasing_Light, true);
    
    340
    +    antiAliasingComboBoxx_->setItemEnabled(Engine::AntiAliasing_Light, true);
    
    341 341
       }
    
    342 342
       else
    
    343 343
       {
    
    344
    -    if (engine->currentFontType() == Engine::FontType_CFF
    
    345
    -        || engine->currentFontType() == Engine::FontType_TrueType)
    
    344
    +    if (engine_->currentFontType() == Engine::FontType_CFF
    
    345
    +        || engine_->currentFontType() == Engine::FontType_TrueType)
    
    346 346
         {
    
    347
    -      hintingModeLabel->setEnabled(true);
    
    348
    -      hintingModeComboBoxx->setEnabled(true);
    
    347
    +      hintingModeLabel_->setEnabled(true);
    
    348
    +      hintingModeComboBoxx_->setEnabled(true);
    
    349 349
         }
    
    350 350
     
    
    351
    -    horizontalHintingCheckBox->setEnabled(false);
    
    352
    -    verticalHintingCheckBox->setEnabled(false);
    
    353
    -    blueZoneHintingCheckBox->setEnabled(false);
    
    354
    -    segmentDrawingCheckBox->setEnabled(false);
    
    351
    +    horizontalHintingCheckBox_->setEnabled(false);
    
    352
    +    verticalHintingCheckBox_->setEnabled(false);
    
    353
    +    blueZoneHintingCheckBox_->setEnabled(false);
    
    354
    +    segmentDrawingCheckBox_->setEnabled(false);
    
    355 355
     
    
    356
    -    antiAliasingComboBoxx->setItemEnabled(Engine::AntiAliasing_Light, false);
    
    356
    +    antiAliasingComboBoxx_->setItemEnabled(Engine::AntiAliasing_Light, false);
    
    357 357
     
    
    358
    -    if (antiAliasingComboBoxx->currentIndex() == Engine::AntiAliasing_Light)
    
    359
    -      antiAliasingComboBoxx->setCurrentIndex(Engine::AntiAliasing_Normal);
    
    358
    +    if (antiAliasingComboBoxx_->currentIndex() == Engine::AntiAliasing_Light)
    
    359
    +      antiAliasingComboBoxx_->setCurrentIndex(Engine::AntiAliasing_Normal);
    
    360 360
       }
    
    361 361
     
    
    362 362
       drawGlyph();
    
    ... ... @@ -366,19 +366,19 @@ MainGUI::checkAutoHinting()
    366 366
     void
    
    367 367
     MainGUI::checkAntiAliasing()
    
    368 368
     {
    
    369
    -  int index = antiAliasingComboBoxx->currentIndex();
    
    369
    +  int index = antiAliasingComboBoxx_->currentIndex();
    
    370 370
     
    
    371 371
       if (index == Engine::AntiAliasing_None
    
    372 372
           || index == Engine::AntiAliasing::AntiAliasing_Normal
    
    373 373
           || index == Engine::AntiAliasing_Light)
    
    374 374
       {
    
    375
    -    lcdFilterLabel->setEnabled(false);
    
    376
    -    lcdFilterComboBox->setEnabled(false);
    
    375
    +    lcdFilterLabel_->setEnabled(false);
    
    376
    +    lcdFilterComboBox_->setEnabled(false);
    
    377 377
       }
    
    378 378
       else
    
    379 379
       {
    
    380
    -    lcdFilterLabel->setEnabled(true);
    
    381
    -    lcdFilterComboBox->setEnabled(true);
    
    380
    +    lcdFilterLabel_->setEnabled(true);
    
    381
    +    lcdFilterComboBox_->setEnabled(true);
    
    382 382
       }
    
    383 383
     
    
    384 384
       drawGlyph();
    
    ... ... @@ -388,18 +388,18 @@ MainGUI::checkAntiAliasing()
    388 388
     void
    
    389 389
     MainGUI::checkLcdFilter()
    
    390 390
     {
    
    391
    -  int index = lcdFilterComboBox->currentIndex();
    
    392
    -  engine->setLcdFilter(lcdFilterHash.key(index));
    
    391
    +  int index = lcdFilterComboBox_->currentIndex();
    
    392
    +  engine_->setLcdFilter(lcdFilterHash_.key(index));
    
    393 393
     }
    
    394 394
     
    
    395 395
     
    
    396 396
     void
    
    397 397
     MainGUI::checkShowPoints()
    
    398 398
     {
    
    399
    -  if (showPointsCheckBox->isChecked())
    
    400
    -    showPointNumbersCheckBox->setEnabled(true);
    
    399
    +  if (showPointsCheckBox_->isChecked())
    
    400
    +    showPointNumbersCheckBox_->setEnabled(true);
    
    401 401
       else
    
    402
    -    showPointNumbersCheckBox->setEnabled(false);
    
    402
    +    showPointNumbersCheckBox_->setEnabled(false);
    
    403 403
     
    
    404 404
       drawGlyph();
    
    405 405
     }
    
    ... ... @@ -408,20 +408,20 @@ MainGUI::checkShowPoints()
    408 408
     void
    
    409 409
     MainGUI::checkUnits()
    
    410 410
     {
    
    411
    -  int index = unitsComboBox->currentIndex();
    
    411
    +  int index = unitsComboBox_->currentIndex();
    
    412 412
     
    
    413 413
       if (index == Units_px)
    
    414 414
       {
    
    415
    -    dpiLabel->setEnabled(false);
    
    416
    -    dpiSpinBox->setEnabled(false);
    
    417
    -    sizeDoubleSpinBox->setSingleStep(1);
    
    418
    -    sizeDoubleSpinBox->setValue(qRound(sizeDoubleSpinBox->value()));
    
    415
    +    dpiLabel_->setEnabled(false);
    
    416
    +    dpiSpinBox_->setEnabled(false);
    
    417
    +    sizeDoubleSpinBox_->setSingleStep(1);
    
    418
    +    sizeDoubleSpinBox_->setValue(qRound(sizeDoubleSpinBox_->value()));
    
    419 419
       }
    
    420 420
       else
    
    421 421
       {
    
    422
    -    dpiLabel->setEnabled(true);
    
    423
    -    dpiSpinBox->setEnabled(true);
    
    424
    -    sizeDoubleSpinBox->setSingleStep(0.5);
    
    422
    +    dpiLabel_->setEnabled(true);
    
    423
    +    dpiSpinBox_->setEnabled(true);
    
    424
    +    sizeDoubleSpinBox_->setSingleStep(0.5);
    
    425 425
       }
    
    426 426
     
    
    427 427
       drawGlyph();
    
    ... ... @@ -432,19 +432,19 @@ void
    432 432
     MainGUI::adjustGlyphIndex(int delta)
    
    433 433
     {
    
    434 434
       // only adjust current glyph index if we have a valid font
    
    435
    -  if (currentNumberOfGlyphs > 0)
    
    435
    +  if (currentNumberOfGlyphs_ > 0)
    
    436 436
       {
    
    437
    -    currentGlyphIndex += delta;
    
    438
    -    currentGlyphIndex = qBound(0,
    
    439
    -                               currentGlyphIndex,
    
    440
    -                               currentNumberOfGlyphs - 1);
    
    437
    +    currentGlyphIndex_ += delta;
    
    438
    +    currentGlyphIndex_ = qBound(0,
    
    439
    +                               currentGlyphIndex_,
    
    440
    +                               currentNumberOfGlyphs_ - 1);
    
    441 441
       }
    
    442 442
     
    
    443
    -  QString upperHex = QString::number(currentGlyphIndex, 16).toUpper();
    
    444
    -  glyphIndexLabel->setText(QString("%1 (0x%2)")
    
    445
    -                                   .arg(currentGlyphIndex)
    
    443
    +  QString upperHex = QString::number(currentGlyphIndex_, 16).toUpper();
    
    444
    +  glyphIndexLabel_->setText(QString("%1 (0x%2)")
    
    445
    +                                   .arg(currentGlyphIndex_)
    
    446 446
                                        .arg(upperHex));
    
    447
    -  glyphNameLabel->setText(engine->glyphName(currentGlyphIndex));
    
    447
    +  glyphNameLabel_->setText(engine_->glyphName(currentGlyphIndex_));
    
    448 448
     
    
    449 449
       drawGlyph();
    
    450 450
     }
    
    ... ... @@ -453,25 +453,25 @@ MainGUI::adjustGlyphIndex(int delta)
    453 453
     void
    
    454 454
     MainGUI::checkCurrentFontIndex()
    
    455 455
     {
    
    456
    -  if (engine->numberOfOpenedFonts() < 2)
    
    456
    +  if (engine_->numberOfOpenedFonts() < 2)
    
    457 457
       {
    
    458
    -    previousFontButton->setEnabled(false);
    
    459
    -    nextFontButton->setEnabled(false);
    
    458
    +    previousFontButton_->setEnabled(false);
    
    459
    +    nextFontButton_->setEnabled(false);
    
    460 460
       }
    
    461
    -  else if (currentFontIndex == 0)
    
    461
    +  else if (currentFontIndex_ == 0)
    
    462 462
       {
    
    463
    -    previousFontButton->setEnabled(false);
    
    464
    -    nextFontButton->setEnabled(true);
    
    463
    +    previousFontButton_->setEnabled(false);
    
    464
    +    nextFontButton_->setEnabled(true);
    
    465 465
       }
    
    466
    -  else if (currentFontIndex >= engine->numberOfOpenedFonts() - 1)
    
    466
    +  else if (currentFontIndex_ >= engine_->numberOfOpenedFonts() - 1)
    
    467 467
       {
    
    468
    -    previousFontButton->setEnabled(true);
    
    469
    -    nextFontButton->setEnabled(false);
    
    468
    +    previousFontButton_->setEnabled(true);
    
    469
    +    nextFontButton_->setEnabled(false);
    
    470 470
       }
    
    471 471
       else
    
    472 472
       {
    
    473
    -    previousFontButton->setEnabled(true);
    
    474
    -    nextFontButton->setEnabled(true);
    
    473
    +    previousFontButton_->setEnabled(true);
    
    474
    +    nextFontButton_->setEnabled(true);
    
    475 475
       }
    
    476 476
     }
    
    477 477
     
    
    ... ... @@ -479,25 +479,25 @@ MainGUI::checkCurrentFontIndex()
    479 479
     void
    
    480 480
     MainGUI::checkCurrentFaceIndex()
    
    481 481
     {
    
    482
    -  if (currentNumberOfFaces < 2)
    
    482
    +  if (currentNumberOfFaces_ < 2)
    
    483 483
       {
    
    484
    -    previousFaceButton->setEnabled(false);
    
    485
    -    nextFaceButton->setEnabled(false);
    
    484
    +    previousFaceButton_->setEnabled(false);
    
    485
    +    nextFaceButton_->setEnabled(false);
    
    486 486
       }
    
    487
    -  else if (currentFaceIndex == 0)
    
    487
    +  else if (currentFaceIndex_ == 0)
    
    488 488
       {
    
    489
    -    previousFaceButton->setEnabled(false);
    
    490
    -    nextFaceButton->setEnabled(true);
    
    489
    +    previousFaceButton_->setEnabled(false);
    
    490
    +    nextFaceButton_->setEnabled(true);
    
    491 491
       }
    
    492
    -  else if (currentFaceIndex >= currentNumberOfFaces - 1)
    
    492
    +  else if (currentFaceIndex_ >= currentNumberOfFaces_ - 1)
    
    493 493
       {
    
    494
    -    previousFaceButton->setEnabled(true);
    
    495
    -    nextFaceButton->setEnabled(false);
    
    494
    +    previousFaceButton_->setEnabled(true);
    
    495
    +    nextFaceButton_->setEnabled(false);
    
    496 496
       }
    
    497 497
       else
    
    498 498
       {
    
    499
    -    previousFaceButton->setEnabled(true);
    
    500
    -    nextFaceButton->setEnabled(true);
    
    499
    +    previousFaceButton_->setEnabled(true);
    
    500
    +    nextFaceButton_->setEnabled(true);
    
    501 501
       }
    
    502 502
     }
    
    503 503
     
    
    ... ... @@ -505,25 +505,25 @@ MainGUI::checkCurrentFaceIndex()
    505 505
     void
    
    506 506
     MainGUI::checkCurrentNamedInstanceIndex()
    
    507 507
     {
    
    508
    -  if (currentNumberOfNamedInstances < 2)
    
    508
    +  if (currentNumberOfNamedInstances_ < 2)
    
    509 509
       {
    
    510
    -    previousNamedInstanceButton->setEnabled(false);
    
    511
    -    nextNamedInstanceButton->setEnabled(false);
    
    510
    +    previousNamedInstanceButton_->setEnabled(false);
    
    511
    +    nextNamedInstanceButton_->setEnabled(false);
    
    512 512
       }
    
    513
    -  else if (currentNamedInstanceIndex == 0)
    
    513
    +  else if (currentNamedInstanceIndex_ == 0)
    
    514 514
       {
    
    515
    -    previousNamedInstanceButton->setEnabled(false);
    
    516
    -    nextNamedInstanceButton->setEnabled(true);
    
    515
    +    previousNamedInstanceButton_->setEnabled(false);
    
    516
    +    nextNamedInstanceButton_->setEnabled(true);
    
    517 517
       }
    
    518
    -  else if (currentNamedInstanceIndex >= currentNumberOfNamedInstances - 1)
    
    518
    +  else if (currentNamedInstanceIndex_ >= currentNumberOfNamedInstances_ - 1)
    
    519 519
       {
    
    520
    -    previousNamedInstanceButton->setEnabled(true);
    
    521
    -    nextNamedInstanceButton->setEnabled(false);
    
    520
    +    previousNamedInstanceButton_->setEnabled(true);
    
    521
    +    nextNamedInstanceButton_->setEnabled(false);
    
    522 522
       }
    
    523 523
       else
    
    524 524
       {
    
    525
    -    previousNamedInstanceButton->setEnabled(true);
    
    526
    -    nextNamedInstanceButton->setEnabled(true);
    
    525
    +    previousNamedInstanceButton_->setEnabled(true);
    
    526
    +    nextNamedInstanceButton_->setEnabled(true);
    
    527 527
       }
    
    528 528
     }
    
    529 529
     
    
    ... ... @@ -531,11 +531,11 @@ MainGUI::checkCurrentNamedInstanceIndex()
    531 531
     void
    
    532 532
     MainGUI::previousFont()
    
    533 533
     {
    
    534
    -  if (currentFontIndex > 0)
    
    534
    +  if (currentFontIndex_ > 0)
    
    535 535
       {
    
    536
    -    currentFontIndex--;
    
    537
    -    currentFaceIndex = 0;
    
    538
    -    currentNamedInstanceIndex = 0;
    
    536
    +    currentFontIndex_--;
    
    537
    +    currentFaceIndex_ = 0;
    
    538
    +    currentNamedInstanceIndex_ = 0;
    
    539 539
         showFont();
    
    540 540
       }
    
    541 541
     }
    
    ... ... @@ -544,11 +544,11 @@ MainGUI::previousFont()
    544 544
     void
    
    545 545
     MainGUI::nextFont()
    
    546 546
     {
    
    547
    -  if (currentFontIndex < engine->numberOfOpenedFonts() - 1)
    
    547
    +  if (currentFontIndex_ < engine_->numberOfOpenedFonts() - 1)
    
    548 548
       {
    
    549
    -    currentFontIndex++;
    
    550
    -    currentFaceIndex = 0;
    
    551
    -    currentNamedInstanceIndex = 0;
    
    549
    +    currentFontIndex_++;
    
    550
    +    currentFaceIndex_ = 0;
    
    551
    +    currentNamedInstanceIndex_ = 0;
    
    552 552
         showFont();
    
    553 553
       }
    
    554 554
     }
    
    ... ... @@ -557,10 +557,10 @@ MainGUI::nextFont()
    557 557
     void
    
    558 558
     MainGUI::previousFace()
    
    559 559
     {
    
    560
    -  if (currentFaceIndex > 0)
    
    560
    +  if (currentFaceIndex_ > 0)
    
    561 561
       {
    
    562
    -    currentFaceIndex--;
    
    563
    -    currentNamedInstanceIndex = 0;
    
    562
    +    currentFaceIndex_--;
    
    563
    +    currentNamedInstanceIndex_ = 0;
    
    564 564
         showFont();
    
    565 565
       }
    
    566 566
     }
    
    ... ... @@ -569,10 +569,10 @@ MainGUI::previousFace()
    569 569
     void
    
    570 570
     MainGUI::nextFace()
    
    571 571
     {
    
    572
    -  if (currentFaceIndex < currentNumberOfFaces - 1)
    
    572
    +  if (currentFaceIndex_ < currentNumberOfFaces_ - 1)
    
    573 573
       {
    
    574
    -    currentFaceIndex++;
    
    575
    -    currentNamedInstanceIndex = 0;
    
    574
    +    currentFaceIndex_++;
    
    575
    +    currentNamedInstanceIndex_ = 0;
    
    576 576
         showFont();
    
    577 577
       }
    
    578 578
     }
    
    ... ... @@ -581,9 +581,9 @@ MainGUI::nextFace()
    581 581
     void
    
    582 582
     MainGUI::previousNamedInstance()
    
    583 583
     {
    
    584
    -  if (currentNamedInstanceIndex > 0)
    
    584
    +  if (currentNamedInstanceIndex_ > 0)
    
    585 585
       {
    
    586
    -    currentNamedInstanceIndex--;
    
    586
    +    currentNamedInstanceIndex_--;
    
    587 587
         showFont();
    
    588 588
       }
    
    589 589
     }
    
    ... ... @@ -592,9 +592,9 @@ MainGUI::previousNamedInstance()
    592 592
     void
    
    593 593
     MainGUI::nextNamedInstance()
    
    594 594
     {
    
    595
    -  if (currentNamedInstanceIndex < currentNumberOfNamedInstances - 1)
    
    595
    +  if (currentNamedInstanceIndex_ < currentNumberOfNamedInstances_ - 1)
    
    596 596
       {
    
    597
    -    currentNamedInstanceIndex++;
    
    597
    +    currentNamedInstanceIndex_++;
    
    598 598
         showFont();
    
    599 599
       }
    
    600 600
     }
    
    ... ... @@ -603,7 +603,7 @@ MainGUI::nextNamedInstance()
    603 603
     void
    
    604 604
     MainGUI::zoom()
    
    605 605
     {
    
    606
    -  int scale = zoomSpinBox->value();
    
    606
    +  int scale = zoomSpinBox_->value();
    
    607 607
     
    
    608 608
       QTransform transform;
    
    609 609
       transform.scale(scale, scale);
    
    ... ... @@ -614,7 +614,7 @@ MainGUI::zoom()
    614 614
       qreal shift = 0.5 / scale;
    
    615 615
       transform.translate(shift, shift);
    
    616 616
     
    
    617
    -  glyphView->setTransform(transform);
    
    617
    +  glyphView_->setTransform(transform);
    
    618 618
     }
    
    619 619
     
    
    620 620
     
    
    ... ... @@ -623,28 +623,28 @@ MainGUI::setGraphicsDefaults()
    623 623
     {
    
    624 624
       // color tables (with suitable opacity values) for converting
    
    625 625
       // FreeType's pixmaps to something Qt understands
    
    626
    -  monoColorTable.append(QColor(Qt::transparent).rgba());
    
    627
    -  monoColorTable.append(QColor(Qt::black).rgba());
    
    626
    +  monoColorTable_.append(QColor(Qt::transparent).rgba());
    
    627
    +  monoColorTable_.append(QColor(Qt::black).rgba());
    
    628 628
     
    
    629 629
       for (int i = 0xFF; i >= 0; i--)
    
    630
    -    grayColorTable.append(qRgba(i, i, i, 0xFF - i));
    
    630
    +    grayColorTable_.append(qRgba(i, i, i, 0xFF - i));
    
    631 631
     
    
    632 632
       // XXX make this user-configurable
    
    633 633
     
    
    634
    -  axisPen.setColor(Qt::black);
    
    635
    -  axisPen.setWidth(0);
    
    636
    -  blueZonePen.setColor(QColor(64, 64, 255, 64)); // light blue
    
    637
    -  blueZonePen.setWidth(0);
    
    638
    -  gridPen.setColor(Qt::lightGray);
    
    639
    -  gridPen.setWidth(0);
    
    640
    -  offPen.setColor(Qt::darkGreen);
    
    641
    -  offPen.setWidth(3);
    
    642
    -  onPen.setColor(Qt::red);
    
    643
    -  onPen.setWidth(3);
    
    644
    -  outlinePen.setColor(Qt::red);
    
    645
    -  outlinePen.setWidth(0);
    
    646
    -  segmentPen.setColor(QColor(64, 255, 128, 64)); // light green
    
    647
    -  segmentPen.setWidth(0);
    
    634
    +  axisPen_.setColor(Qt::black);
    
    635
    +  axisPen_.setWidth(0);
    
    636
    +  blueZonePen_.setColor(QColor(64, 64, 255, 64)); // light blue
    
    637
    +  blueZonePen_.setWidth(0);
    
    638
    +  gridPen_.setColor(Qt::lightGray);
    
    639
    +  gridPen_.setWidth(0);
    
    640
    +  offPen_.setColor(Qt::darkGreen);
    
    641
    +  offPen_.setWidth(3);
    
    642
    +  onPen_.setColor(Qt::red);
    
    643
    +  onPen_.setWidth(3);
    
    644
    +  outlinePen_.setColor(Qt::red);
    
    645
    +  outlinePen_.setWidth(0);
    
    646
    +  segmentPen_.setColor(QColor(64, 255, 128, 64)); // light green
    
    647
    +  segmentPen_.setWidth(0);
    
    648 648
     }
    
    649 649
     
    
    650 650
     
    
    ... ... @@ -653,82 +653,82 @@ MainGUI::drawGlyph()
    653 653
     {
    
    654 654
       // the call to `engine->loadOutline' updates FreeType's load flags
    
    655 655
     
    
    656
    -  if (!engine)
    
    656
    +  if (!engine_)
    
    657 657
         return;
    
    658 658
     
    
    659
    -  if (currentGlyphBitmapItem)
    
    659
    +  if (currentGlyphBitmapItem_)
    
    660 660
       {
    
    661
    -    glyphScene->removeItem(currentGlyphBitmapItem);
    
    662
    -    delete currentGlyphBitmapItem;
    
    661
    +    glyphScene_->removeItem(currentGlyphBitmapItem_);
    
    662
    +    delete currentGlyphBitmapItem_;
    
    663 663
     
    
    664
    -    currentGlyphBitmapItem = NULL;
    
    664
    +    currentGlyphBitmapItem_ = NULL;
    
    665 665
       }
    
    666 666
     
    
    667
    -  if (currentGlyphOutlineItem)
    
    667
    +  if (currentGlyphOutlineItem_)
    
    668 668
       {
    
    669
    -    glyphScene->removeItem(currentGlyphOutlineItem);
    
    670
    -    delete currentGlyphOutlineItem;
    
    669
    +    glyphScene_->removeItem(currentGlyphOutlineItem_);
    
    670
    +    delete currentGlyphOutlineItem_;
    
    671 671
     
    
    672
    -    currentGlyphOutlineItem = NULL;
    
    672
    +    currentGlyphOutlineItem_ = NULL;
    
    673 673
       }
    
    674 674
     
    
    675
    -  if (currentGlyphPointsItem)
    
    675
    +  if (currentGlyphPointsItem_)
    
    676 676
       {
    
    677
    -    glyphScene->removeItem(currentGlyphPointsItem);
    
    678
    -    delete currentGlyphPointsItem;
    
    677
    +    glyphScene_->removeItem(currentGlyphPointsItem_);
    
    678
    +    delete currentGlyphPointsItem_;
    
    679 679
     
    
    680
    -    currentGlyphPointsItem = NULL;
    
    680
    +    currentGlyphPointsItem_ = NULL;
    
    681 681
       }
    
    682 682
     
    
    683
    -  if (currentGlyphPointNumbersItem)
    
    683
    +  if (currentGlyphPointNumbersItem_)
    
    684 684
       {
    
    685
    -    glyphScene->removeItem(currentGlyphPointNumbersItem);
    
    686
    -    delete currentGlyphPointNumbersItem;
    
    685
    +    glyphScene_->removeItem(currentGlyphPointNumbersItem_);
    
    686
    +    delete currentGlyphPointNumbersItem_;
    
    687 687
     
    
    688
    -    currentGlyphPointNumbersItem = NULL;
    
    688
    +    currentGlyphPointNumbersItem_ = NULL;
    
    689 689
       }
    
    690 690
     
    
    691 691
       syncSettings();
    
    692
    -  FT_Outline* outline = engine->loadOutline(currentGlyphIndex);
    
    692
    +  FT_Outline* outline = engine_->loadOutline(currentGlyphIndex_);
    
    693 693
       if (outline)
    
    694 694
       {
    
    695
    -    if (showBitmapCheckBox->isChecked())
    
    695
    +    if (showBitmapCheckBox_->isChecked())
    
    696 696
         {
    
    697 697
           // XXX support LCD
    
    698 698
           FT_Pixel_Mode pixelMode = FT_PIXEL_MODE_GRAY;
    
    699
    -      if (antiAliasingComboBoxx->currentIndex() == Engine::AntiAliasing_None)
    
    699
    +      if (antiAliasingComboBoxx_->currentIndex() == Engine::AntiAliasing_None)
    
    700 700
             pixelMode = FT_PIXEL_MODE_MONO;
    
    701 701
     
    
    702
    -      currentGlyphBitmapItem = new GlyphBitmap(outline,
    
    703
    -                                               engine->ftLibrary(),
    
    702
    +      currentGlyphBitmapItem_ = new GlyphBitmap(outline,
    
    703
    +                                               engine_->ftLibrary(),
    
    704 704
                                                    pixelMode,
    
    705
    -                                               monoColorTable,
    
    706
    -                                               grayColorTable);
    
    707
    -      glyphScene->addItem(currentGlyphBitmapItem);
    
    705
    +                                               monoColorTable_,
    
    706
    +                                               grayColorTable_);
    
    707
    +      glyphScene_->addItem(currentGlyphBitmapItem_);
    
    708 708
         }
    
    709 709
     
    
    710
    -    if (showOutlinesCheckBox->isChecked())
    
    710
    +    if (showOutlinesCheckBox_->isChecked())
    
    711 711
         {
    
    712
    -      currentGlyphOutlineItem = new GlyphOutline(outlinePen, outline);
    
    713
    -      glyphScene->addItem(currentGlyphOutlineItem);
    
    712
    +      currentGlyphOutlineItem_ = new GlyphOutline(outlinePen_, outline);
    
    713
    +      glyphScene_->addItem(currentGlyphOutlineItem_);
    
    714 714
         }
    
    715 715
     
    
    716
    -    if (showPointsCheckBox->isChecked())
    
    716
    +    if (showPointsCheckBox_->isChecked())
    
    717 717
         {
    
    718
    -      currentGlyphPointsItem = new GlyphPoints(onPen, offPen, outline);
    
    719
    -      glyphScene->addItem(currentGlyphPointsItem);
    
    718
    +      currentGlyphPointsItem_ = new GlyphPoints(onPen_, offPen_, outline);
    
    719
    +      glyphScene_->addItem(currentGlyphPointsItem_);
    
    720 720
     
    
    721
    -      if (showPointNumbersCheckBox->isChecked())
    
    721
    +      if (showPointNumbersCheckBox_->isChecked())
    
    722 722
           {
    
    723
    -        currentGlyphPointNumbersItem = new GlyphPointNumbers(onPen,
    
    724
    -                                                             offPen,
    
    723
    +        currentGlyphPointNumbersItem_ = new GlyphPointNumbers(onPen_,
    
    724
    +                                                             offPen_,
    
    725 725
                                                                  outline);
    
    726
    -        glyphScene->addItem(currentGlyphPointNumbersItem);
    
    726
    +        glyphScene_->addItem(currentGlyphPointNumbersItem_);
    
    727 727
           }
    
    728 728
         }
    
    729 729
       }
    
    730 730
     
    
    731
    -  glyphScene->update();
    
    731
    +  glyphScene_->update();
    
    732 732
     }
    
    733 733
     
    
    734 734
     
    
    ... ... @@ -738,309 +738,309 @@ void
    738 738
     MainGUI::createLayout()
    
    739 739
     {
    
    740 740
       // left side
    
    741
    -  fontFilenameLabel = new QLabel;
    
    741
    +  fontFilenameLabel_ = new QLabel;
    
    742 742
     
    
    743
    -  hintingCheckBox = new QCheckBox(tr("Hinting"));
    
    743
    +  hintingCheckBox_ = new QCheckBox(tr("Hinting"));
    
    744 744
     
    
    745
    -  hintingModeLabel = new QLabel(tr("Hinting Mode"));
    
    746
    -  hintingModeLabel->setAlignment(Qt::AlignRight);
    
    747
    -  hintingModeComboBoxx = new QComboBoxx;
    
    748
    -  hintingModeComboBoxx->insertItem(HintingMode_TrueType_v35,
    
    745
    +  hintingModeLabel_ = new QLabel(tr("Hinting Mode"));
    
    746
    +  hintingModeLabel_->setAlignment(Qt::AlignRight);
    
    747
    +  hintingModeComboBoxx_ = new QComboBoxx;
    
    748
    +  hintingModeComboBoxx_->insertItem(HintingMode_TrueType_v35,
    
    749 749
                                        tr("TrueType v35"));
    
    750
    -  hintingModeComboBoxx->insertItem(HintingMode_TrueType_v38,
    
    750
    +  hintingModeComboBoxx_->insertItem(HintingMode_TrueType_v38,
    
    751 751
                                        tr("TrueType v38"));
    
    752
    -  hintingModeComboBoxx->insertItem(HintingMode_TrueType_v40,
    
    752
    +  hintingModeComboBoxx_->insertItem(HintingMode_TrueType_v40,
    
    753 753
                                        tr("TrueType v40"));
    
    754
    -  hintingModeComboBoxx->insertItem(HintingMode_CFF_FreeType,
    
    754
    +  hintingModeComboBoxx_->insertItem(HintingMode_CFF_FreeType,
    
    755 755
                                        tr("CFF (FreeType)"));
    
    756
    -  hintingModeComboBoxx->insertItem(HintingMode_CFF_Adobe,
    
    756
    +  hintingModeComboBoxx_->insertItem(HintingMode_CFF_Adobe,
    
    757 757
                                        tr("CFF (Adobe)"));
    
    758
    -  hintingModeLabel->setBuddy(hintingModeComboBoxx);
    
    759
    -
    
    760
    -  autoHintingCheckBox = new QCheckBox(tr("Auto-Hinting"));
    
    761
    -  horizontalHintingCheckBox = new QCheckBox(tr("Horizontal Hinting"));
    
    762
    -  verticalHintingCheckBox = new QCheckBox(tr("Vertical Hinting"));
    
    763
    -  blueZoneHintingCheckBox = new QCheckBox(tr("Blue-Zone Hinting"));
    
    764
    -  segmentDrawingCheckBox = new QCheckBox(tr("Segment Drawing"));
    
    765
    -
    
    766
    -  antiAliasingLabel = new QLabel(tr("Anti-Aliasing"));
    
    767
    -  antiAliasingLabel->setAlignment(Qt::AlignRight);
    
    768
    -  antiAliasingComboBoxx = new QComboBoxx;
    
    769
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_None,
    
    758
    +  hintingModeLabel_->setBuddy(hintingModeComboBoxx_);
    
    759
    +
    
    760
    +  autoHintingCheckBox_ = new QCheckBox(tr("Auto-Hinting"));
    
    761
    +  horizontalHintingCheckBox_ = new QCheckBox(tr("Horizontal Hinting"));
    
    762
    +  verticalHintingCheckBox_ = new QCheckBox(tr("Vertical Hinting"));
    
    763
    +  blueZoneHintingCheckBox_ = new QCheckBox(tr("Blue-Zone Hinting"));
    
    764
    +  segmentDrawingCheckBox_ = new QCheckBox(tr("Segment Drawing"));
    
    765
    +
    
    766
    +  antiAliasingLabel_ = new QLabel(tr("Anti-Aliasing"));
    
    767
    +  antiAliasingLabel_->setAlignment(Qt::AlignRight);
    
    768
    +  antiAliasingComboBoxx_ = new QComboBoxx;
    
    769
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_None,
    
    770 770
                                         tr("None"));
    
    771
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_Normal,
    
    771
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_Normal,
    
    772 772
                                         tr("Normal"));
    
    773
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_Light,
    
    773
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_Light,
    
    774 774
                                         tr("Light"));
    
    775
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_LCD,
    
    775
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_LCD,
    
    776 776
                                         tr("LCD (RGB)"));
    
    777
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_LCD_BGR,
    
    777
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_LCD_BGR,
    
    778 778
                                         tr("LCD (BGR)"));
    
    779
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_LCD_Vertical,
    
    779
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_LCD_Vertical,
    
    780 780
                                         tr("LCD (vert. RGB)"));
    
    781
    -  antiAliasingComboBoxx->insertItem(Engine::AntiAliasing_LCD_Vertical_BGR,
    
    781
    +  antiAliasingComboBoxx_->insertItem(Engine::AntiAliasing_LCD_Vertical_BGR,
    
    782 782
                                         tr("LCD (vert. BGR)"));
    
    783
    -  antiAliasingLabel->setBuddy(antiAliasingComboBoxx);
    
    783
    +  antiAliasingLabel_->setBuddy(antiAliasingComboBoxx_);
    
    784 784
     
    
    785
    -  lcdFilterLabel = new QLabel(tr("LCD Filter"));
    
    786
    -  lcdFilterLabel->setAlignment(Qt::AlignRight);
    
    787
    -  lcdFilterComboBox = new QComboBox;
    
    788
    -  lcdFilterComboBox->insertItem(LCDFilter_Default, tr("Default"));
    
    789
    -  lcdFilterComboBox->insertItem(LCDFilter_Light, tr("Light"));
    
    790
    -  lcdFilterComboBox->insertItem(LCDFilter_None, tr("None"));
    
    791
    -  lcdFilterComboBox->insertItem(LCDFilter_Legacy, tr("Legacy"));
    
    792
    -  lcdFilterLabel->setBuddy(lcdFilterComboBox);
    
    785
    +  lcdFilterLabel_ = new QLabel(tr("LCD Filter"));
    
    786
    +  lcdFilterLabel_->setAlignment(Qt::AlignRight);
    
    787
    +  lcdFilterComboBox_ = new QComboBox;
    
    788
    +  lcdFilterComboBox_->insertItem(LCDFilter_Default, tr("Default"));
    
    789
    +  lcdFilterComboBox_->insertItem(LCDFilter_Light, tr("Light"));
    
    790
    +  lcdFilterComboBox_->insertItem(LCDFilter_None, tr("None"));
    
    791
    +  lcdFilterComboBox_->insertItem(LCDFilter_Legacy, tr("Legacy"));
    
    792
    +  lcdFilterLabel_->setBuddy(lcdFilterComboBox_);
    
    793 793
     
    
    794 794
       int width;
    
    795 795
       // make all labels have the same width
    
    796
    -  width = hintingModeLabel->minimumSizeHint().width();
    
    797
    -  width = qMax(antiAliasingLabel->minimumSizeHint().width(), width);
    
    798
    -  width = qMax(lcdFilterLabel->minimumSizeHint().width(), width);
    
    799
    -  hintingModeLabel->setMinimumWidth(width);
    
    800
    -  antiAliasingLabel->setMinimumWidth(width);
    
    801
    -  lcdFilterLabel->setMinimumWidth(width);
    
    796
    +  width = hintingModeLabel_->minimumSizeHint().width();
    
    797
    +  width = qMax(antiAliasingLabel_->minimumSizeHint().width(), width);
    
    798
    +  width = qMax(lcdFilterLabel_->minimumSizeHint().width(), width);
    
    799
    +  hintingModeLabel_->setMinimumWidth(width);
    
    800
    +  antiAliasingLabel_->setMinimumWidth(width);
    
    801
    +  lcdFilterLabel_->setMinimumWidth(width);
    
    802 802
     
    
    803 803
       // ensure that all items in combo boxes fit completely;
    
    804 804
       // also make all combo boxes have the same width
    
    805
    -  width = hintingModeComboBoxx->minimumSizeHint().width();
    
    806
    -  width = qMax(antiAliasingComboBoxx->minimumSizeHint().width(), width);
    
    807
    -  width = qMax(lcdFilterComboBox->minimumSizeHint().width(), width);
    
    808
    -  hintingModeComboBoxx->setMinimumWidth(width);
    
    809
    -  antiAliasingComboBoxx->setMinimumWidth(width);
    
    810
    -  lcdFilterComboBox->setMinimumWidth(width);
    
    811
    -
    
    812
    -  gammaLabel = new QLabel(tr("Gamma"));
    
    813
    -  gammaLabel->setAlignment(Qt::AlignRight);
    
    814
    -  gammaSlider = new QSlider(Qt::Horizontal);
    
    815
    -  gammaSlider->setRange(0, 30); // in 1/10th
    
    816
    -  gammaSlider->setTickPosition(QSlider::TicksBelow);
    
    817
    -  gammaSlider->setTickInterval(5);
    
    818
    -  gammaLabel->setBuddy(gammaSlider);
    
    819
    -
    
    820
    -  showBitmapCheckBox = new QCheckBox(tr("Show Bitmap"));
    
    821
    -  showPointsCheckBox = new QCheckBox(tr("Show Points"));
    
    822
    -  showPointNumbersCheckBox = new QCheckBox(tr("Show Point Numbers"));
    
    823
    -  showOutlinesCheckBox = new QCheckBox(tr("Show Outlines"));
    
    824
    -
    
    825
    -  infoLeftLayout = new QHBoxLayout;
    
    826
    -  infoLeftLayout->addWidget(fontFilenameLabel);
    
    827
    -
    
    828
    -  hintingModeLayout = new QHBoxLayout;
    
    829
    -  hintingModeLayout->addWidget(hintingModeLabel);
    
    830
    -  hintingModeLayout->addWidget(hintingModeComboBoxx);
    
    831
    -
    
    832
    -  horizontalHintingLayout = new QHBoxLayout;
    
    833
    -  horizontalHintingLayout->addSpacing(20); // XXX px
    
    834
    -  horizontalHintingLayout->addWidget(horizontalHintingCheckBox);
    
    835
    -
    
    836
    -  verticalHintingLayout = new QHBoxLayout;
    
    837
    -  verticalHintingLayout->addSpacing(20); // XXX px
    
    838
    -  verticalHintingLayout->addWidget(verticalHintingCheckBox);
    
    839
    -
    
    840
    -  blueZoneHintingLayout = new QHBoxLayout;
    
    841
    -  blueZoneHintingLayout->addSpacing(20); // XXX px
    
    842
    -  blueZoneHintingLayout->addWidget(blueZoneHintingCheckBox);
    
    843
    -
    
    844
    -  segmentDrawingLayout = new QHBoxLayout;
    
    845
    -  segmentDrawingLayout->addSpacing(20); // XXX px
    
    846
    -  segmentDrawingLayout->addWidget(segmentDrawingCheckBox);
    
    847
    -
    
    848
    -  antiAliasingLayout = new QHBoxLayout;
    
    849
    -  antiAliasingLayout->addWidget(antiAliasingLabel);
    
    850
    -  antiAliasingLayout->addWidget(antiAliasingComboBoxx);
    
    851
    -
    
    852
    -  lcdFilterLayout = new QHBoxLayout;
    
    853
    -  lcdFilterLayout->addWidget(lcdFilterLabel);
    
    854
    -  lcdFilterLayout->addWidget(lcdFilterComboBox);
    
    855
    -
    
    856
    -  gammaLayout = new QHBoxLayout;
    
    857
    -  gammaLayout->addWidget(gammaLabel);
    
    858
    -  gammaLayout->addWidget(gammaSlider);
    
    859
    -
    
    860
    -  pointNumbersLayout = new QHBoxLayout;
    
    861
    -  pointNumbersLayout->addSpacing(20); // XXX px
    
    862
    -  pointNumbersLayout->addWidget(showPointNumbersCheckBox);
    
    863
    -
    
    864
    -  generalTabLayout = new QVBoxLayout;
    
    865
    -  generalTabLayout->addWidget(hintingCheckBox);
    
    866
    -  generalTabLayout->addLayout(hintingModeLayout);
    
    867
    -  generalTabLayout->addWidget(autoHintingCheckBox);
    
    868
    -  generalTabLayout->addLayout(horizontalHintingLayout);
    
    869
    -  generalTabLayout->addLayout(verticalHintingLayout);
    
    870
    -  generalTabLayout->addLayout(blueZoneHintingLayout);
    
    871
    -  generalTabLayout->addLayout(segmentDrawingLayout);
    
    872
    -  generalTabLayout->addSpacing(20); // XXX px
    
    873
    -  generalTabLayout->addStretch(1);
    
    874
    -  generalTabLayout->addLayout(antiAliasingLayout);
    
    875
    -  generalTabLayout->addLayout(lcdFilterLayout);
    
    876
    -  generalTabLayout->addSpacing(20); // XXX px
    
    877
    -  generalTabLayout->addStretch(1);
    
    878
    -  generalTabLayout->addLayout(gammaLayout);
    
    879
    -  generalTabLayout->addSpacing(20); // XXX px
    
    880
    -  generalTabLayout->addStretch(1);
    
    881
    -  generalTabLayout->addWidget(showBitmapCheckBox);
    
    882
    -  generalTabLayout->addWidget(showPointsCheckBox);
    
    883
    -  generalTabLayout->addLayout(pointNumbersLayout);
    
    884
    -  generalTabLayout->addWidget(showOutlinesCheckBox);
    
    885
    -
    
    886
    -  generalTabWidget = new QWidget;
    
    887
    -  generalTabWidget->setLayout(generalTabLayout);
    
    888
    -
    
    889
    -  mmgxTabWidget = new QWidget;
    
    890
    -
    
    891
    -  tabWidget = new QTabWidget;
    
    892
    -  tabWidget->addTab(generalTabWidget, tr("General"));
    
    893
    -  tabWidget->addTab(mmgxTabWidget, tr("MM/GX"));
    
    894
    -
    
    895
    -  leftLayout = new QVBoxLayout;
    
    896
    -  leftLayout->addLayout(infoLeftLayout);
    
    897
    -  leftLayout->addWidget(tabWidget);
    
    805
    +  width = hintingModeComboBoxx_->minimumSizeHint().width();
    
    806
    +  width = qMax(antiAliasingComboBoxx_->minimumSizeHint().width(), width);
    
    807
    +  width = qMax(lcdFilterComboBox_->minimumSizeHint().width(), width);
    
    808
    +  hintingModeComboBoxx_->setMinimumWidth(width);
    
    809
    +  antiAliasingComboBoxx_->setMinimumWidth(width);
    
    810
    +  lcdFilterComboBox_->setMinimumWidth(width);
    
    811
    +
    
    812
    +  gammaLabel_ = new QLabel(tr("Gamma"));
    
    813
    +  gammaLabel_->setAlignment(Qt::AlignRight);
    
    814
    +  gammaSlider_ = new QSlider(Qt::Horizontal);
    
    815
    +  gammaSlider_->setRange(0, 30); // in 1/10th
    
    816
    +  gammaSlider_->setTickPosition(QSlider::TicksBelow);
    
    817
    +  gammaSlider_->setTickInterval(5);
    
    818
    +  gammaLabel_->setBuddy(gammaSlider_);
    
    819
    +
    
    820
    +  showBitmapCheckBox_ = new QCheckBox(tr("Show Bitmap"));
    
    821
    +  showPointsCheckBox_ = new QCheckBox(tr("Show Points"));
    
    822
    +  showPointNumbersCheckBox_ = new QCheckBox(tr("Show Point Numbers"));
    
    823
    +  showOutlinesCheckBox_ = new QCheckBox(tr("Show Outlines"));
    
    824
    +
    
    825
    +  infoLeftLayout_ = new QHBoxLayout;
    
    826
    +  infoLeftLayout_->addWidget(fontFilenameLabel_);
    
    827
    +
    
    828
    +  hintingModeLayout_ = new QHBoxLayout;
    
    829
    +  hintingModeLayout_->addWidget(hintingModeLabel_);
    
    830
    +  hintingModeLayout_->addWidget(hintingModeComboBoxx_);
    
    831
    +
    
    832
    +  horizontalHintingLayout_ = new QHBoxLayout;
    
    833
    +  horizontalHintingLayout_->addSpacing(20); // XXX px
    
    834
    +  horizontalHintingLayout_->addWidget(horizontalHintingCheckBox_);
    
    835
    +
    
    836
    +  verticalHintingLayout_ = new QHBoxLayout;
    
    837
    +  verticalHintingLayout_->addSpacing(20); // XXX px
    
    838
    +  verticalHintingLayout_->addWidget(verticalHintingCheckBox_);
    
    839
    +
    
    840
    +  blueZoneHintingLayout_ = new QHBoxLayout;
    
    841
    +  blueZoneHintingLayout_->addSpacing(20); // XXX px
    
    842
    +  blueZoneHintingLayout_->addWidget(blueZoneHintingCheckBox_);
    
    843
    +
    
    844
    +  segmentDrawingLayout_ = new QHBoxLayout;
    
    845
    +  segmentDrawingLayout_->addSpacing(20); // XXX px
    
    846
    +  segmentDrawingLayout_->addWidget(segmentDrawingCheckBox_);
    
    847
    +
    
    848
    +  antiAliasingLayout_ = new QHBoxLayout;
    
    849
    +  antiAliasingLayout_->addWidget(antiAliasingLabel_);
    
    850
    +  antiAliasingLayout_->addWidget(antiAliasingComboBoxx_);
    
    851
    +
    
    852
    +  lcdFilterLayout_ = new QHBoxLayout;
    
    853
    +  lcdFilterLayout_->addWidget(lcdFilterLabel_);
    
    854
    +  lcdFilterLayout_->addWidget(lcdFilterComboBox_);
    
    855
    +
    
    856
    +  gammaLayout_ = new QHBoxLayout;
    
    857
    +  gammaLayout_->addWidget(gammaLabel_);
    
    858
    +  gammaLayout_->addWidget(gammaSlider_);
    
    859
    +
    
    860
    +  pointNumbersLayout_ = new QHBoxLayout;
    
    861
    +  pointNumbersLayout_->addSpacing(20); // XXX px
    
    862
    +  pointNumbersLayout_->addWidget(showPointNumbersCheckBox_);
    
    863
    +
    
    864
    +  generalTabLayout_ = new QVBoxLayout;
    
    865
    +  generalTabLayout_->addWidget(hintingCheckBox_);
    
    866
    +  generalTabLayout_->addLayout(hintingModeLayout_);
    
    867
    +  generalTabLayout_->addWidget(autoHintingCheckBox_);
    
    868
    +  generalTabLayout_->addLayout(horizontalHintingLayout_);
    
    869
    +  generalTabLayout_->addLayout(verticalHintingLayout_);
    
    870
    +  generalTabLayout_->addLayout(blueZoneHintingLayout_);
    
    871
    +  generalTabLayout_->addLayout(segmentDrawingLayout_);
    
    872
    +  generalTabLayout_->addSpacing(20); // XXX px
    
    873
    +  generalTabLayout_->addStretch(1);
    
    874
    +  generalTabLayout_->addLayout(antiAliasingLayout_);
    
    875
    +  generalTabLayout_->addLayout(lcdFilterLayout_);
    
    876
    +  generalTabLayout_->addSpacing(20); // XXX px
    
    877
    +  generalTabLayout_->addStretch(1);
    
    878
    +  generalTabLayout_->addLayout(gammaLayout_);
    
    879
    +  generalTabLayout_->addSpacing(20); // XXX px
    
    880
    +  generalTabLayout_->addStretch(1);
    
    881
    +  generalTabLayout_->addWidget(showBitmapCheckBox_);
    
    882
    +  generalTabLayout_->addWidget(showPointsCheckBox_);
    
    883
    +  generalTabLayout_->addLayout(pointNumbersLayout_);
    
    884
    +  generalTabLayout_->addWidget(showOutlinesCheckBox_);
    
    885
    +
    
    886
    +  generalTabWidget_ = new QWidget;
    
    887
    +  generalTabWidget_->setLayout(generalTabLayout_);
    
    888
    +
    
    889
    +  mmgxTabWidget_ = new QWidget;
    
    890
    +
    
    891
    +  tabWidget_ = new QTabWidget;
    
    892
    +  tabWidget_->addTab(generalTabWidget_, tr("General"));
    
    893
    +  tabWidget_->addTab(mmgxTabWidget_, tr("MM/GX"));
    
    894
    +
    
    895
    +  leftLayout_ = new QVBoxLayout;
    
    896
    +  leftLayout_->addLayout(infoLeftLayout_);
    
    897
    +  leftLayout_->addWidget(tabWidget_);
    
    898 898
     
    
    899 899
       // we don't want to expand the left side horizontally;
    
    900 900
       // to change the policy we have to use a widget wrapper
    
    901
    -  leftWidget = new QWidget;
    
    902
    -  leftWidget->setLayout(leftLayout);
    
    901
    +  leftWidget_ = new QWidget;
    
    902
    +  leftWidget_->setLayout(leftLayout_);
    
    903 903
     
    
    904 904
       QSizePolicy leftWidgetPolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    
    905 905
       leftWidgetPolicy.setHorizontalStretch(0);
    
    906
    -  leftWidgetPolicy.setVerticalPolicy(leftWidget->sizePolicy().verticalPolicy());
    
    907
    -  leftWidgetPolicy.setHeightForWidth(leftWidget->sizePolicy().hasHeightForWidth());
    
    906
    +  leftWidgetPolicy.setVerticalPolicy(leftWidget_->sizePolicy().verticalPolicy());
    
    907
    +  leftWidgetPolicy.setHeightForWidth(leftWidget_->sizePolicy().hasHeightForWidth());
    
    908 908
     
    
    909
    -  leftWidget->setSizePolicy(leftWidgetPolicy);
    
    909
    +  leftWidget_->setSizePolicy(leftWidgetPolicy);
    
    910 910
     
    
    911 911
       // right side
    
    912
    -  glyphIndexLabel = new QLabel;
    
    913
    -  glyphNameLabel = new QLabel;
    
    914
    -  fontNameLabel = new QLabel;
    
    912
    +  glyphIndexLabel_ = new QLabel;
    
    913
    +  glyphNameLabel_ = new QLabel;
    
    914
    +  fontNameLabel_ = new QLabel;
    
    915 915
     
    
    916
    -  glyphScene = new QGraphicsScene;
    
    917
    -  glyphScene->addItem(new Grid(gridPen, axisPen));
    
    916
    +  glyphScene_ = new QGraphicsScene;
    
    917
    +  glyphScene_->addItem(new Grid(gridPen_, axisPen_));
    
    918 918
     
    
    919
    -  currentGlyphBitmapItem = NULL;
    
    920
    -  currentGlyphOutlineItem = NULL;
    
    921
    -  currentGlyphPointsItem = NULL;
    
    922
    -  currentGlyphPointNumbersItem = NULL;
    
    919
    +  currentGlyphBitmapItem_ = NULL;
    
    920
    +  currentGlyphOutlineItem_ = NULL;
    
    921
    +  currentGlyphPointsItem_ = NULL;
    
    922
    +  currentGlyphPointNumbersItem_ = NULL;
    
    923 923
       drawGlyph();
    
    924 924
     
    
    925
    -  glyphView = new QGraphicsViewx;
    
    926
    -  glyphView->setRenderHint(QPainter::Antialiasing, true);
    
    927
    -  glyphView->setDragMode(QGraphicsView::ScrollHandDrag);
    
    928
    -  glyphView->setOptimizationFlags(QGraphicsView::DontSavePainterState);
    
    929
    -  glyphView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
    
    930
    -  glyphView->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
    
    931
    -  glyphView->setScene(glyphScene);
    
    932
    -
    
    933
    -  sizeLabel = new QLabel(tr("Size "));
    
    934
    -  sizeLabel->setAlignment(Qt::AlignRight);
    
    935
    -  sizeDoubleSpinBox = new QDoubleSpinBox;
    
    936
    -  sizeDoubleSpinBox->setAlignment(Qt::AlignRight);
    
    937
    -  sizeDoubleSpinBox->setDecimals(1);
    
    938
    -  sizeDoubleSpinBox->setRange(1, 500);
    
    939
    -  sizeLabel->setBuddy(sizeDoubleSpinBox);
    
    940
    -
    
    941
    -  unitsComboBox = new QComboBox;
    
    942
    -  unitsComboBox->insertItem(Units_px, "px");
    
    943
    -  unitsComboBox->insertItem(Units_pt, "pt");
    
    944
    -
    
    945
    -  dpiLabel = new QLabel(tr("DPI "));
    
    946
    -  dpiLabel->setAlignment(Qt::AlignRight);
    
    947
    -  dpiSpinBox = new QSpinBox;
    
    948
    -  dpiSpinBox->setAlignment(Qt::AlignRight);
    
    949
    -  dpiSpinBox->setRange(10, 600);
    
    950
    -  dpiLabel->setBuddy(dpiSpinBox);
    
    951
    -
    
    952
    -  toStartButtonx = new QPushButtonx("|<");
    
    953
    -  toM1000Buttonx = new QPushButtonx("-1000");
    
    954
    -  toM100Buttonx = new QPushButtonx("-100");
    
    955
    -  toM10Buttonx = new QPushButtonx("-10");
    
    956
    -  toM1Buttonx = new QPushButtonx("-1");
    
    957
    -  toP1Buttonx = new QPushButtonx("+1");
    
    958
    -  toP10Buttonx = new QPushButtonx("+10");
    
    959
    -  toP100Buttonx = new QPushButtonx("+100");
    
    960
    -  toP1000Buttonx = new QPushButtonx("+1000");
    
    961
    -  toEndButtonx = new QPushButtonx(">|");
    
    962
    -
    
    963
    -  zoomLabel = new QLabel(tr("Zoom Factor"));
    
    964
    -  zoomLabel->setAlignment(Qt::AlignRight);
    
    965
    -  zoomSpinBox = new QSpinBoxx;
    
    966
    -  zoomSpinBox->setAlignment(Qt::AlignRight);
    
    967
    -  zoomSpinBox->setRange(1, 1000 - 1000 % 64);
    
    968
    -  zoomSpinBox->setKeyboardTracking(false);
    
    969
    -  zoomLabel->setBuddy(zoomSpinBox);
    
    970
    -
    
    971
    -  previousFontButton = new QPushButton(tr("Previous Font"));
    
    972
    -  nextFontButton = new QPushButton(tr("Next Font"));
    
    973
    -  previousFaceButton = new QPushButton(tr("Previous Face"));
    
    974
    -  nextFaceButton = new QPushButton(tr("Next Face"));
    
    975
    -  previousNamedInstanceButton = new QPushButton(tr("Previous Named Instance"));
    
    976
    -  nextNamedInstanceButton = new QPushButton(tr("Next Named Instance"));
    
    925
    +  glyphView_ = new QGraphicsViewx;
    
    926
    +  glyphView_->setRenderHint(QPainter::Antialiasing, true);
    
    927
    +  glyphView_->setDragMode(QGraphicsView::ScrollHandDrag);
    
    928
    +  glyphView_->setOptimizationFlags(QGraphicsView::DontSavePainterState);
    
    929
    +  glyphView_->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
    
    930
    +  glyphView_->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
    
    931
    +  glyphView_->setScene(glyphScene_);
    
    932
    +
    
    933
    +  sizeLabel_ = new QLabel(tr("Size "));
    
    934
    +  sizeLabel_->setAlignment(Qt::AlignRight);
    
    935
    +  sizeDoubleSpinBox_ = new QDoubleSpinBox;
    
    936
    +  sizeDoubleSpinBox_->setAlignment(Qt::AlignRight);
    
    937
    +  sizeDoubleSpinBox_->setDecimals(1);
    
    938
    +  sizeDoubleSpinBox_->setRange(1, 500);
    
    939
    +  sizeLabel_->setBuddy(sizeDoubleSpinBox_);
    
    940
    +
    
    941
    +  unitsComboBox_ = new QComboBox;
    
    942
    +  unitsComboBox_->insertItem(Units_px, "px");
    
    943
    +  unitsComboBox_->insertItem(Units_pt, "pt");
    
    944
    +
    
    945
    +  dpiLabel_ = new QLabel(tr("DPI "));
    
    946
    +  dpiLabel_->setAlignment(Qt::AlignRight);
    
    947
    +  dpiSpinBox_ = new QSpinBox;
    
    948
    +  dpiSpinBox_->setAlignment(Qt::AlignRight);
    
    949
    +  dpiSpinBox_->setRange(10, 600);
    
    950
    +  dpiLabel_->setBuddy(dpiSpinBox_);
    
    951
    +
    
    952
    +  toStartButtonx_ = new QPushButtonx("|<");
    
    953
    +  toM1000Buttonx_ = new QPushButtonx("-1000");
    
    954
    +  toM100Buttonx_ = new QPushButtonx("-100");
    
    955
    +  toM10Buttonx_ = new QPushButtonx("-10");
    
    956
    +  toM1Buttonx_ = new QPushButtonx("-1");
    
    957
    +  toP1Buttonx_ = new QPushButtonx("+1");
    
    958
    +  toP10Buttonx_ = new QPushButtonx("+10");
    
    959
    +  toP100Buttonx_ = new QPushButtonx("+100");
    
    960
    +  toP1000Buttonx_ = new QPushButtonx("+1000");
    
    961
    +  toEndButtonx_ = new QPushButtonx(">|");
    
    962
    +
    
    963
    +  zoomLabel_ = new QLabel(tr("Zoom Factor"));
    
    964
    +  zoomLabel_->setAlignment(Qt::AlignRight);
    
    965
    +  zoomSpinBox_ = new QSpinBoxx;
    
    966
    +  zoomSpinBox_->setAlignment(Qt::AlignRight);
    
    967
    +  zoomSpinBox_->setRange(1, 1000 - 1000 % 64);
    
    968
    +  zoomSpinBox_->setKeyboardTracking(false);
    
    969
    +  zoomLabel_->setBuddy(zoomSpinBox_);
    
    970
    +
    
    971
    +  previousFontButton_ = new QPushButton(tr("Previous Font"));
    
    972
    +  nextFontButton_ = new QPushButton(tr("Next Font"));
    
    973
    +  previousFaceButton_ = new QPushButton(tr("Previous Face"));
    
    974
    +  nextFaceButton_ = new QPushButton(tr("Next Face"));
    
    975
    +  previousNamedInstanceButton_ = new QPushButton(tr("Previous Named Instance"));
    
    976
    +  nextNamedInstanceButton_ = new QPushButton(tr("Next Named Instance"));
    
    977 977
     
    
    978 978
       infoRightLayout = new QGridLayout;
    
    979
    -  infoRightLayout->addWidget(glyphIndexLabel, 0, 0);
    
    980
    -  infoRightLayout->addWidget(glyphNameLabel, 0, 1);
    
    981
    -  infoRightLayout->addWidget(fontNameLabel, 0, 2);
    
    982
    -
    
    983
    -  navigationLayout = new QHBoxLayout;
    
    984
    -  navigationLayout->setSpacing(0);
    
    985
    -  navigationLayout->addStretch(1);
    
    986
    -  navigationLayout->addWidget(toStartButtonx);
    
    987
    -  navigationLayout->addWidget(toM1000Buttonx);
    
    988
    -  navigationLayout->addWidget(toM100Buttonx);
    
    989
    -  navigationLayout->addWidget(toM10Buttonx);
    
    990
    -  navigationLayout->addWidget(toM1Buttonx);
    
    991
    -  navigationLayout->addWidget(toP1Buttonx);
    
    992
    -  navigationLayout->addWidget(toP10Buttonx);
    
    993
    -  navigationLayout->addWidget(toP100Buttonx);
    
    994
    -  navigationLayout->addWidget(toP1000Buttonx);
    
    995
    -  navigationLayout->addWidget(toEndButtonx);
    
    996
    -  navigationLayout->addStretch(1);
    
    997
    -
    
    998
    -  sizeLayout = new QHBoxLayout;
    
    999
    -  sizeLayout->addStretch(2);
    
    1000
    -  sizeLayout->addWidget(sizeLabel);
    
    1001
    -  sizeLayout->addWidget(sizeDoubleSpinBox);
    
    1002
    -  sizeLayout->addWidget(unitsComboBox);
    
    1003
    -  sizeLayout->addStretch(1);
    
    1004
    -  sizeLayout->addWidget(dpiLabel);
    
    1005
    -  sizeLayout->addWidget(dpiSpinBox);
    
    1006
    -  sizeLayout->addStretch(1);
    
    1007
    -  sizeLayout->addWidget(zoomLabel);
    
    1008
    -  sizeLayout->addWidget(zoomSpinBox);
    
    1009
    -  sizeLayout->addStretch(2);
    
    979
    +  infoRightLayout->addWidget(glyphIndexLabel_, 0, 0);
    
    980
    +  infoRightLayout->addWidget(glyphNameLabel_, 0, 1);
    
    981
    +  infoRightLayout->addWidget(fontNameLabel_, 0, 2);
    
    982
    +
    
    983
    +  navigationLayout_ = new QHBoxLayout;
    
    984
    +  navigationLayout_->setSpacing(0);
    
    985
    +  navigationLayout_->addStretch(1);
    
    986
    +  navigationLayout_->addWidget(toStartButtonx_);
    
    987
    +  navigationLayout_->addWidget(toM1000Buttonx_);
    
    988
    +  navigationLayout_->addWidget(toM100Buttonx_);
    
    989
    +  navigationLayout_->addWidget(toM10Buttonx_);
    
    990
    +  navigationLayout_->addWidget(toM1Buttonx_);
    
    991
    +  navigationLayout_->addWidget(toP1Buttonx_);
    
    992
    +  navigationLayout_->addWidget(toP10Buttonx_);
    
    993
    +  navigationLayout_->addWidget(toP100Buttonx_);
    
    994
    +  navigationLayout_->addWidget(toP1000Buttonx_);
    
    995
    +  navigationLayout_->addWidget(toEndButtonx_);
    
    996
    +  navigationLayout_->addStretch(1);
    
    997
    +
    
    998
    +  sizeLayout_ = new QHBoxLayout;
    
    999
    +  sizeLayout_->addStretch(2);
    
    1000
    +  sizeLayout_->addWidget(sizeLabel_);
    
    1001
    +  sizeLayout_->addWidget(sizeDoubleSpinBox_);
    
    1002
    +  sizeLayout_->addWidget(unitsComboBox_);
    
    1003
    +  sizeLayout_->addStretch(1);
    
    1004
    +  sizeLayout_->addWidget(dpiLabel_);
    
    1005
    +  sizeLayout_->addWidget(dpiSpinBox_);
    
    1006
    +  sizeLayout_->addStretch(1);
    
    1007
    +  sizeLayout_->addWidget(zoomLabel_);
    
    1008
    +  sizeLayout_->addWidget(zoomSpinBox_);
    
    1009
    +  sizeLayout_->addStretch(2);
    
    1010 1010
     
    
    1011 1011
       fontLayout = new QGridLayout;
    
    1012 1012
       fontLayout->setColumnStretch(0, 2);
    
    1013
    -  fontLayout->addWidget(nextFontButton, 0, 1);
    
    1014
    -  fontLayout->addWidget(previousFontButton, 1, 1);
    
    1013
    +  fontLayout->addWidget(nextFontButton_, 0, 1);
    
    1014
    +  fontLayout->addWidget(previousFontButton_, 1, 1);
    
    1015 1015
       fontLayout->setColumnStretch(2, 1);
    
    1016
    -  fontLayout->addWidget(nextFaceButton, 0, 3);
    
    1017
    -  fontLayout->addWidget(previousFaceButton, 1, 3);
    
    1016
    +  fontLayout->addWidget(nextFaceButton_, 0, 3);
    
    1017
    +  fontLayout->addWidget(previousFaceButton_, 1, 3);
    
    1018 1018
       fontLayout->setColumnStretch(4, 1);
    
    1019
    -  fontLayout->addWidget(nextNamedInstanceButton, 0, 5);
    
    1020
    -  fontLayout->addWidget(previousNamedInstanceButton, 1, 5);
    
    1019
    +  fontLayout->addWidget(nextNamedInstanceButton_, 0, 5);
    
    1020
    +  fontLayout->addWidget(previousNamedInstanceButton_, 1, 5);
    
    1021 1021
       fontLayout->setColumnStretch(6, 2);
    
    1022 1022
     
    
    1023
    -  rightLayout = new QVBoxLayout;
    
    1024
    -  rightLayout->addLayout(infoRightLayout);
    
    1025
    -  rightLayout->addWidget(glyphView);
    
    1026
    -  rightLayout->addLayout(navigationLayout);
    
    1027
    -  rightLayout->addSpacing(10); // XXX px
    
    1028
    -  rightLayout->addLayout(sizeLayout);
    
    1029
    -  rightLayout->addSpacing(10); // XXX px
    
    1030
    -  rightLayout->addLayout(fontLayout);
    
    1023
    +  rightLayout_ = new QVBoxLayout;
    
    1024
    +  rightLayout_->addLayout(infoRightLayout);
    
    1025
    +  rightLayout_->addWidget(glyphView_);
    
    1026
    +  rightLayout_->addLayout(navigationLayout_);
    
    1027
    +  rightLayout_->addSpacing(10); // XXX px
    
    1028
    +  rightLayout_->addLayout(sizeLayout_);
    
    1029
    +  rightLayout_->addSpacing(10); // XXX px
    
    1030
    +  rightLayout_->addLayout(fontLayout);
    
    1031 1031
     
    
    1032 1032
       // for symmetry with the left side use a widget also
    
    1033
    -  rightWidget = new QWidget;
    
    1034
    -  rightWidget->setLayout(rightLayout);
    
    1033
    +  rightWidget_ = new QWidget;
    
    1034
    +  rightWidget_->setLayout(rightLayout_);
    
    1035 1035
     
    
    1036 1036
       // the whole thing
    
    1037
    -  ftinspectLayout = new QHBoxLayout;
    
    1038
    -  ftinspectLayout->addWidget(leftWidget);
    
    1039
    -  ftinspectLayout->addWidget(rightWidget);
    
    1037
    +  ftinspectLayout_ = new QHBoxLayout;
    
    1038
    +  ftinspectLayout_->addWidget(leftWidget_);
    
    1039
    +  ftinspectLayout_->addWidget(rightWidget_);
    
    1040 1040
     
    
    1041
    -  ftinspectWidget = new QWidget;
    
    1042
    -  ftinspectWidget->setLayout(ftinspectLayout);
    
    1043
    -  setCentralWidget(ftinspectWidget);
    
    1041
    +  ftinspectWidget_ = new QWidget;
    
    1042
    +  ftinspectWidget_->setLayout(ftinspectLayout_);
    
    1043
    +  setCentralWidget(ftinspectWidget_);
    
    1044 1044
       setWindowTitle("ftinspect");
    
    1045 1045
     }
    
    1046 1046
     
    
    ... ... @@ -1048,122 +1048,122 @@ MainGUI::createLayout()
    1048 1048
     void
    
    1049 1049
     MainGUI::createConnections()
    
    1050 1050
     {
    
    1051
    -  connect(hintingCheckBox, SIGNAL(clicked()),
    
    1051
    +  connect(hintingCheckBox_, SIGNAL(clicked()),
    
    1052 1052
               SLOT(checkHinting()));
    
    1053 1053
     
    
    1054
    -  connect(hintingModeComboBoxx, SIGNAL(currentIndexChanged(int)),
    
    1054
    +  connect(hintingModeComboBoxx_, SIGNAL(currentIndexChanged(int)),
    
    1055 1055
               SLOT(checkHintingMode()));
    
    1056
    -  connect(antiAliasingComboBoxx, SIGNAL(currentIndexChanged(int)),
    
    1056
    +  connect(antiAliasingComboBoxx_, SIGNAL(currentIndexChanged(int)),
    
    1057 1057
               SLOT(checkAntiAliasing()));
    
    1058
    -  connect(lcdFilterComboBox, SIGNAL(currentIndexChanged(int)),
    
    1058
    +  connect(lcdFilterComboBox_, SIGNAL(currentIndexChanged(int)),
    
    1059 1059
               SLOT(checkLcdFilter()));
    
    1060 1060
     
    
    1061
    -  connect(autoHintingCheckBox, SIGNAL(clicked()),
    
    1061
    +  connect(autoHintingCheckBox_, SIGNAL(clicked()),
    
    1062 1062
               SLOT(checkAutoHinting()));
    
    1063
    -  connect(showBitmapCheckBox, SIGNAL(clicked()),
    
    1063
    +  connect(showBitmapCheckBox_, SIGNAL(clicked()),
    
    1064 1064
               SLOT(drawGlyph()));
    
    1065
    -  connect(showPointsCheckBox, SIGNAL(clicked()),
    
    1065
    +  connect(showPointsCheckBox_, SIGNAL(clicked()),
    
    1066 1066
               SLOT(checkShowPoints()));
    
    1067
    -  connect(showPointNumbersCheckBox, SIGNAL(clicked()),
    
    1067
    +  connect(showPointNumbersCheckBox_, SIGNAL(clicked()),
    
    1068 1068
               SLOT(drawGlyph()));
    
    1069
    -  connect(showOutlinesCheckBox, SIGNAL(clicked()),
    
    1069
    +  connect(showOutlinesCheckBox_, SIGNAL(clicked()),
    
    1070 1070
               SLOT(drawGlyph()));
    
    1071 1071
     
    
    1072
    -  connect(sizeDoubleSpinBox, SIGNAL(valueChanged(double)),
    
    1072
    +  connect(sizeDoubleSpinBox_, SIGNAL(valueChanged(double)),
    
    1073 1073
               SLOT(drawGlyph()));
    
    1074
    -  connect(unitsComboBox, SIGNAL(currentIndexChanged(int)),
    
    1074
    +  connect(unitsComboBox_, SIGNAL(currentIndexChanged(int)),
    
    1075 1075
               SLOT(checkUnits()));
    
    1076
    -  connect(dpiSpinBox, SIGNAL(valueChanged(int)),
    
    1076
    +  connect(dpiSpinBox_, SIGNAL(valueChanged(int)),
    
    1077 1077
               SLOT(drawGlyph()));
    
    1078 1078
     
    
    1079
    -  connect(zoomSpinBox, SIGNAL(valueChanged(int)),
    
    1079
    +  connect(zoomSpinBox_, SIGNAL(valueChanged(int)),
    
    1080 1080
               SLOT(zoom()));
    
    1081 1081
     
    
    1082
    -  connect(previousFontButton, SIGNAL(clicked()),
    
    1082
    +  connect(previousFontButton_, SIGNAL(clicked()),
    
    1083 1083
               SLOT(previousFont()));
    
    1084
    -  connect(nextFontButton, SIGNAL(clicked()),
    
    1084
    +  connect(nextFontButton_, SIGNAL(clicked()),
    
    1085 1085
               SLOT(nextFont()));
    
    1086
    -  connect(previousFaceButton, SIGNAL(clicked()),
    
    1086
    +  connect(previousFaceButton_, SIGNAL(clicked()),
    
    1087 1087
               SLOT(previousFace()));
    
    1088
    -  connect(nextFaceButton, SIGNAL(clicked()),
    
    1088
    +  connect(nextFaceButton_, SIGNAL(clicked()),
    
    1089 1089
               SLOT(nextFace()));
    
    1090
    -  connect(previousNamedInstanceButton, SIGNAL(clicked()),
    
    1090
    +  connect(previousNamedInstanceButton_, SIGNAL(clicked()),
    
    1091 1091
               SLOT(previousNamedInstance()));
    
    1092
    -  connect(nextNamedInstanceButton, SIGNAL(clicked()),
    
    1092
    +  connect(nextNamedInstanceButton_, SIGNAL(clicked()),
    
    1093 1093
               SLOT(nextNamedInstance()));
    
    1094 1094
     
    
    1095
    -  glyphNavigationMapper = new QSignalMapper;
    
    1096
    -  connect(glyphNavigationMapper, SIGNAL(mapped(int)),
    
    1095
    +  glyphNavigationMapper_ = new QSignalMapper;
    
    1096
    +  connect(glyphNavigationMapper_, SIGNAL(mapped(int)),
    
    1097 1097
               SLOT(adjustGlyphIndex(int)));
    
    1098 1098
     
    
    1099
    -  connect(toStartButtonx, SIGNAL(clicked()),
    
    1100
    -          glyphNavigationMapper, SLOT(map()));
    
    1101
    -  connect(toM1000Buttonx, SIGNAL(clicked()),
    
    1102
    -          glyphNavigationMapper, SLOT(map()));
    
    1103
    -  connect(toM100Buttonx, SIGNAL(clicked()),
    
    1104
    -          glyphNavigationMapper, SLOT(map()));
    
    1105
    -  connect(toM10Buttonx, SIGNAL(clicked()),
    
    1106
    -          glyphNavigationMapper, SLOT(map()));
    
    1107
    -  connect(toM1Buttonx, SIGNAL(clicked()),
    
    1108
    -          glyphNavigationMapper, SLOT(map()));
    
    1109
    -  connect(toP1Buttonx, SIGNAL(clicked()),
    
    1110
    -          glyphNavigationMapper, SLOT(map()));
    
    1111
    -  connect(toP10Buttonx, SIGNAL(clicked()),
    
    1112
    -          glyphNavigationMapper, SLOT(map()));
    
    1113
    -  connect(toP100Buttonx, SIGNAL(clicked()),
    
    1114
    -          glyphNavigationMapper, SLOT(map()));
    
    1115
    -  connect(toP1000Buttonx, SIGNAL(clicked()),
    
    1116
    -          glyphNavigationMapper, SLOT(map()));
    
    1117
    -  connect(toEndButtonx, SIGNAL(clicked()),
    
    1118
    -          glyphNavigationMapper, SLOT(map()));
    
    1119
    -
    
    1120
    -  glyphNavigationMapper->setMapping(toStartButtonx, -0x10000);
    
    1121
    -  glyphNavigationMapper->setMapping(toM1000Buttonx, -1000);
    
    1122
    -  glyphNavigationMapper->setMapping(toM100Buttonx, -100);
    
    1123
    -  glyphNavigationMapper->setMapping(toM10Buttonx, -10);
    
    1124
    -  glyphNavigationMapper->setMapping(toM1Buttonx, -1);
    
    1125
    -  glyphNavigationMapper->setMapping(toP1Buttonx, 1);
    
    1126
    -  glyphNavigationMapper->setMapping(toP10Buttonx, 10);
    
    1127
    -  glyphNavigationMapper->setMapping(toP100Buttonx, 100);
    
    1128
    -  glyphNavigationMapper->setMapping(toP1000Buttonx, 1000);
    
    1129
    -  glyphNavigationMapper->setMapping(toEndButtonx, 0x10000);
    
    1099
    +  connect(toStartButtonx_, SIGNAL(clicked()),
    
    1100
    +          glyphNavigationMapper_, SLOT(map()));
    
    1101
    +  connect(toM1000Buttonx_, SIGNAL(clicked()),
    
    1102
    +          glyphNavigationMapper_, SLOT(map()));
    
    1103
    +  connect(toM100Buttonx_, SIGNAL(clicked()),
    
    1104
    +          glyphNavigationMapper_, SLOT(map()));
    
    1105
    +  connect(toM10Buttonx_, SIGNAL(clicked()),
    
    1106
    +          glyphNavigationMapper_, SLOT(map()));
    
    1107
    +  connect(toM1Buttonx_, SIGNAL(clicked()),
    
    1108
    +          glyphNavigationMapper_, SLOT(map()));
    
    1109
    +  connect(toP1Buttonx_, SIGNAL(clicked()),
    
    1110
    +          glyphNavigationMapper_, SLOT(map()));
    
    1111
    +  connect(toP10Buttonx_, SIGNAL(clicked()),
    
    1112
    +          glyphNavigationMapper_, SLOT(map()));
    
    1113
    +  connect(toP100Buttonx_, SIGNAL(clicked()),
    
    1114
    +          glyphNavigationMapper_, SLOT(map()));
    
    1115
    +  connect(toP1000Buttonx_, SIGNAL(clicked()),
    
    1116
    +          glyphNavigationMapper_, SLOT(map()));
    
    1117
    +  connect(toEndButtonx_, SIGNAL(clicked()),
    
    1118
    +          glyphNavigationMapper_, SLOT(map()));
    
    1119
    +
    
    1120
    +  glyphNavigationMapper_->setMapping(toStartButtonx_, -0x10000);
    
    1121
    +  glyphNavigationMapper_->setMapping(toM1000Buttonx_, -1000);
    
    1122
    +  glyphNavigationMapper_->setMapping(toM100Buttonx_, -100);
    
    1123
    +  glyphNavigationMapper_->setMapping(toM10Buttonx_, -10);
    
    1124
    +  glyphNavigationMapper_->setMapping(toM1Buttonx_, -1);
    
    1125
    +  glyphNavigationMapper_->setMapping(toP1Buttonx_, 1);
    
    1126
    +  glyphNavigationMapper_->setMapping(toP10Buttonx_, 10);
    
    1127
    +  glyphNavigationMapper_->setMapping(toP100Buttonx_, 100);
    
    1128
    +  glyphNavigationMapper_->setMapping(toP1000Buttonx_, 1000);
    
    1129
    +  glyphNavigationMapper_->setMapping(toEndButtonx_, 0x10000);
    
    1130 1130
     }
    
    1131 1131
     
    
    1132 1132
     
    
    1133 1133
     void
    
    1134 1134
     MainGUI::createActions()
    
    1135 1135
     {
    
    1136
    -  loadFontsAct = new QAction(tr("&Load Fonts"), this);
    
    1137
    -  loadFontsAct->setShortcuts(QKeySequence::Open);
    
    1138
    -  connect(loadFontsAct, SIGNAL(triggered()), SLOT(loadFonts()));
    
    1136
    +  loadFontsAct_ = new QAction(tr("&Load Fonts"), this);
    
    1137
    +  loadFontsAct_->setShortcuts(QKeySequence::Open);
    
    1138
    +  connect(loadFontsAct_, SIGNAL(triggered()), SLOT(loadFonts()));
    
    1139 1139
     
    
    1140
    -  closeFontAct = new QAction(tr("&Close Font"), this);
    
    1141
    -  closeFontAct->setShortcuts(QKeySequence::Close);
    
    1142
    -  connect(closeFontAct, SIGNAL(triggered()), SLOT(closeFont()));
    
    1140
    +  closeFontAct_ = new QAction(tr("&Close Font"), this);
    
    1141
    +  closeFontAct_->setShortcuts(QKeySequence::Close);
    
    1142
    +  connect(closeFontAct_, SIGNAL(triggered()), SLOT(closeFont()));
    
    1143 1143
     
    
    1144
    -  exitAct = new QAction(tr("E&xit"), this);
    
    1145
    -  exitAct->setShortcuts(QKeySequence::Quit);
    
    1146
    -  connect(exitAct, SIGNAL(triggered()), SLOT(close()));
    
    1144
    +  exitAct_ = new QAction(tr("E&xit"), this);
    
    1145
    +  exitAct_->setShortcuts(QKeySequence::Quit);
    
    1146
    +  connect(exitAct_, SIGNAL(triggered()), SLOT(close()));
    
    1147 1147
     
    
    1148
    -  aboutAct = new QAction(tr("&About"), this);
    
    1149
    -  connect(aboutAct, SIGNAL(triggered()), SLOT(about()));
    
    1148
    +  aboutAct_ = new QAction(tr("&About"), this);
    
    1149
    +  connect(aboutAct_, SIGNAL(triggered()), SLOT(about()));
    
    1150 1150
     
    
    1151
    -  aboutQtAct = new QAction(tr("About &Qt"), this);
    
    1152
    -  connect(aboutQtAct, SIGNAL(triggered()), SLOT(aboutQt()));
    
    1151
    +  aboutQtAct_ = new QAction(tr("About &Qt"), this);
    
    1152
    +  connect(aboutQtAct_, SIGNAL(triggered()), SLOT(aboutQt()));
    
    1153 1153
     }
    
    1154 1154
     
    
    1155 1155
     
    
    1156 1156
     void
    
    1157 1157
     MainGUI::createMenus()
    
    1158 1158
     {
    
    1159
    -  menuFile = menuBar()->addMenu(tr("&File"));
    
    1160
    -  menuFile->addAction(loadFontsAct);
    
    1161
    -  menuFile->addAction(closeFontAct);
    
    1162
    -  menuFile->addAction(exitAct);
    
    1163
    -
    
    1164
    -  menuHelp = menuBar()->addMenu(tr("&Help"));
    
    1165
    -  menuHelp->addAction(aboutAct);
    
    1166
    -  menuHelp->addAction(aboutQtAct);
    
    1159
    +  menuFile_ = menuBar()->addMenu(tr("&File"));
    
    1160
    +  menuFile_->addAction(loadFontsAct_);
    
    1161
    +  menuFile_->addAction(closeFontAct_);
    
    1162
    +  menuFile_->addAction(exitAct_);
    
    1163
    +
    
    1164
    +  menuHelp_ = menuBar()->addMenu(tr("&Help"));
    
    1165
    +  menuHelp_->addAction(aboutAct_);
    
    1166
    +  menuHelp_->addAction(aboutQtAct_);
    
    1167 1167
     }
    
    1168 1168
     
    
    1169 1169
     
    
    ... ... @@ -1178,22 +1178,22 @@ void
    1178 1178
     MainGUI::setDefaults()
    
    1179 1179
     {
    
    1180 1180
       // set up mappings between property values and combo box indices
    
    1181
    -  hintingModesTrueTypeHash[TT_INTERPRETER_VERSION_35] = HintingMode_TrueType_v35;
    
    1182
    -  hintingModesTrueTypeHash[TT_INTERPRETER_VERSION_38] = HintingMode_TrueType_v38;
    
    1183
    -  hintingModesTrueTypeHash[TT_INTERPRETER_VERSION_40] = HintingMode_TrueType_v40;
    
    1181
    +  hintingModesTrueTypeHash_[TT_INTERPRETER_VERSION_35] = HintingMode_TrueType_v35;
    
    1182
    +  hintingModesTrueTypeHash_[TT_INTERPRETER_VERSION_38] = HintingMode_TrueType_v38;
    
    1183
    +  hintingModesTrueTypeHash_[TT_INTERPRETER_VERSION_40] = HintingMode_TrueType_v40;
    
    1184 1184
     
    
    1185
    -  hintingModesCFFHash[FT_HINTING_FREETYPE] = HintingMode_CFF_FreeType;
    
    1186
    -  hintingModesCFFHash[FT_HINTING_ADOBE] = HintingMode_CFF_Adobe;
    
    1185
    +  hintingModesCFFHash_[FT_HINTING_FREETYPE] = HintingMode_CFF_FreeType;
    
    1186
    +  hintingModesCFFHash_[FT_HINTING_ADOBE] = HintingMode_CFF_Adobe;
    
    1187 1187
     
    
    1188
    -  lcdFilterHash[FT_LCD_FILTER_DEFAULT] = LCDFilter_Default;
    
    1189
    -  lcdFilterHash[FT_LCD_FILTER_LIGHT] = LCDFilter_Light;
    
    1190
    -  lcdFilterHash[FT_LCD_FILTER_NONE] = LCDFilter_None;
    
    1191
    -  lcdFilterHash[FT_LCD_FILTER_LEGACY] = LCDFilter_Legacy;
    
    1188
    +  lcdFilterHash_[FT_LCD_FILTER_DEFAULT] = LCDFilter_Default;
    
    1189
    +  lcdFilterHash_[FT_LCD_FILTER_LIGHT] = LCDFilter_Light;
    
    1190
    +  lcdFilterHash_[FT_LCD_FILTER_NONE] = LCDFilter_None;
    
    1191
    +  lcdFilterHash_[FT_LCD_FILTER_LEGACY] = LCDFilter_Legacy;
    
    1192 1192
     
    
    1193
    -  Engine::EngineDefaultValues& defaults = engine->engineDefaults();
    
    1193
    +  Engine::EngineDefaultValues& defaults = engine_->engineDefaults();
    
    1194 1194
     
    
    1195 1195
       // make copies and remove existing elements...
    
    1196
    -  QHash<int, int> hmTTHash = hintingModesTrueTypeHash;
    
    1196
    +  QHash<int, int> hmTTHash = hintingModesTrueTypeHash_;
    
    1197 1197
       if (hmTTHash.contains(defaults.ttInterpreterVersionDefault))
    
    1198 1198
         hmTTHash.remove(defaults.ttInterpreterVersionDefault);
    
    1199 1199
       if (hmTTHash.contains(defaults.ttInterpreterVersionOther))
    
    ... ... @@ -1201,47 +1201,47 @@ MainGUI::setDefaults()
    1201 1201
       if (hmTTHash.contains(defaults.ttInterpreterVersionOther1))
    
    1202 1202
         hmTTHash.remove(defaults.ttInterpreterVersionOther1);
    
    1203 1203
     
    
    1204
    -  QHash<int, int> hmCFFHash = hintingModesCFFHash;
    
    1204
    +  QHash<int, int> hmCFFHash = hintingModesCFFHash_;
    
    1205 1205
       if (hmCFFHash.contains(defaults.cffHintingEngineDefault))
    
    1206 1206
         hmCFFHash.remove(defaults.cffHintingEngineDefault);
    
    1207 1207
       if (hmCFFHash.contains(defaults.cffHintingEngineOther))
    
    1208 1208
         hmCFFHash.remove(defaults.cffHintingEngineOther);
    
    1209 1209
     
    
    1210 1210
       // ... to construct a list of always disabled hinting mode combo box items
    
    1211
    -  hintingModesAlwaysDisabled = hmTTHash.values();
    
    1212
    -  hintingModesAlwaysDisabled += hmCFFHash.values();
    
    1211
    +  hintingModesAlwaysDisabled_ = hmTTHash.values();
    
    1212
    +  hintingModesAlwaysDisabled_ += hmCFFHash.values();
    
    1213 1213
     
    
    1214
    -  for (int i = 0; i < hintingModesAlwaysDisabled.size(); i++)
    
    1215
    -    hintingModeComboBoxx->setItemEnabled(hintingModesAlwaysDisabled[i],
    
    1214
    +  for (int i = 0; i < hintingModesAlwaysDisabled_.size(); i++)
    
    1215
    +    hintingModeComboBoxx_->setItemEnabled(hintingModesAlwaysDisabled_[i],
    
    1216 1216
                                              false);
    
    1217 1217
     
    
    1218 1218
       // the next four values always non-negative
    
    1219
    -  currentFontIndex = 0;
    
    1220
    -  currentFaceIndex = 0;
    
    1221
    -  currentNamedInstanceIndex = 0;
    
    1222
    -  currentGlyphIndex = 0;
    
    1219
    +  currentFontIndex_ = 0;
    
    1220
    +  currentFaceIndex_ = 0;
    
    1221
    +  currentNamedInstanceIndex_ = 0;
    
    1222
    +  currentGlyphIndex_ = 0;
    
    1223 1223
     
    
    1224
    -  currentCFFHintingMode
    
    1225
    -    = hintingModesCFFHash[defaults.cffHintingEngineDefault];
    
    1226
    -  currentTTInterpreterVersion
    
    1227
    -    = hintingModesTrueTypeHash[defaults.ttInterpreterVersionDefault];
    
    1224
    +  currentCFFHintingMode_
    
    1225
    +    = hintingModesCFFHash_[defaults.cffHintingEngineDefault];
    
    1226
    +  currentTTInterpreterVersion_
    
    1227
    +    = hintingModesTrueTypeHash_[defaults.ttInterpreterVersionDefault];
    
    1228 1228
     
    
    1229
    -  hintingCheckBox->setChecked(true);
    
    1229
    +  hintingCheckBox_->setChecked(true);
    
    1230 1230
     
    
    1231
    -  antiAliasingComboBoxx->setCurrentIndex(Engine::AntiAliasing_Normal);
    
    1232
    -  lcdFilterComboBox->setCurrentIndex(LCDFilter_Light);
    
    1231
    +  antiAliasingComboBoxx_->setCurrentIndex(Engine::AntiAliasing_Normal);
    
    1232
    +  lcdFilterComboBox_->setCurrentIndex(LCDFilter_Light);
    
    1233 1233
     
    
    1234
    -  horizontalHintingCheckBox->setChecked(true);
    
    1235
    -  verticalHintingCheckBox->setChecked(true);
    
    1236
    -  blueZoneHintingCheckBox->setChecked(true);
    
    1234
    +  horizontalHintingCheckBox_->setChecked(true);
    
    1235
    +  verticalHintingCheckBox_->setChecked(true);
    
    1236
    +  blueZoneHintingCheckBox_->setChecked(true);
    
    1237 1237
     
    
    1238
    -  showBitmapCheckBox->setChecked(true);
    
    1239
    -  showOutlinesCheckBox->setChecked(true);
    
    1238
    +  showBitmapCheckBox_->setChecked(true);
    
    1239
    +  showOutlinesCheckBox_->setChecked(true);
    
    1240 1240
     
    
    1241
    -  gammaSlider->setValue(18); // 1.8
    
    1242
    -  sizeDoubleSpinBox->setValue(20);
    
    1243
    -  dpiSpinBox->setValue(96);
    
    1244
    -  zoomSpinBox->setValue(20);
    
    1241
    +  gammaSlider_->setValue(18); // 1.8
    
    1242
    +  sizeDoubleSpinBox_->setValue(20);
    
    1243
    +  dpiSpinBox_->setValue(96);
    
    1244
    +  zoomSpinBox_->setValue(20);
    
    1245 1245
     
    
    1246 1246
       checkHinting();
    
    1247 1247
       checkHintingMode();
    

  • src/ftinspect/maingui.hpp
    ... ... @@ -94,142 +94,142 @@ private slots:
    94 94
       void zoom();
    
    95 95
     
    
    96 96
     private:
    
    97
    -  Engine* engine;
    
    97
    +  Engine* engine_;
    
    98 98
       
    
    99
    -  int currentFontIndex;
    
    99
    +  int currentFontIndex_;
    
    100 100
     
    
    101
    -  long currentNumberOfFaces;
    
    102
    -  long currentFaceIndex;
    
    101
    +  long currentNumberOfFaces_;
    
    102
    +  long currentFaceIndex_;
    
    103 103
     
    
    104
    -  int currentNumberOfNamedInstances;
    
    105
    -  int currentNamedInstanceIndex;
    
    104
    +  int currentNumberOfNamedInstances_;
    
    105
    +  int currentNamedInstanceIndex_;
    
    106 106
     
    
    107
    -  int currentNumberOfGlyphs;
    
    108
    -  int currentGlyphIndex;
    
    107
    +  int currentNumberOfGlyphs_;
    
    108
    +  int currentGlyphIndex_;
    
    109 109
     
    
    110
    -  int currentCFFHintingMode;
    
    111
    -  int currentTTInterpreterVersion;
    
    110
    +  int currentCFFHintingMode_;
    
    111
    +  int currentTTInterpreterVersion_;
    
    112 112
     
    
    113 113
       // layout related stuff
    
    114
    -  GlyphOutline *currentGlyphOutlineItem;
    
    115
    -  GlyphPoints *currentGlyphPointsItem;
    
    116
    -  GlyphPointNumbers *currentGlyphPointNumbersItem;
    
    117
    -  GlyphBitmap *currentGlyphBitmapItem;
    
    118
    -
    
    119
    -  QAction *aboutAct;
    
    120
    -  QAction *aboutQtAct;
    
    121
    -  QAction *closeFontAct;
    
    122
    -  QAction *exitAct;
    
    123
    -  QAction *loadFontsAct;
    
    124
    -
    
    125
    -  QCheckBox *autoHintingCheckBox;
    
    126
    -  QCheckBox *blueZoneHintingCheckBox;
    
    127
    -  QCheckBox *hintingCheckBox;
    
    128
    -  QCheckBox *horizontalHintingCheckBox;
    
    129
    -  QCheckBox *segmentDrawingCheckBox;
    
    130
    -  QCheckBox *showBitmapCheckBox;
    
    131
    -  QCheckBox *showOutlinesCheckBox;
    
    132
    -  QCheckBox *showPointNumbersCheckBox;
    
    133
    -  QCheckBox *showPointsCheckBox;
    
    134
    -  QCheckBox *verticalHintingCheckBox;
    
    135
    -
    
    136
    -  QComboBoxx *antiAliasingComboBoxx;
    
    137
    -  QComboBoxx *hintingModeComboBoxx;
    
    138
    -  QComboBox *lcdFilterComboBox;
    
    139
    -  QComboBox *unitsComboBox;
    
    140
    -
    
    141
    -  QDoubleSpinBox *sizeDoubleSpinBox;
    
    142
    -
    
    143
    -  QGraphicsScene *glyphScene;
    
    144
    -  QGraphicsViewx *glyphView;
    
    114
    +  GlyphOutline *currentGlyphOutlineItem_;
    
    115
    +  GlyphPoints *currentGlyphPointsItem_;
    
    116
    +  GlyphPointNumbers *currentGlyphPointNumbersItem_;
    
    117
    +  GlyphBitmap *currentGlyphBitmapItem_;
    
    118
    +
    
    119
    +  QAction *aboutAct_;
    
    120
    +  QAction *aboutQtAct_;
    
    121
    +  QAction *closeFontAct_;
    
    122
    +  QAction *exitAct_;
    
    123
    +  QAction *loadFontsAct_;
    
    124
    +
    
    125
    +  QCheckBox *autoHintingCheckBox_;
    
    126
    +  QCheckBox *blueZoneHintingCheckBox_;
    
    127
    +  QCheckBox *hintingCheckBox_;
    
    128
    +  QCheckBox *horizontalHintingCheckBox_;
    
    129
    +  QCheckBox *segmentDrawingCheckBox_;
    
    130
    +  QCheckBox *showBitmapCheckBox_;
    
    131
    +  QCheckBox *showOutlinesCheckBox_;
    
    132
    +  QCheckBox *showPointNumbersCheckBox_;
    
    133
    +  QCheckBox *showPointsCheckBox_;
    
    134
    +  QCheckBox *verticalHintingCheckBox_;
    
    135
    +
    
    136
    +  QComboBoxx *antiAliasingComboBoxx_;
    
    137
    +  QComboBoxx *hintingModeComboBoxx_;
    
    138
    +  QComboBox *lcdFilterComboBox_;
    
    139
    +  QComboBox *unitsComboBox_;
    
    140
    +
    
    141
    +  QDoubleSpinBox *sizeDoubleSpinBox_;
    
    142
    +
    
    143
    +  QGraphicsScene *glyphScene_;
    
    144
    +  QGraphicsViewx *glyphView_;
    
    145 145
     
    
    146 146
       QGridLayout *fontLayout;
    
    147 147
       QGridLayout *infoRightLayout;
    
    148 148
     
    
    149
    -  QHash<int, int> hintingModesTrueTypeHash;
    
    150
    -  QHash<int, int> hintingModesCFFHash;
    
    151
    -  QHash<FT_LcdFilter, int> lcdFilterHash;
    
    152
    -
    
    153
    -  QHBoxLayout *antiAliasingLayout;
    
    154
    -  QHBoxLayout *blueZoneHintingLayout;
    
    155
    -  QHBoxLayout *ftinspectLayout;
    
    156
    -  QHBoxLayout *gammaLayout;
    
    157
    -  QHBoxLayout *hintingModeLayout;
    
    158
    -  QHBoxLayout *horizontalHintingLayout;
    
    159
    -  QHBoxLayout *infoLeftLayout;
    
    160
    -  QHBoxLayout *lcdFilterLayout;
    
    161
    -  QHBoxLayout *navigationLayout;
    
    162
    -  QHBoxLayout *pointNumbersLayout;
    
    163
    -  QHBoxLayout *segmentDrawingLayout;
    
    164
    -  QHBoxLayout *sizeLayout;
    
    165
    -  QHBoxLayout *verticalHintingLayout;
    
    166
    -
    
    167
    -  QLabel *antiAliasingLabel;
    
    168
    -  QLabel *dpiLabel;
    
    169
    -  QLabel *fontFilenameLabel;
    
    170
    -  QLabel *fontNameLabel;
    
    171
    -  QLabel *gammaLabel;
    
    172
    -  QLabel *glyphIndexLabel;
    
    173
    -  QLabel *glyphNameLabel;
    
    174
    -  QLabel *hintingModeLabel;
    
    175
    -  QLabel *lcdFilterLabel;
    
    176
    -  QLabel *sizeLabel;
    
    177
    -  QLabel *zoomLabel;
    
    178
    -
    
    179
    -  QList<int> hintingModesAlwaysDisabled;
    
    180
    -
    
    181
    -  QLocale *locale;
    
    182
    -
    
    183
    -  QMenu *menuFile;
    
    184
    -  QMenu *menuHelp;
    
    185
    -
    
    186
    -  QPen axisPen;
    
    187
    -  QPen blueZonePen;
    
    188
    -  QPen gridPen;
    
    189
    -  QPen offPen;
    
    190
    -  QPen onPen;
    
    191
    -  QPen outlinePen;
    
    192
    -  QPen segmentPen;
    
    193
    -
    
    194
    -  QPushButton *nextFaceButton;
    
    195
    -  QPushButton *nextFontButton;
    
    196
    -  QPushButton *nextNamedInstanceButton;
    
    197
    -  QPushButton *previousFaceButton;
    
    198
    -  QPushButton *previousFontButton;
    
    199
    -  QPushButton *previousNamedInstanceButton;
    
    200
    -
    
    201
    -  QPushButtonx *toEndButtonx;
    
    202
    -  QPushButtonx *toM1000Buttonx;
    
    203
    -  QPushButtonx *toM100Buttonx;
    
    204
    -  QPushButtonx *toM10Buttonx;
    
    205
    -  QPushButtonx *toM1Buttonx;
    
    206
    -  QPushButtonx *toP1000Buttonx;
    
    207
    -  QPushButtonx *toP100Buttonx;
    
    208
    -  QPushButtonx *toP10Buttonx;
    
    209
    -  QPushButtonx *toP1Buttonx;
    
    210
    -  QPushButtonx *toStartButtonx;
    
    211
    -
    
    212
    -  QSignalMapper *glyphNavigationMapper;
    
    213
    -
    
    214
    -  QSlider *gammaSlider;
    
    215
    -
    
    216
    -  QSpinBox *dpiSpinBox;
    
    217
    -  QSpinBoxx *zoomSpinBox;
    
    218
    -
    
    219
    -  QTabWidget *tabWidget;
    
    220
    -
    
    221
    -  QVBoxLayout *generalTabLayout;
    
    222
    -  QVBoxLayout *leftLayout;
    
    223
    -  QVBoxLayout *rightLayout;
    
    224
    -
    
    225
    -  QVector<QRgb> grayColorTable;
    
    226
    -  QVector<QRgb> monoColorTable;
    
    227
    -
    
    228
    -  QWidget *ftinspectWidget;
    
    229
    -  QWidget *generalTabWidget;
    
    230
    -  QWidget *leftWidget;
    
    231
    -  QWidget *rightWidget;
    
    232
    -  QWidget *mmgxTabWidget;
    
    149
    +  QHash<int, int> hintingModesTrueTypeHash_;
    
    150
    +  QHash<int, int> hintingModesCFFHash_;
    
    151
    +  QHash<FT_LcdFilter, int> lcdFilterHash_;
    
    152
    +
    
    153
    +  QHBoxLayout *antiAliasingLayout_;
    
    154
    +  QHBoxLayout *blueZoneHintingLayout_;
    
    155
    +  QHBoxLayout *ftinspectLayout_;
    
    156
    +  QHBoxLayout *gammaLayout_;
    
    157
    +  QHBoxLayout *hintingModeLayout_;
    
    158
    +  QHBoxLayout *horizontalHintingLayout_;
    
    159
    +  QHBoxLayout *infoLeftLayout_;
    
    160
    +  QHBoxLayout *lcdFilterLayout_;
    
    161
    +  QHBoxLayout *navigationLayout_;
    
    162
    +  QHBoxLayout *pointNumbersLayout_;
    
    163
    +  QHBoxLayout *segmentDrawingLayout_;
    
    164
    +  QHBoxLayout *sizeLayout_;
    
    165
    +  QHBoxLayout *verticalHintingLayout_;
    
    166
    +
    
    167
    +  QLabel *antiAliasingLabel_;
    
    168
    +  QLabel *dpiLabel_;
    
    169
    +  QLabel *fontFilenameLabel_;
    
    170
    +  QLabel *fontNameLabel_;
    
    171
    +  QLabel *gammaLabel_;
    
    172
    +  QLabel *glyphIndexLabel_;
    
    173
    +  QLabel *glyphNameLabel_;
    
    174
    +  QLabel *hintingModeLabel_;
    
    175
    +  QLabel *lcdFilterLabel_;
    
    176
    +  QLabel *sizeLabel_;
    
    177
    +  QLabel *zoomLabel_;
    
    178
    +
    
    179
    +  QList<int> hintingModesAlwaysDisabled_;
    
    180
    +
    
    181
    +  QLocale *locale_;
    
    182
    +
    
    183
    +  QMenu *menuFile_;
    
    184
    +  QMenu *menuHelp_;
    
    185
    +
    
    186
    +  QPen axisPen_;
    
    187
    +  QPen blueZonePen_;
    
    188
    +  QPen gridPen_;
    
    189
    +  QPen offPen_;
    
    190
    +  QPen onPen_;
    
    191
    +  QPen outlinePen_;
    
    192
    +  QPen segmentPen_;
    
    193
    +
    
    194
    +  QPushButton *nextFaceButton_;
    
    195
    +  QPushButton *nextFontButton_;
    
    196
    +  QPushButton *nextNamedInstanceButton_;
    
    197
    +  QPushButton *previousFaceButton_;
    
    198
    +  QPushButton *previousFontButton_;
    
    199
    +  QPushButton *previousNamedInstanceButton_;
    
    200
    +
    
    201
    +  QPushButtonx *toEndButtonx_;
    
    202
    +  QPushButtonx *toM1000Buttonx_;
    
    203
    +  QPushButtonx *toM100Buttonx_;
    
    204
    +  QPushButtonx *toM10Buttonx_;
    
    205
    +  QPushButtonx *toM1Buttonx_;
    
    206
    +  QPushButtonx *toP1000Buttonx_;
    
    207
    +  QPushButtonx *toP100Buttonx_;
    
    208
    +  QPushButtonx *toP10Buttonx_;
    
    209
    +  QPushButtonx *toP1Buttonx_;
    
    210
    +  QPushButtonx *toStartButtonx_;
    
    211
    +
    
    212
    +  QSignalMapper *glyphNavigationMapper_;
    
    213
    +
    
    214
    +  QSlider *gammaSlider_;
    
    215
    +
    
    216
    +  QSpinBox *dpiSpinBox_;
    
    217
    +  QSpinBoxx *zoomSpinBox_;
    
    218
    +
    
    219
    +  QTabWidget *tabWidget_;
    
    220
    +
    
    221
    +  QVBoxLayout *generalTabLayout_;
    
    222
    +  QVBoxLayout *leftLayout_;
    
    223
    +  QVBoxLayout *rightLayout_;
    
    224
    +
    
    225
    +  QVector<QRgb> grayColorTable_;
    
    226
    +  QVector<QRgb> monoColorTable_;
    
    227
    +
    
    228
    +  QWidget *ftinspectWidget_;
    
    229
    +  QWidget *generalTabWidget_;
    
    230
    +  QWidget *leftWidget_;
    
    231
    +  QWidget *rightWidget_;
    
    232
    +  QWidget *mmgxTabWidget_;
    
    233 233
       
    
    234 234
       enum HintingMode
    
    235 235
       {
    

  • src/ftinspect/rendering/glyphbitmap.cpp
    ... ... @@ -15,17 +15,17 @@ GlyphBitmap::GlyphBitmap(FT_Outline* outline,
    15 15
                              FT_Pixel_Mode pxlMode,
    
    16 16
                              const QVector<QRgb>& monoColorTbl,
    
    17 17
                              const QVector<QRgb>& grayColorTbl)
    
    18
    -: library(lib),
    
    19
    -  pixelMode(pxlMode),
    
    20
    -  monoColorTable(monoColorTbl),
    
    21
    -  grayColorTable(grayColorTbl)
    
    18
    +: library_(lib),
    
    19
    +  pixelMode_(pxlMode),
    
    20
    +  monoColorTable_(monoColorTbl),
    
    21
    +  grayColorTable_(grayColorTbl)
    
    22 22
     {
    
    23 23
       // make a copy of the outline since we are going to manipulate it
    
    24
    -  FT_Outline_New(library,
    
    24
    +  FT_Outline_New(library_,
    
    25 25
                      static_cast<unsigned int>(outline->n_points),
    
    26 26
                      outline->n_contours,
    
    27
    -                 &transformed);
    
    28
    -  FT_Outline_Copy(outline, &transformed);
    
    27
    +                 &transformed_);
    
    28
    +  FT_Outline_Copy(outline, &transformed_);
    
    29 29
     
    
    30 30
       FT_BBox cbox;
    
    31 31
       FT_Outline_Get_CBox(outline, &cbox);
    
    ... ... @@ -36,22 +36,22 @@ GlyphBitmap::GlyphBitmap(FT_Outline* outline,
    36 36
       cbox.yMax = (cbox.yMax + 63) & ~63;
    
    37 37
     
    
    38 38
       // we shift the outline to the origin for rendering later on
    
    39
    -  FT_Outline_Translate(&transformed, -cbox.xMin, -cbox.yMin);
    
    39
    +  FT_Outline_Translate(&transformed_, -cbox.xMin, -cbox.yMin);
    
    40 40
     
    
    41
    -  bRect.setCoords(cbox.xMin / 64, -cbox.yMax / 64,
    
    41
    +  boundingRect_.setCoords(cbox.xMin / 64, -cbox.yMax / 64,
    
    42 42
                       cbox.xMax / 64, -cbox.yMin / 64);
    
    43 43
     }
    
    44 44
     
    
    45 45
     
    
    46 46
     GlyphBitmap::~GlyphBitmap()
    
    47 47
     {
    
    48
    -  FT_Outline_Done(library, &transformed);
    
    48
    +  FT_Outline_Done(library_, &transformed_);
    
    49 49
     }
    
    50 50
     
    
    51 51
     QRectF
    
    52 52
     GlyphBitmap::boundingRect() const
    
    53 53
     {
    
    54
    -  return bRect;
    
    54
    +  return boundingRect_;
    
    55 55
     }
    
    56 56
     
    
    57 57
     
    
    ... ... @@ -62,20 +62,20 @@ GlyphBitmap::paint(QPainter* painter,
    62 62
     {
    
    63 63
       FT_Bitmap bitmap;
    
    64 64
     
    
    65
    -  int height = static_cast<int>(ceil(bRect.height()));
    
    66
    -  int width = static_cast<int>(ceil(bRect.width()));
    
    65
    +  int height = static_cast<int>(ceil(boundingRect_.height()));
    
    66
    +  int width = static_cast<int>(ceil(boundingRect_.width()));
    
    67 67
       QImage::Format format = QImage::Format_Indexed8;
    
    68 68
     
    
    69 69
       // XXX cover LCD and color
    
    70
    -  if (pixelMode == FT_PIXEL_MODE_MONO)
    
    70
    +  if (pixelMode_ == FT_PIXEL_MODE_MONO)
    
    71 71
         format = QImage::Format_Mono;
    
    72 72
     
    
    73 73
       QImage image(QSize(width, height), format);
    
    74 74
     
    
    75
    -  if (pixelMode == FT_PIXEL_MODE_MONO)
    
    76
    -    image.setColorTable(monoColorTable);
    
    75
    +  if (pixelMode_ == FT_PIXEL_MODE_MONO)
    
    76
    +    image.setColorTable(monoColorTable_);
    
    77 77
       else
    
    78
    -    image.setColorTable(grayColorTable);
    
    78
    +    image.setColorTable(grayColorTable_);
    
    79 79
     
    
    80 80
       image.fill(0);
    
    81 81
     
    
    ... ... @@ -83,10 +83,10 @@ GlyphBitmap::paint(QPainter* painter,
    83 83
       bitmap.width = static_cast<unsigned int>(width);
    
    84 84
       bitmap.buffer = image.bits();
    
    85 85
       bitmap.pitch = image.bytesPerLine();
    
    86
    -  bitmap.pixel_mode = pixelMode;
    
    86
    +  bitmap.pixel_mode = pixelMode_;
    
    87 87
     
    
    88
    -  FT_Error error = FT_Outline_Get_Bitmap(library,
    
    89
    -                                         &transformed,
    
    88
    +  FT_Error error = FT_Outline_Get_Bitmap(library_,
    
    89
    +                                         &transformed_,
    
    90 90
                                              &bitmap);
    
    91 91
       if (error)
    
    92 92
       {
    
    ... ... @@ -112,8 +112,8 @@ GlyphBitmap::paint(QPainter* painter,
    112 112
         {
    
    113 113
           // be careful not to lose the alpha channel
    
    114 114
           QRgb p = image.pixel(x, y);
    
    115
    -      painter->fillRect(QRectF(x + bRect.left() - 1 / lod / 2,
    
    116
    -                               y + bRect.top() - 1 / lod / 2,
    
    115
    +      painter->fillRect(QRectF(x + boundingRect_.left() - 1 / lod / 2,
    
    116
    +                               y + boundingRect_.top() - 1 / lod / 2,
    
    117 117
                                    1 + 1 / lod,
    
    118 118
                                    1 + 1 / lod),
    
    119 119
                             QColor(qRed(p),
    

  • src/ftinspect/rendering/glyphbitmap.hpp
    ... ... @@ -29,12 +29,12 @@ public:
    29 29
                  QWidget* widget);
    
    30 30
     
    
    31 31
     private:
    
    32
    -  FT_Outline transformed;
    
    33
    -  FT_Library library;
    
    34
    -  unsigned char pixelMode;
    
    35
    -  const QVector<QRgb>& monoColorTable;
    
    36
    -  const QVector<QRgb>& grayColorTable;
    
    37
    -  QRectF bRect;
    
    32
    +  FT_Outline transformed_;
    
    33
    +  FT_Library library_;
    
    34
    +  unsigned char pixelMode_;
    
    35
    +  const QVector<QRgb>& monoColorTable_;
    
    36
    +  const QVector<QRgb>& grayColorTable_;
    
    37
    +  QRectF boundingRect_;
    
    38 38
     };
    
    39 39
     
    
    40 40
     
    

  • src/ftinspect/rendering/glyphoutline.cpp
    ... ... @@ -89,16 +89,16 @@ static FT_Outline_Funcs outlineFuncs =
    89 89
     
    
    90 90
     GlyphOutline::GlyphOutline(const QPen& outlineP,
    
    91 91
                                FT_Outline* outln)
    
    92
    -: outlinePen(outlineP),
    
    93
    -  outline(outln)
    
    92
    +: outlinePen_(outlineP),
    
    93
    +  outline_(outln)
    
    94 94
     {
    
    95 95
       FT_BBox cbox;
    
    96 96
     
    
    97
    -  qreal halfPenWidth = outlinePen.widthF();
    
    97
    +  qreal halfPenWidth = outlinePen_.widthF();
    
    98 98
     
    
    99
    -  FT_Outline_Get_CBox(outline, &cbox);
    
    99
    +  FT_Outline_Get_CBox(outline_, &cbox);
    
    100 100
     
    
    101
    -  bRect.setCoords(qreal(cbox.xMin) / 64 - halfPenWidth,
    
    101
    +  boundingRect_.setCoords(qreal(cbox.xMin) / 64 - halfPenWidth,
    
    102 102
                       -qreal(cbox.yMax) / 64 - halfPenWidth,
    
    103 103
                       qreal(cbox.xMax) / 64 + halfPenWidth,
    
    104 104
                       -qreal(cbox.yMin) / 64 + halfPenWidth);
    
    ... ... @@ -108,7 +108,7 @@ GlyphOutline::GlyphOutline(const QPen& outlineP,
    108 108
     QRectF
    
    109 109
     GlyphOutline::boundingRect() const
    
    110 110
     {
    
    111
    -  return bRect;
    
    111
    +  return boundingRect_;
    
    112 112
     }
    
    113 113
     
    
    114 114
     
    
    ... ... @@ -117,10 +117,10 @@ GlyphOutline::paint(QPainter* painter,
    117 117
                         const QStyleOptionGraphicsItem*,
    
    118 118
                         QWidget*)
    
    119 119
     {
    
    120
    -  painter->setPen(outlinePen);
    
    120
    +  painter->setPen(outlinePen_);
    
    121 121
     
    
    122 122
       QPainterPath path;
    
    123
    -  FT_Outline_Decompose(outline, &outlineFuncs, &path);
    
    123
    +  FT_Outline_Decompose(outline_, &outlineFuncs, &path);
    
    124 124
     
    
    125 125
       painter->drawPath(path);
    
    126 126
     }
    

  • src/ftinspect/rendering/glyphoutline.hpp
    ... ... @@ -25,9 +25,9 @@ public:
    25 25
                  QWidget* widget);
    
    26 26
     
    
    27 27
     private:
    
    28
    -  QPen outlinePen;
    
    29
    -  FT_Outline* outline;
    
    30
    -  QRectF bRect;
    
    28
    +  QPen outlinePen_;
    
    29
    +  FT_Outline* outline_;
    
    30
    +  QRectF boundingRect_;
    
    31 31
     };
    
    32 32
     
    
    33 33
     
    

  • src/ftinspect/rendering/glyphpointnumbers.cpp
    ... ... @@ -13,16 +13,16 @@
    13 13
     GlyphPointNumbers::GlyphPointNumbers(const QPen& onP,
    
    14 14
                                          const QPen& offP,
    
    15 15
                                          FT_Outline* outln)
    
    16
    -: onPen(onP),
    
    17
    -  offPen(offP),
    
    18
    -  outline(outln)
    
    16
    +: onPen_(onP),
    
    17
    +  offPen_(offP),
    
    18
    +  outline_(outln)
    
    19 19
     {
    
    20 20
       FT_BBox cbox;
    
    21 21
     
    
    22
    -  FT_Outline_Get_CBox(outline, &cbox);
    
    22
    +  FT_Outline_Get_CBox(outline_, &cbox);
    
    23 23
     
    
    24 24
       // XXX fix bRect size
    
    25
    -  bRect.setCoords(qreal(cbox.xMin) / 64,
    
    25
    +  boundingRect_.setCoords(qreal(cbox.xMin) / 64,
    
    26 26
                       -qreal(cbox.yMax) / 64,
    
    27 27
                       qreal(cbox.xMax) / 64,
    
    28 28
                       -qreal(cbox.yMin) / 64);
    
    ... ... @@ -32,7 +32,7 @@ GlyphPointNumbers::GlyphPointNumbers(const QPen& onP,
    32 32
     QRectF
    
    33 33
     GlyphPointNumbers::boundingRect() const
    
    34 34
     {
    
    35
    -  return bRect;
    
    35
    +  return boundingRect_;
    
    36 36
     }
    
    37 37
     
    
    38 38
     
    
    ... ... @@ -60,15 +60,15 @@ GlyphPointNumbers::paint(QPainter* painter,
    60 60
         font.setPointSizeF(font.pointSizeF() * 3 / 4);
    
    61 61
         painter->setFont(font);
    
    62 62
     
    
    63
    -    QBrush onBrush(onPen.color());
    
    64
    -    QBrush offBrush(offPen.color());
    
    63
    +    QBrush onBrush(onPen_.color());
    
    64
    +    QBrush offBrush(offPen_.color());
    
    65 65
     
    
    66 66
         painter->scale(1 / lod, 1 / lod);
    
    67 67
     #endif
    
    68 68
     
    
    69
    -    FT_Vector* points = outline->points;
    
    70
    -    FT_Short* contours = outline->contours;
    
    71
    -    char* tags = outline->tags;
    
    69
    +    FT_Vector* points = outline_->points;
    
    70
    +    FT_Short* contours = outline_->contours;
    
    71
    +    char* tags = outline_->tags;
    
    72 72
     
    
    73 73
         QVector2D octants[8] = { QVector2D(1, 0),
    
    74 74
                                  QVector2D(0.707f, -0.707f),
    
    ... ... @@ -81,7 +81,7 @@ GlyphPointNumbers::paint(QPainter* painter,
    81 81
     
    
    82 82
     
    
    83 83
         short ptIdx = 0;
    
    84
    -    for (int contIdx = 0; contIdx < outline->n_contours; contIdx++ )
    
    84
    +    for (int contIdx = 0; contIdx < outline_->n_contours; contIdx++ )
    
    85 85
         {
    
    86 86
           for (;;)
    
    87 87
           {
    

  • src/ftinspect/rendering/glyphpointnumbers.hpp
    ... ... @@ -26,10 +26,10 @@ public:
    26 26
                  QWidget* widget);
    
    27 27
     
    
    28 28
     private:
    
    29
    -  QPen onPen;
    
    30
    -  QPen offPen;
    
    31
    -  FT_Outline* outline;
    
    32
    -  QRectF bRect;
    
    29
    +  QPen onPen_;
    
    30
    +  QPen offPen_;
    
    31
    +  FT_Outline* outline_;
    
    32
    +  QRectF boundingRect_;
    
    33 33
     };
    
    34 34
     
    
    35 35
     
    

  • src/ftinspect/rendering/glyphpoints.cpp
    ... ... @@ -12,17 +12,17 @@
    12 12
     GlyphPoints::GlyphPoints(const QPen& onP,
    
    13 13
                              const QPen& offP,
    
    14 14
                              FT_Outline* outln)
    
    15
    -: onPen(onP),
    
    16
    -  offPen(offP),
    
    17
    -  outline(outln)
    
    15
    +: onPen_(onP),
    
    16
    +  offPen_(offP),
    
    17
    +  outline_(outln)
    
    18 18
     {
    
    19 19
       FT_BBox cbox;
    
    20 20
     
    
    21
    -  qreal halfPenWidth = qMax(onPen.widthF(), offPen.widthF()) / 2;
    
    21
    +  qreal halfPenWidth = qMax(onPen_.widthF(), offPen_.widthF()) / 2;
    
    22 22
     
    
    23
    -  FT_Outline_Get_CBox(outline, &cbox);
    
    23
    +  FT_Outline_Get_CBox(outline_, &cbox);
    
    24 24
     
    
    25
    -  bRect.setCoords(qreal(cbox.xMin) / 64 - halfPenWidth,
    
    25
    +  boundingRect_.setCoords(qreal(cbox.xMin) / 64 - halfPenWidth,
    
    26 26
                       -qreal(cbox.yMax) / 64 - halfPenWidth,
    
    27 27
                       qreal(cbox.xMax) / 64 + halfPenWidth,
    
    28 28
                       -qreal(cbox.yMin) / 64 + halfPenWidth);
    
    ... ... @@ -32,7 +32,7 @@ GlyphPoints::GlyphPoints(const QPen& onP,
    32 32
     QRectF
    
    33 33
     GlyphPoints::boundingRect() const
    
    34 34
     {
    
    35
    -  return bRect;
    
    35
    +  return boundingRect_;
    
    36 36
     }
    
    37 37
     
    
    38 38
     
    
    ... ... @@ -73,29 +73,29 @@ GlyphPoints::paint(QPainter* painter,
    73 73
         onPen.setWidthF(origOnPenWidth);
    
    74 74
         offPen.setWidthF(origOffPenWidth);
    
    75 75
     #else
    
    76
    -    QBrush onBrush(onPen.color());
    
    77
    -    QBrush offBrush(offPen.color());
    
    76
    +    QBrush onBrush(onPen_.color());
    
    77
    +    QBrush offBrush(offPen_.color());
    
    78 78
     
    
    79 79
         painter->setPen(Qt::NoPen);
    
    80 80
     
    
    81
    -    qreal onRadius = onPen.widthF() / lod;
    
    82
    -    qreal offRadius = offPen.widthF() / lod;
    
    81
    +    qreal onRadius = onPen_.widthF() / lod;
    
    82
    +    qreal offRadius = offPen_.widthF() / lod;
    
    83 83
     
    
    84
    -    for (int i = 0; i < outline->n_points; i++)
    
    84
    +    for (int i = 0; i < outline_->n_points; i++)
    
    85 85
         {
    
    86
    -      if (outline->tags[i] & FT_CURVE_TAG_ON)
    
    86
    +      if (outline_->tags[i] & FT_CURVE_TAG_ON)
    
    87 87
           {
    
    88 88
             painter->setBrush(onBrush);
    
    89
    -        painter->drawEllipse(QPointF(qreal(outline->points[i].x) / 64,
    
    90
    -                                     -qreal(outline->points[i].y) / 64),
    
    89
    +        painter->drawEllipse(QPointF(qreal(outline_->points[i].x) / 64,
    
    90
    +                                     -qreal(outline_->points[i].y) / 64),
    
    91 91
                                  onRadius,
    
    92 92
                                  onRadius);
    
    93 93
           }
    
    94 94
           else
    
    95 95
           {
    
    96 96
             painter->setBrush(offBrush);
    
    97
    -        painter->drawEllipse(QPointF(qreal(outline->points[i].x) / 64,
    
    98
    -                                     -qreal(outline->points[i].y) / 64),
    
    97
    +        painter->drawEllipse(QPointF(qreal(outline_->points[i].x) / 64,
    
    98
    +                                     -qreal(outline_->points[i].y) / 64),
    
    99 99
                                  offRadius,
    
    100 100
                                  offRadius);
    
    101 101
           }
    

  • src/ftinspect/rendering/glyphpoints.hpp
    ... ... @@ -26,10 +26,10 @@ public:
    26 26
                  QWidget* widget);
    
    27 27
     
    
    28 28
     private:
    
    29
    -  QPen onPen;
    
    30
    -  QPen offPen;
    
    31
    -  FT_Outline* outline;
    
    32
    -  QRectF bRect;
    
    29
    +  QPen onPen_;
    
    30
    +  QPen offPen_;
    
    31
    +  FT_Outline* outline_;
    
    32
    +  QRectF boundingRect_;
    
    33 33
     };
    
    34 34
     
    
    35 35
     
    

  • src/ftinspect/rendering/grid.cpp
    ... ... @@ -11,8 +11,8 @@
    11 11
     
    
    12 12
     Grid::Grid(const QPen& gridP,
    
    13 13
                const QPen& axisP)
    
    14
    -: gridPen(gridP),
    
    15
    -  axisPen(axisP)
    
    14
    +: gridPen_(gridP),
    
    15
    +  axisPen_(axisP)
    
    16 16
     {
    
    17 17
      // empty
    
    18 18
     }
    
    ... ... @@ -40,7 +40,7 @@ Grid::paint(QPainter* painter,
    40 40
       const qreal lod = option->levelOfDetailFromTransform(
    
    41 41
                                   painter->worldTransform());
    
    42 42
     
    
    43
    -  painter->setPen(gridPen);
    
    43
    +  painter->setPen(gridPen_);
    
    44 44
     
    
    45 45
       // don't mark pixel center with a cross if magnification is too small
    
    46 46
       if (lod > 20)
    
    ... ... @@ -81,7 +81,7 @@ Grid::paint(QPainter* painter,
    81 81
                             100, y);
    
    82 82
       }
    
    83 83
     
    
    84
    -  painter->setPen(axisPen);
    
    84
    +  painter->setPen(axisPen_);
    
    85 85
     
    
    86 86
       painter->drawLine(0, -100,
    
    87 87
                         0, 100);
    

  • src/ftinspect/rendering/grid.hpp
    ... ... @@ -21,8 +21,8 @@ public:
    21 21
                  QWidget* widget);
    
    22 22
     
    
    23 23
     private:
    
    24
    -  QPen gridPen;
    
    25
    -  QPen axisPen;
    
    24
    +  QPen gridPen_;
    
    25
    +  QPen axisPen_;
    
    26 26
     };
    
    27 27
     
    
    28 28
     
    

  • src/ftinspect/widgets/qgraphicsviewx.cpp
    ... ... @@ -9,7 +9,7 @@
    9 9
     
    
    10 10
     
    
    11 11
     QGraphicsViewx::QGraphicsViewx()
    
    12
    -: lastBottomLeftPointInitialized(false)
    
    12
    +: lastBottomLeftPointInitialized_(false)
    
    13 13
     {
    
    14 14
       // empty
    
    15 15
     }
    
    ... ... @@ -20,7 +20,7 @@ QGraphicsViewx::scrollContentsBy(int dx,
    20 20
                                      int dy)
    
    21 21
     {
    
    22 22
       QGraphicsView::scrollContentsBy(dx, dy);
    
    23
    -  lastBottomLeftPoint = viewport()->rect().bottomLeft();
    
    23
    +  lastBottomLeftPoint_ = viewport()->rect().bottomLeft();
    
    24 24
     }
    
    25 25
     
    
    26 26
     
    
    ... ... @@ -31,10 +31,10 @@ QGraphicsViewx::resizeEvent(QResizeEvent* event)
    31 31
     
    
    32 32
       // XXX I don't know how to properly initialize this value,
    
    33 33
       //     thus the hack with the boolean
    
    34
    -  if (!lastBottomLeftPointInitialized)
    
    34
    +  if (!lastBottomLeftPointInitialized_)
    
    35 35
       {
    
    36
    -    lastBottomLeftPoint = viewport()->rect().bottomLeft();
    
    37
    -    lastBottomLeftPointInitialized = true;
    
    36
    +    lastBottomLeftPoint_ = viewport()->rect().bottomLeft();
    
    37
    +    lastBottomLeftPointInitialized_ = true;
    
    38 38
       }
    
    39 39
     
    
    40 40
       QPointF currentBottomLeftPoint = viewport()->rect().bottomLeft();
    
    ... ... @@ -42,7 +42,7 @@ QGraphicsViewx::resizeEvent(QResizeEvent* event)
    42 42
       verticalScrollBar()->setValue(static_cast<int>(
    
    43 43
                                       verticalPosition
    
    44 44
                                       - (currentBottomLeftPoint.y()
    
    45
    -                                     - lastBottomLeftPoint.y())));
    
    45
    +                                     - lastBottomLeftPoint_.y())));
    
    46 46
     }
    
    47 47
     
    
    48 48
     
    

  • src/ftinspect/widgets/qgraphicsviewx.hpp
    ... ... @@ -24,8 +24,8 @@ protected:
    24 24
                             int dy);
    
    25 25
     
    
    26 26
     private:
    
    27
    -  QPointF lastBottomLeftPoint;
    
    28
    -  bool lastBottomLeftPointInitialized;
    
    27
    +  QPointF lastBottomLeftPoint_;
    
    28
    +  bool lastBottomLeftPointInitialized_;
    
    29 29
     };
    
    30 30
     
    
    31 31
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]