Results 1 to 8 of 8

Thread: make singals private

  1. #1
    Join Date
    Sep 2010
    Posts
    36
    Thanks
    1

    Default make singals private

    Hello.

    I've started using doxygen to document the interfaces of my classes...

    I have signals which I only use inside of the class. So they should not belong to the classes interface.

    I have noticed that doxygen documented this signals, too. But doxygen has acted correctly because this signals are accecible form outside of this class.

    How can I make a signal private (also in terms of information hiding)?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: make singals private

    Not sure, but shouldn't work EXCLUDE_SYMBOLS for that. And - also unsure - since "private Q_SLOTS:" also doesn't make the functions private, I doubt you can make a signal real private.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: make singals private

    Signals always have the "protected" access scope. There is no way of changing that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Sep 2010
    Posts
    36
    Thanks
    1

    Default Re: make singals private

    Okay, then I have to accept that signals are always protected...

    Even though this is not really a Qt topic but more a doxygen topic: Can anybody tell me how to use EXCLUDE_SYMBOLS so that some signals will not be documented?

    Google couldn't really help me....

  5. #5
    Join Date
    Jul 2012
    Location
    Singapore
    Posts
    7
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Windows Symbian S60

    Default Re: make singals private

    Yes.........................

  6. #6
    Join Date
    Sep 2010
    Posts
    36
    Thanks
    1

    Default Re: make singals private

    Excuse me?

  7. #7
    Join Date
    Sep 2010
    Posts
    36
    Thanks
    1

    Default Re: make singals private

    ***push***

  8. #8
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: make singals private

    I once needed private signals. I chose to move them to a helper class declared in a separate header file. E.g. MyClass is declared in myclass.h, its implementation is in myclass.cpp, the helper class MyClassPrivate is declared in myclass_p.h (which will be parsed by moc). Only myclass.cpp includes myclass_p.h. The users just include myclass.h.

Similar Threads

  1. Replies: 1
    Last Post: 15th December 2010, 13:20
  2. private classes in QT
    By talk2amulya in forum Qt Programming
    Replies: 3
    Last Post: 19th February 2009, 17:26
  3. private slots ??
    By salmanmanekia in forum Qt Programming
    Replies: 7
    Last Post: 6th August 2008, 14:00
  4. private inheritance
    By mickey in forum General Programming
    Replies: 8
    Last Post: 24th April 2008, 09:19
  5. Why does Qt use Private classes?
    By hyling in forum Qt Programming
    Replies: 2
    Last Post: 12th December 2006, 22:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.