I think the OP is asking how to document the fact that a function emits a signal, not the declaration of the signal itself.
Correct. Doxygen is properly documenting the signal itself in the section normally reserved for signals. But I'm trying to document a different function of mine that emits the given signal. In that function's documentation, I want the name of the signal to be a link that takes the user back to the documentation of the signal itself.
So:
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
To copy to clipboard, switch view to plain text mode
So I want the "sigBar()" text in the documentation for the foo function to be clickable. It seems like there should be some doxygen tag I add on line 13, before sigBar(), that tells doxygen to link that text back. Right now, it's just plain text.
I don't know if there is a Qt signal-specific tag. I'm not a doxygen guru. I usually use the "see also" (sa) tag followed by the name of the signal.
I'll try this and see what happens!
Added after 4 minutes:
I think the OP is asking how to document the fact that a function emits a signal, not the declaration of the signal itself.
Correct. Doxygen is properly documenting the signal itself in the section normally reserved for signals. But I'm trying to document a different function of mine that emits the given signal. In that function's documentation, I want the name of the signal to be a link that takes the user back to the documentation of the signal itself.
So:
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
To copy to clipboard, switch view to plain text mode
So I want the "sigBar()" text in the documentation for the foo function to be clickable. It seems like there should be some doxygen tag I add on line 13, before sigBar(), that tells doxygen to link that text back. Right now, it's just plain text.
I don't know if there is a Qt signal-specific tag. I'm not a doxygen guru. I usually use the "see also" (sa) tag followed by the name of the signal.
I'll try this and see what happens!
I think the OP is asking how to document the fact that a function emits a signal, not the declaration of the signal itself.
Correct. Doxygen is properly documenting the signal itself in the section normally reserved for signals. But I'm trying to document a different function of mine that emits the given signal. In that function's documentation, I want the name of the signal to be a link that takes the user back to the documentation of the signal itself.
So:
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
To copy to clipboard, switch view to plain text mode
So I want the "sigBar()" text in the documentation for the foo function to be clickable. It seems like there should be some doxygen tag I add on line 13, before sigBar(), that tells doxygen to link that text back. Right now, it's just plain text.
I don't know if there is a Qt signal-specific tag. I'm not a doxygen guru. I usually use the "see also" (sa) tag followed by the name of the signal.
I'll try this and see what happens!
I think the OP is asking how to document the fact that a function emits a signal, not the declaration of the signal itself.
Correct. Doxygen is properly documenting the signal itself in the section normally reserved for signals. But I'm trying to document a different function of mine that emits the given signal. In that function's documentation, I want the name of the signal to be a link that takes the user back to the documentation of the signal itself.
So:
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
To copy to clipboard, switch view to plain text mode
So I want the "sigBar()" text in the documentation for the foo function to be clickable. It seems like there should be some doxygen tag I add on line 13, before sigBar(), that tells doxygen to link that text back. Right now, it's just plain text.
I don't know if there is a Qt signal-specific tag. I'm not a doxygen guru. I usually use the "see also" (sa) tag followed by the name of the signal.
I'll try this and see what happens!
I think the OP is asking how to document the fact that a function emits a signal, not the declaration of the signal itself.
Correct. Doxygen is properly documenting the signal itself in the section normally reserved for signals. But I'm trying to document a different function of mine that emits the given signal. In that function's documentation, I want the name of the signal to be a link that takes the user back to the documentation of the signal itself.
So:
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
signals:
/**
* @brief Bar signal
*
* This signal is a useful signal
*/
void sigBar();
public:
/**
* @brief Foo function
*
* This function does all sorts of miraculous things. Oh, and it emits sigBar()
*/
void foo();
To copy to clipboard, switch view to plain text mode
So I want the "sigBar()" text in the documentation for the foo function to be clickable. It seems like there should be some doxygen tag I add on line 13, before sigBar(), that tells doxygen to link that text back. Right now, it's just plain text.
I don't know if there is a Qt signal-specific tag. I'm not a doxygen guru. I usually use the "see also" (sa) tag followed by the name of the signal.
I'll try this and see what happens!
Added after 18 minutes:
Well, I'm not entirely sure what I did, but now it appears to be working. It's possible that when I tried it before, I may not have actually documented the signal? Right now I just have:
/**
* @brief Connection timeout signal
*
* Emitted whenever the connection timer times out.
*/
void sigTimeout();
/**
* @brief Called when timer times out
*
* This function is called when the timer times out.
* Emits sigTimeout().
*/
void myClass::slotTimeout()
{
qDebug("Slot timeout, stopping timer");
mTimer->stop(); // stop timer if it isn't already
emit sigTimeout();
}
/**
* @brief Connection timeout signal
*
* Emitted whenever the connection timer times out.
*/
void sigTimeout();
/**
* @brief Called when timer times out
*
* This function is called when the timer times out.
* Emits sigTimeout().
*/
void myClass::slotTimeout()
{
qDebug("Slot timeout, stopping timer");
mTimer->stop(); // stop timer if it isn't already
emit sigTimeout();
}
To copy to clipboard, switch view to plain text mode
And the documentation for slotTimeout() is correctly linking back to the signal sigTimeout(). Sorry for the noise if that was the problem!
Bookmarks