Acton Dev

Sharing projects and stuff

Monthly Archives: November 2012

Circular Media Player 0.9.4

+New search modes: album, similar tracks (and quick access by right click->search-> album or similar tracks)

+multiple select on tables! so drag the down (or over an existing node)

+show loading dots when waiting for a network reply

+when hovering, draw a background over node text (improves readability)

+right click -> search on google (useful! 🙂 )

 

 

Advertisements

Circular Media Player 0.9.3

+Shuffle mode (plays forever a random track that exists in the window… getting related automatically gets disabled) (options->shuffle)
+moving nodes changes.. reorder nodes on mouse release
+new options under options->preferences
+new svg image handling (better for theming)

 

Qt C++ : order a QList of objects depending on the value returned of an object function

//
template <class Type, typename Func>
static QList<Type> orderList(QList<Type> list, Func func, bool ascending = true ){
    int count = list.count();
    
//buble sorting
    for(int i=count-2; i>=0; i--){
        for(int j=0; j<=i; j++){
            if(ascending){
                if( func(list.at(j)) > func(list.at(j+1)) && ascending ){
                    Type temp = list.at(j);
                    list.replace(j, list.at(j+1));
                    list.replace(j+1, temp);
                }
            }
            else if( func(list.at(j)) < func(list.at(j+1)) ){
                Type temp = list.at(j);
                list.replace(j, list.at(j+1));
                list.replace(j+1, temp);
            }
        }
    }
    return list;
}

//

and usage (inside tools.h i have my helper functions):

//
m_list = Tools::orderList(m_forwardsRelatedList, std::mem_fun(&Node::angleOffset));
//

Where m_list is a QList<Node*> and Node::angleOffset() (non static, public member function of class Node) returns a number.
So i now can sort the list, having the Node* objects sorted depending on the value returned by angleOffset() function !

Circular Media Player 0.9.2

#Fix: better handling vkontakte requests for source, now sending requests every 0.5 sec
+ animating circles movement
+ Shift+click a node to enqueue all the previous nodes
+ Help-> Shortcuts dialog