Skip to content

Commit

Permalink
corgeron
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Apr 18, 2022
1 parent 24055fa commit 35b05f3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h2 id="Interpretation"><a href="#Top">Interprétation automatique</a></h2>
Vous n'avez pas à entrer les notes. Entrez uniquement les touches de l'accordéon. Ainsi même sans connaître la musique
vous pouvez écrire des tablatures. Lisez la page sur la <a href="doc.html">syntaxe d'écriture de tablatures</a>.

<h2 id="Transposition"><a href="#Top">Transposition du système CADB et Cogeron</a></h2>
<h2 id="Transposition"><a href="#Top">Transposition du système CADB et Corgeron</a></h2>

<p>Écrivez la musique une seule fois et exportez la tablature dans votre système préféré.
Vous écrivez les numéros des boutons et le logiciel se charge de convertir soit
dans le système CADB soit dans le système Cogeron au choix.</p>
dans le système CADB soit dans le système Corgeron au choix.</p>

<p class="center"><img src="img/feature-systeme.png" alt="Screenshots"></p>

Expand Down
26 changes: 18 additions & 8 deletions src/pdfviewer.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ void PdfViewer::init_links()
// Check each link to determine whether or not we record it
for (int j = 0 ; j < all_links.size() ; j++)
{
Poppler::Link* link = all_links.at(j);
ClickableNote lk(link, i);

// Keep only non null area links
if (all_links.at(j)->linkArea().width() > 0.0001)
if (link->linkArea().width() > 0.0001)
{
Poppler::Link* link = all_links.at(j);
ClickableNote lk(link, i);

// We keep a single link per row/colum in the code
QPair<int, int> p(lk.code_line(), lk.code_column());
if (!registry.contains(p))
Expand Down Expand Up @@ -346,11 +346,21 @@ ClickableNote::ClickableNote(Poppler::Link* link, int page)
QStringList parsed_url = url.split(":");
QRectF link_bbox = link->linkArea();

if (parsed_url.size() > 2)
m_line = parsed_url.at(2).toInt();
#ifdef Q_OS_WINDOWS
int lineidx = 3;
int columnidx = 4;
#endif

#ifdef Q_OS_LINUX
int lineidx = 2;
int columnidx = 3;
#endif

if (parsed_url.size() > lineidx)
m_line = parsed_url.at(lineidx).toInt();

if (parsed_url.size() > 3)
m_column = parsed_url.at(3).toInt();
if (parsed_url.size() > columnidx)
m_column = parsed_url.at(columnidx).toInt();

// Buffer the bbox for better feeling
QPointF p1 = link_bbox.topLeft();
Expand Down

0 comments on commit 35b05f3

Please sign in to comment.